google-apis-games_v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-games_v1.rb +15 -0
- data/lib/google/apis/games_v1.rb +40 -0
- data/lib/google/apis/games_v1/classes.rb +2941 -0
- data/lib/google/apis/games_v1/gem_version.rb +28 -0
- data/lib/google/apis/games_v1/representations.rb +1199 -0
- data/lib/google/apis/games_v1/service.rb +1181 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8ededa5dfe4caf5e9f35a7ac543d4441740f459c17cb88476714c5e764168ef2
|
4
|
+
data.tar.gz: cd06790fb68c38d9fb320c74ef8bd762788ff57c5519c73ce726a91032b403a1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: '079c199f20ab9a5925ed33463a8d5945ad154b53c31a98b180cb3f45818de7b3837899c2b49e8b0bfc3739d4bca65f8d82df72d3db32c6a706066c5d69f4444a'
|
7
|
+
data.tar.gz: 20f8875e8fd7725daab9b080d0b08a2743fa3462ab0d148e8d597ef9e5ecbff333162b5e8a5fd61e6424b9f9d52002487fb76a5fce3d576ddef884358d29cbc9
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-games_v1
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/games_v1/*.rb
|
9
|
+
lib/google/apis/games_v1.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V1 of the Google Play Game Services
|
2
|
+
|
3
|
+
This is a simple client library for version V1 of the Google Play Game Services. It provides:
|
4
|
+
|
5
|
+
* A client object that connects to the HTTP/JSON REST endpoint for the service.
|
6
|
+
* Ruby objects for data structures related to the service.
|
7
|
+
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
|
8
|
+
* Control of retry, pagination, and timeouts.
|
9
|
+
|
10
|
+
Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
|
11
|
+
|
12
|
+
## Getting started
|
13
|
+
|
14
|
+
### Before you begin
|
15
|
+
|
16
|
+
There are a few setup steps you need to complete before you can use this library:
|
17
|
+
|
18
|
+
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
|
19
|
+
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
|
20
|
+
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/games.googleapis.com) in the console.
|
21
|
+
|
22
|
+
### Installation
|
23
|
+
|
24
|
+
Add this line to your application's Gemfile:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'google-apis-games_v1', '~> 0.1'
|
28
|
+
```
|
29
|
+
|
30
|
+
And then execute:
|
31
|
+
|
32
|
+
```
|
33
|
+
$ bundle
|
34
|
+
```
|
35
|
+
|
36
|
+
Or install it yourself as:
|
37
|
+
|
38
|
+
```
|
39
|
+
$ gem install google-apis-games_v1
|
40
|
+
```
|
41
|
+
|
42
|
+
### Creating a client object
|
43
|
+
|
44
|
+
Once the gem is installed, you can load the client code and instantiate a client.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# Load the client
|
48
|
+
require "google/apis/games_v1"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::GamesV1::GamesService.new
|
52
|
+
|
53
|
+
# Authenticate calls
|
54
|
+
client.authentication = # ... use the googleauth gem to create credentials
|
55
|
+
```
|
56
|
+
|
57
|
+
See the class reference docs for information on the methods you can call from a client.
|
58
|
+
|
59
|
+
## Documentation
|
60
|
+
|
61
|
+
More detailed descriptions of the Google simple REST clients are available in two documents.
|
62
|
+
|
63
|
+
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
64
|
+
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
65
|
+
|
66
|
+
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Games service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the Google Play Game Services, see the {Google::Apis::GamesV1::GamesService class reference docs}.
|
69
|
+
|
70
|
+
## Which client should I use?
|
71
|
+
|
72
|
+
Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
|
73
|
+
|
74
|
+
This library, `google-apis-games_v1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
|
75
|
+
|
76
|
+
Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
|
77
|
+
|
78
|
+
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
|
79
|
+
|
80
|
+
**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
|
81
|
+
|
82
|
+
The [product documentation](https://developers.google.com/games/) may provide guidance regarding the preferred client library to use.
|
83
|
+
|
84
|
+
## Supported Ruby versions
|
85
|
+
|
86
|
+
This library is supported on Ruby 2.5+.
|
87
|
+
|
88
|
+
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
|
89
|
+
|
90
|
+
## License
|
91
|
+
|
92
|
+
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
|
93
|
+
|
94
|
+
## Support
|
95
|
+
|
96
|
+
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
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"
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
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
|
+
require 'google/apis/games_v1/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Google Play Game Services
|
23
|
+
#
|
24
|
+
# The Google Play games service allows developers to enhance games with social
|
25
|
+
# leaderboards, achievements, game state, sign-in with Google, and more.
|
26
|
+
#
|
27
|
+
# @see https://developers.google.com/games/
|
28
|
+
module GamesV1
|
29
|
+
# Version of the Google Play Game Services this client connects to.
|
30
|
+
# This is NOT the gem version.
|
31
|
+
VERSION = 'V1'
|
32
|
+
|
33
|
+
# View and manage its own configuration data in your Google Drive
|
34
|
+
AUTH_DRIVE_APPDATA = 'https://www.googleapis.com/auth/drive.appdata'
|
35
|
+
|
36
|
+
# Create, edit, and delete your Google Play Games activity
|
37
|
+
AUTH_GAMES = 'https://www.googleapis.com/auth/games'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,2941 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
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
|
+
# An achievement definition object.
|
26
|
+
class AchievementDefinition
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# The type of the achievement.
|
30
|
+
# Corresponds to the JSON property `achievementType`
|
31
|
+
# @return [String]
|
32
|
+
attr_accessor :achievement_type
|
33
|
+
|
34
|
+
# The description of the achievement.
|
35
|
+
# Corresponds to the JSON property `description`
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :description
|
38
|
+
|
39
|
+
# Experience points which will be earned when unlocking this achievement.
|
40
|
+
# Corresponds to the JSON property `experiencePoints`
|
41
|
+
# @return [Fixnum]
|
42
|
+
attr_accessor :experience_points
|
43
|
+
|
44
|
+
# The total steps for an incremental achievement as a string.
|
45
|
+
# Corresponds to the JSON property `formattedTotalSteps`
|
46
|
+
# @return [String]
|
47
|
+
attr_accessor :formatted_total_steps
|
48
|
+
|
49
|
+
# The ID of the achievement.
|
50
|
+
# Corresponds to the JSON property `id`
|
51
|
+
# @return [String]
|
52
|
+
attr_accessor :id
|
53
|
+
|
54
|
+
# The initial state of the achievement.
|
55
|
+
# Corresponds to the JSON property `initialState`
|
56
|
+
# @return [String]
|
57
|
+
attr_accessor :initial_state
|
58
|
+
|
59
|
+
# Indicates whether the revealed icon image being returned is a default image,
|
60
|
+
# or is provided by the game.
|
61
|
+
# Corresponds to the JSON property `isRevealedIconUrlDefault`
|
62
|
+
# @return [Boolean]
|
63
|
+
attr_accessor :is_revealed_icon_url_default
|
64
|
+
alias_method :is_revealed_icon_url_default?, :is_revealed_icon_url_default
|
65
|
+
|
66
|
+
# Indicates whether the unlocked icon image being returned is a default image,
|
67
|
+
# or is game-provided.
|
68
|
+
# Corresponds to the JSON property `isUnlockedIconUrlDefault`
|
69
|
+
# @return [Boolean]
|
70
|
+
attr_accessor :is_unlocked_icon_url_default
|
71
|
+
alias_method :is_unlocked_icon_url_default?, :is_unlocked_icon_url_default
|
72
|
+
|
73
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
74
|
+
# string `games#achievementDefinition`.
|
75
|
+
# Corresponds to the JSON property `kind`
|
76
|
+
# @return [String]
|
77
|
+
attr_accessor :kind
|
78
|
+
|
79
|
+
# The name of the achievement.
|
80
|
+
# Corresponds to the JSON property `name`
|
81
|
+
# @return [String]
|
82
|
+
attr_accessor :name
|
83
|
+
|
84
|
+
# The image URL for the revealed achievement icon.
|
85
|
+
# Corresponds to the JSON property `revealedIconUrl`
|
86
|
+
# @return [String]
|
87
|
+
attr_accessor :revealed_icon_url
|
88
|
+
|
89
|
+
# The total steps for an incremental achievement.
|
90
|
+
# Corresponds to the JSON property `totalSteps`
|
91
|
+
# @return [Fixnum]
|
92
|
+
attr_accessor :total_steps
|
93
|
+
|
94
|
+
# The image URL for the unlocked achievement icon.
|
95
|
+
# Corresponds to the JSON property `unlockedIconUrl`
|
96
|
+
# @return [String]
|
97
|
+
attr_accessor :unlocked_icon_url
|
98
|
+
|
99
|
+
def initialize(**args)
|
100
|
+
update!(**args)
|
101
|
+
end
|
102
|
+
|
103
|
+
# Update properties of this object
|
104
|
+
def update!(**args)
|
105
|
+
@achievement_type = args[:achievement_type] if args.key?(:achievement_type)
|
106
|
+
@description = args[:description] if args.key?(:description)
|
107
|
+
@experience_points = args[:experience_points] if args.key?(:experience_points)
|
108
|
+
@formatted_total_steps = args[:formatted_total_steps] if args.key?(:formatted_total_steps)
|
109
|
+
@id = args[:id] if args.key?(:id)
|
110
|
+
@initial_state = args[:initial_state] if args.key?(:initial_state)
|
111
|
+
@is_revealed_icon_url_default = args[:is_revealed_icon_url_default] if args.key?(:is_revealed_icon_url_default)
|
112
|
+
@is_unlocked_icon_url_default = args[:is_unlocked_icon_url_default] if args.key?(:is_unlocked_icon_url_default)
|
113
|
+
@kind = args[:kind] if args.key?(:kind)
|
114
|
+
@name = args[:name] if args.key?(:name)
|
115
|
+
@revealed_icon_url = args[:revealed_icon_url] if args.key?(:revealed_icon_url)
|
116
|
+
@total_steps = args[:total_steps] if args.key?(:total_steps)
|
117
|
+
@unlocked_icon_url = args[:unlocked_icon_url] if args.key?(:unlocked_icon_url)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
# A list of achievement definition objects.
|
122
|
+
class ListAchievementDefinitionsResponse
|
123
|
+
include Google::Apis::Core::Hashable
|
124
|
+
|
125
|
+
# The achievement definitions.
|
126
|
+
# Corresponds to the JSON property `items`
|
127
|
+
# @return [Array<Google::Apis::GamesV1::AchievementDefinition>]
|
128
|
+
attr_accessor :items
|
129
|
+
|
130
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
131
|
+
# string `games#achievementDefinitionsListResponse`.
|
132
|
+
# Corresponds to the JSON property `kind`
|
133
|
+
# @return [String]
|
134
|
+
attr_accessor :kind
|
135
|
+
|
136
|
+
# Token corresponding to the next page of results.
|
137
|
+
# Corresponds to the JSON property `nextPageToken`
|
138
|
+
# @return [String]
|
139
|
+
attr_accessor :next_page_token
|
140
|
+
|
141
|
+
def initialize(**args)
|
142
|
+
update!(**args)
|
143
|
+
end
|
144
|
+
|
145
|
+
# Update properties of this object
|
146
|
+
def update!(**args)
|
147
|
+
@items = args[:items] if args.key?(:items)
|
148
|
+
@kind = args[:kind] if args.key?(:kind)
|
149
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# An achievement increment response
|
154
|
+
class AchievementIncrementResponse
|
155
|
+
include Google::Apis::Core::Hashable
|
156
|
+
|
157
|
+
# The current steps recorded for this incremental achievement.
|
158
|
+
# Corresponds to the JSON property `currentSteps`
|
159
|
+
# @return [Fixnum]
|
160
|
+
attr_accessor :current_steps
|
161
|
+
|
162
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
163
|
+
# string `games#achievementIncrementResponse`.
|
164
|
+
# Corresponds to the JSON property `kind`
|
165
|
+
# @return [String]
|
166
|
+
attr_accessor :kind
|
167
|
+
|
168
|
+
# Whether the current steps for the achievement has reached the number of steps
|
169
|
+
# required to unlock.
|
170
|
+
# Corresponds to the JSON property `newlyUnlocked`
|
171
|
+
# @return [Boolean]
|
172
|
+
attr_accessor :newly_unlocked
|
173
|
+
alias_method :newly_unlocked?, :newly_unlocked
|
174
|
+
|
175
|
+
def initialize(**args)
|
176
|
+
update!(**args)
|
177
|
+
end
|
178
|
+
|
179
|
+
# Update properties of this object
|
180
|
+
def update!(**args)
|
181
|
+
@current_steps = args[:current_steps] if args.key?(:current_steps)
|
182
|
+
@kind = args[:kind] if args.key?(:kind)
|
183
|
+
@newly_unlocked = args[:newly_unlocked] if args.key?(:newly_unlocked)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# An achievement reveal response
|
188
|
+
class AchievementRevealResponse
|
189
|
+
include Google::Apis::Core::Hashable
|
190
|
+
|
191
|
+
# The current state of the achievement for which a reveal was attempted. This
|
192
|
+
# might be `UNLOCKED` if the achievement was already unlocked.
|
193
|
+
# Corresponds to the JSON property `currentState`
|
194
|
+
# @return [String]
|
195
|
+
attr_accessor :current_state
|
196
|
+
|
197
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
198
|
+
# string `games#achievementRevealResponse`.
|
199
|
+
# Corresponds to the JSON property `kind`
|
200
|
+
# @return [String]
|
201
|
+
attr_accessor :kind
|
202
|
+
|
203
|
+
def initialize(**args)
|
204
|
+
update!(**args)
|
205
|
+
end
|
206
|
+
|
207
|
+
# Update properties of this object
|
208
|
+
def update!(**args)
|
209
|
+
@current_state = args[:current_state] if args.key?(:current_state)
|
210
|
+
@kind = args[:kind] if args.key?(:kind)
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
# An achievement set steps at least response.
|
215
|
+
class AchievementSetStepsAtLeastResponse
|
216
|
+
include Google::Apis::Core::Hashable
|
217
|
+
|
218
|
+
# The current steps recorded for this incremental achievement.
|
219
|
+
# Corresponds to the JSON property `currentSteps`
|
220
|
+
# @return [Fixnum]
|
221
|
+
attr_accessor :current_steps
|
222
|
+
|
223
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
224
|
+
# string `games#achievementSetStepsAtLeastResponse`.
|
225
|
+
# Corresponds to the JSON property `kind`
|
226
|
+
# @return [String]
|
227
|
+
attr_accessor :kind
|
228
|
+
|
229
|
+
# Whether the current steps for the achievement has reached the number of steps
|
230
|
+
# required to unlock.
|
231
|
+
# Corresponds to the JSON property `newlyUnlocked`
|
232
|
+
# @return [Boolean]
|
233
|
+
attr_accessor :newly_unlocked
|
234
|
+
alias_method :newly_unlocked?, :newly_unlocked
|
235
|
+
|
236
|
+
def initialize(**args)
|
237
|
+
update!(**args)
|
238
|
+
end
|
239
|
+
|
240
|
+
# Update properties of this object
|
241
|
+
def update!(**args)
|
242
|
+
@current_steps = args[:current_steps] if args.key?(:current_steps)
|
243
|
+
@kind = args[:kind] if args.key?(:kind)
|
244
|
+
@newly_unlocked = args[:newly_unlocked] if args.key?(:newly_unlocked)
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
# An achievement unlock response
|
249
|
+
class AchievementUnlockResponse
|
250
|
+
include Google::Apis::Core::Hashable
|
251
|
+
|
252
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
253
|
+
# string `games#achievementUnlockResponse`.
|
254
|
+
# Corresponds to the JSON property `kind`
|
255
|
+
# @return [String]
|
256
|
+
attr_accessor :kind
|
257
|
+
|
258
|
+
# Whether this achievement was newly unlocked (that is, whether the unlock
|
259
|
+
# request for the achievement was the first for the player).
|
260
|
+
# Corresponds to the JSON property `newlyUnlocked`
|
261
|
+
# @return [Boolean]
|
262
|
+
attr_accessor :newly_unlocked
|
263
|
+
alias_method :newly_unlocked?, :newly_unlocked
|
264
|
+
|
265
|
+
def initialize(**args)
|
266
|
+
update!(**args)
|
267
|
+
end
|
268
|
+
|
269
|
+
# Update properties of this object
|
270
|
+
def update!(**args)
|
271
|
+
@kind = args[:kind] if args.key?(:kind)
|
272
|
+
@newly_unlocked = args[:newly_unlocked] if args.key?(:newly_unlocked)
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
# A list of achievement update requests.
|
277
|
+
class AchievementUpdateMultipleRequest
|
278
|
+
include Google::Apis::Core::Hashable
|
279
|
+
|
280
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
281
|
+
# string `games#achievementUpdateMultipleRequest`.
|
282
|
+
# Corresponds to the JSON property `kind`
|
283
|
+
# @return [String]
|
284
|
+
attr_accessor :kind
|
285
|
+
|
286
|
+
# The individual achievement update requests.
|
287
|
+
# Corresponds to the JSON property `updates`
|
288
|
+
# @return [Array<Google::Apis::GamesV1::UpdateAchievementRequest>]
|
289
|
+
attr_accessor :updates
|
290
|
+
|
291
|
+
def initialize(**args)
|
292
|
+
update!(**args)
|
293
|
+
end
|
294
|
+
|
295
|
+
# Update properties of this object
|
296
|
+
def update!(**args)
|
297
|
+
@kind = args[:kind] if args.key?(:kind)
|
298
|
+
@updates = args[:updates] if args.key?(:updates)
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
302
|
+
# Response message for UpdateMultipleAchievements rpc.
|
303
|
+
class AchievementUpdateMultipleResponse
|
304
|
+
include Google::Apis::Core::Hashable
|
305
|
+
|
306
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
307
|
+
# string `games#achievementUpdateMultipleResponse`.
|
308
|
+
# Corresponds to the JSON property `kind`
|
309
|
+
# @return [String]
|
310
|
+
attr_accessor :kind
|
311
|
+
|
312
|
+
# The updated state of the achievements.
|
313
|
+
# Corresponds to the JSON property `updatedAchievements`
|
314
|
+
# @return [Array<Google::Apis::GamesV1::UpdateAchievementResponse>]
|
315
|
+
attr_accessor :updated_achievements
|
316
|
+
|
317
|
+
def initialize(**args)
|
318
|
+
update!(**args)
|
319
|
+
end
|
320
|
+
|
321
|
+
# Update properties of this object
|
322
|
+
def update!(**args)
|
323
|
+
@kind = args[:kind] if args.key?(:kind)
|
324
|
+
@updated_achievements = args[:updated_achievements] if args.key?(:updated_achievements)
|
325
|
+
end
|
326
|
+
end
|
327
|
+
|
328
|
+
# A request to update an achievement.
|
329
|
+
class UpdateAchievementRequest
|
330
|
+
include Google::Apis::Core::Hashable
|
331
|
+
|
332
|
+
# The achievement this update is being applied to.
|
333
|
+
# Corresponds to the JSON property `achievementId`
|
334
|
+
# @return [String]
|
335
|
+
attr_accessor :achievement_id
|
336
|
+
|
337
|
+
# The payload to request to increment an achievement.
|
338
|
+
# Corresponds to the JSON property `incrementPayload`
|
339
|
+
# @return [Google::Apis::GamesV1::GamesAchievementIncrement]
|
340
|
+
attr_accessor :increment_payload
|
341
|
+
|
342
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
343
|
+
# string `games#achievementUpdateRequest`.
|
344
|
+
# Corresponds to the JSON property `kind`
|
345
|
+
# @return [String]
|
346
|
+
attr_accessor :kind
|
347
|
+
|
348
|
+
# The payload to request to increment an achievement.
|
349
|
+
# Corresponds to the JSON property `setStepsAtLeastPayload`
|
350
|
+
# @return [Google::Apis::GamesV1::GamesAchievementSetStepsAtLeast]
|
351
|
+
attr_accessor :set_steps_at_least_payload
|
352
|
+
|
353
|
+
# The type of update being applied.
|
354
|
+
# Corresponds to the JSON property `updateType`
|
355
|
+
# @return [String]
|
356
|
+
attr_accessor :update_type
|
357
|
+
|
358
|
+
def initialize(**args)
|
359
|
+
update!(**args)
|
360
|
+
end
|
361
|
+
|
362
|
+
# Update properties of this object
|
363
|
+
def update!(**args)
|
364
|
+
@achievement_id = args[:achievement_id] if args.key?(:achievement_id)
|
365
|
+
@increment_payload = args[:increment_payload] if args.key?(:increment_payload)
|
366
|
+
@kind = args[:kind] if args.key?(:kind)
|
367
|
+
@set_steps_at_least_payload = args[:set_steps_at_least_payload] if args.key?(:set_steps_at_least_payload)
|
368
|
+
@update_type = args[:update_type] if args.key?(:update_type)
|
369
|
+
end
|
370
|
+
end
|
371
|
+
|
372
|
+
# An updated achievement.
|
373
|
+
class UpdateAchievementResponse
|
374
|
+
include Google::Apis::Core::Hashable
|
375
|
+
|
376
|
+
# The achievement this update is was applied to.
|
377
|
+
# Corresponds to the JSON property `achievementId`
|
378
|
+
# @return [String]
|
379
|
+
attr_accessor :achievement_id
|
380
|
+
|
381
|
+
# The current state of the achievement.
|
382
|
+
# Corresponds to the JSON property `currentState`
|
383
|
+
# @return [String]
|
384
|
+
attr_accessor :current_state
|
385
|
+
|
386
|
+
# The current steps recorded for this achievement if it is incremental.
|
387
|
+
# Corresponds to the JSON property `currentSteps`
|
388
|
+
# @return [Fixnum]
|
389
|
+
attr_accessor :current_steps
|
390
|
+
|
391
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
392
|
+
# string `games#achievementUpdateResponse`.
|
393
|
+
# Corresponds to the JSON property `kind`
|
394
|
+
# @return [String]
|
395
|
+
attr_accessor :kind
|
396
|
+
|
397
|
+
# Whether this achievement was newly unlocked (that is, whether the unlock
|
398
|
+
# request for the achievement was the first for the player).
|
399
|
+
# Corresponds to the JSON property `newlyUnlocked`
|
400
|
+
# @return [Boolean]
|
401
|
+
attr_accessor :newly_unlocked
|
402
|
+
alias_method :newly_unlocked?, :newly_unlocked
|
403
|
+
|
404
|
+
# Whether the requested updates actually affected the achievement.
|
405
|
+
# Corresponds to the JSON property `updateOccurred`
|
406
|
+
# @return [Boolean]
|
407
|
+
attr_accessor :update_occurred
|
408
|
+
alias_method :update_occurred?, :update_occurred
|
409
|
+
|
410
|
+
def initialize(**args)
|
411
|
+
update!(**args)
|
412
|
+
end
|
413
|
+
|
414
|
+
# Update properties of this object
|
415
|
+
def update!(**args)
|
416
|
+
@achievement_id = args[:achievement_id] if args.key?(:achievement_id)
|
417
|
+
@current_state = args[:current_state] if args.key?(:current_state)
|
418
|
+
@current_steps = args[:current_steps] if args.key?(:current_steps)
|
419
|
+
@kind = args[:kind] if args.key?(:kind)
|
420
|
+
@newly_unlocked = args[:newly_unlocked] if args.key?(:newly_unlocked)
|
421
|
+
@update_occurred = args[:update_occurred] if args.key?(:update_occurred)
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
# The Application resource.
|
426
|
+
class Application
|
427
|
+
include Google::Apis::Core::Hashable
|
428
|
+
|
429
|
+
# The number of achievements visible to the currently authenticated player.
|
430
|
+
# Corresponds to the JSON property `achievement_count`
|
431
|
+
# @return [Fixnum]
|
432
|
+
attr_accessor :achievement_count
|
433
|
+
|
434
|
+
# The assets of the application.
|
435
|
+
# Corresponds to the JSON property `assets`
|
436
|
+
# @return [Array<Google::Apis::GamesV1::ImageAsset>]
|
437
|
+
attr_accessor :assets
|
438
|
+
|
439
|
+
# The author of the application.
|
440
|
+
# Corresponds to the JSON property `author`
|
441
|
+
# @return [String]
|
442
|
+
attr_accessor :author
|
443
|
+
|
444
|
+
# An application category object.
|
445
|
+
# Corresponds to the JSON property `category`
|
446
|
+
# @return [Google::Apis::GamesV1::ApplicationCategory]
|
447
|
+
attr_accessor :category
|
448
|
+
|
449
|
+
# The description of the application.
|
450
|
+
# Corresponds to the JSON property `description`
|
451
|
+
# @return [String]
|
452
|
+
attr_accessor :description
|
453
|
+
|
454
|
+
# A list of features that have been enabled for the application.
|
455
|
+
# Corresponds to the JSON property `enabledFeatures`
|
456
|
+
# @return [Array<String>]
|
457
|
+
attr_accessor :enabled_features
|
458
|
+
|
459
|
+
# The ID of the application.
|
460
|
+
# Corresponds to the JSON property `id`
|
461
|
+
# @return [String]
|
462
|
+
attr_accessor :id
|
463
|
+
|
464
|
+
# The instances of the application.
|
465
|
+
# Corresponds to the JSON property `instances`
|
466
|
+
# @return [Array<Google::Apis::GamesV1::Instance>]
|
467
|
+
attr_accessor :instances
|
468
|
+
|
469
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
470
|
+
# string `games#application`.
|
471
|
+
# Corresponds to the JSON property `kind`
|
472
|
+
# @return [String]
|
473
|
+
attr_accessor :kind
|
474
|
+
|
475
|
+
# The last updated timestamp of the application.
|
476
|
+
# Corresponds to the JSON property `lastUpdatedTimestamp`
|
477
|
+
# @return [Fixnum]
|
478
|
+
attr_accessor :last_updated_timestamp
|
479
|
+
|
480
|
+
# The number of leaderboards visible to the currently authenticated player.
|
481
|
+
# Corresponds to the JSON property `leaderboard_count`
|
482
|
+
# @return [Fixnum]
|
483
|
+
attr_accessor :leaderboard_count
|
484
|
+
|
485
|
+
# The name of the application.
|
486
|
+
# Corresponds to the JSON property `name`
|
487
|
+
# @return [String]
|
488
|
+
attr_accessor :name
|
489
|
+
|
490
|
+
# A hint to the client UI for what color to use as an app-themed color. The
|
491
|
+
# color is given as an RGB triplet (e.g. "E0E0E0").
|
492
|
+
# Corresponds to the JSON property `themeColor`
|
493
|
+
# @return [String]
|
494
|
+
attr_accessor :theme_color
|
495
|
+
|
496
|
+
def initialize(**args)
|
497
|
+
update!(**args)
|
498
|
+
end
|
499
|
+
|
500
|
+
# Update properties of this object
|
501
|
+
def update!(**args)
|
502
|
+
@achievement_count = args[:achievement_count] if args.key?(:achievement_count)
|
503
|
+
@assets = args[:assets] if args.key?(:assets)
|
504
|
+
@author = args[:author] if args.key?(:author)
|
505
|
+
@category = args[:category] if args.key?(:category)
|
506
|
+
@description = args[:description] if args.key?(:description)
|
507
|
+
@enabled_features = args[:enabled_features] if args.key?(:enabled_features)
|
508
|
+
@id = args[:id] if args.key?(:id)
|
509
|
+
@instances = args[:instances] if args.key?(:instances)
|
510
|
+
@kind = args[:kind] if args.key?(:kind)
|
511
|
+
@last_updated_timestamp = args[:last_updated_timestamp] if args.key?(:last_updated_timestamp)
|
512
|
+
@leaderboard_count = args[:leaderboard_count] if args.key?(:leaderboard_count)
|
513
|
+
@name = args[:name] if args.key?(:name)
|
514
|
+
@theme_color = args[:theme_color] if args.key?(:theme_color)
|
515
|
+
end
|
516
|
+
end
|
517
|
+
|
518
|
+
# An application category object.
|
519
|
+
class ApplicationCategory
|
520
|
+
include Google::Apis::Core::Hashable
|
521
|
+
|
522
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
523
|
+
# string `games#applicationCategory`.
|
524
|
+
# Corresponds to the JSON property `kind`
|
525
|
+
# @return [String]
|
526
|
+
attr_accessor :kind
|
527
|
+
|
528
|
+
# The primary category.
|
529
|
+
# Corresponds to the JSON property `primary`
|
530
|
+
# @return [String]
|
531
|
+
attr_accessor :primary
|
532
|
+
|
533
|
+
# The secondary category.
|
534
|
+
# Corresponds to the JSON property `secondary`
|
535
|
+
# @return [String]
|
536
|
+
attr_accessor :secondary
|
537
|
+
|
538
|
+
def initialize(**args)
|
539
|
+
update!(**args)
|
540
|
+
end
|
541
|
+
|
542
|
+
# Update properties of this object
|
543
|
+
def update!(**args)
|
544
|
+
@kind = args[:kind] if args.key?(:kind)
|
545
|
+
@primary = args[:primary] if args.key?(:primary)
|
546
|
+
@secondary = args[:secondary] if args.key?(:secondary)
|
547
|
+
end
|
548
|
+
end
|
549
|
+
|
550
|
+
# A third party application verification response resource.
|
551
|
+
class ApplicationVerifyResponse
|
552
|
+
include Google::Apis::Core::Hashable
|
553
|
+
|
554
|
+
# An alternate ID that was once used for the player that was issued the auth
|
555
|
+
# token used in this request. (This field is not normally populated.)
|
556
|
+
# Corresponds to the JSON property `alternate_player_id`
|
557
|
+
# @return [String]
|
558
|
+
attr_accessor :alternate_player_id
|
559
|
+
|
560
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
561
|
+
# string `games#applicationVerifyResponse`.
|
562
|
+
# Corresponds to the JSON property `kind`
|
563
|
+
# @return [String]
|
564
|
+
attr_accessor :kind
|
565
|
+
|
566
|
+
# The ID of the player that was issued the auth token used in this request.
|
567
|
+
# Corresponds to the JSON property `player_id`
|
568
|
+
# @return [String]
|
569
|
+
attr_accessor :player_id
|
570
|
+
|
571
|
+
def initialize(**args)
|
572
|
+
update!(**args)
|
573
|
+
end
|
574
|
+
|
575
|
+
# Update properties of this object
|
576
|
+
def update!(**args)
|
577
|
+
@alternate_player_id = args[:alternate_player_id] if args.key?(:alternate_player_id)
|
578
|
+
@kind = args[:kind] if args.key?(:kind)
|
579
|
+
@player_id = args[:player_id] if args.key?(:player_id)
|
580
|
+
end
|
581
|
+
end
|
582
|
+
|
583
|
+
# Data related to individual game categories.
|
584
|
+
class Category
|
585
|
+
include Google::Apis::Core::Hashable
|
586
|
+
|
587
|
+
# The category name.
|
588
|
+
# Corresponds to the JSON property `category`
|
589
|
+
# @return [String]
|
590
|
+
attr_accessor :category
|
591
|
+
|
592
|
+
# Experience points earned in this category.
|
593
|
+
# Corresponds to the JSON property `experiencePoints`
|
594
|
+
# @return [Fixnum]
|
595
|
+
attr_accessor :experience_points
|
596
|
+
|
597
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
598
|
+
# string `games#category`.
|
599
|
+
# Corresponds to the JSON property `kind`
|
600
|
+
# @return [String]
|
601
|
+
attr_accessor :kind
|
602
|
+
|
603
|
+
def initialize(**args)
|
604
|
+
update!(**args)
|
605
|
+
end
|
606
|
+
|
607
|
+
# Update properties of this object
|
608
|
+
def update!(**args)
|
609
|
+
@category = args[:category] if args.key?(:category)
|
610
|
+
@experience_points = args[:experience_points] if args.key?(:experience_points)
|
611
|
+
@kind = args[:kind] if args.key?(:kind)
|
612
|
+
end
|
613
|
+
end
|
614
|
+
|
615
|
+
# A third party list metagame categories response.
|
616
|
+
class ListCategoryResponse
|
617
|
+
include Google::Apis::Core::Hashable
|
618
|
+
|
619
|
+
# The list of categories with usage data.
|
620
|
+
# Corresponds to the JSON property `items`
|
621
|
+
# @return [Array<Google::Apis::GamesV1::Category>]
|
622
|
+
attr_accessor :items
|
623
|
+
|
624
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
625
|
+
# string `games#categoryListResponse`.
|
626
|
+
# Corresponds to the JSON property `kind`
|
627
|
+
# @return [String]
|
628
|
+
attr_accessor :kind
|
629
|
+
|
630
|
+
# Token corresponding to the next page of results.
|
631
|
+
# Corresponds to the JSON property `nextPageToken`
|
632
|
+
# @return [String]
|
633
|
+
attr_accessor :next_page_token
|
634
|
+
|
635
|
+
def initialize(**args)
|
636
|
+
update!(**args)
|
637
|
+
end
|
638
|
+
|
639
|
+
# Update properties of this object
|
640
|
+
def update!(**args)
|
641
|
+
@items = args[:items] if args.key?(:items)
|
642
|
+
@kind = args[:kind] if args.key?(:kind)
|
643
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
644
|
+
end
|
645
|
+
end
|
646
|
+
|
647
|
+
# Container for a URL end point of the requested type.
|
648
|
+
class EndPoint
|
649
|
+
include Google::Apis::Core::Hashable
|
650
|
+
|
651
|
+
# A URL suitable for loading in a web browser for the requested endpoint.
|
652
|
+
# Corresponds to the JSON property `url`
|
653
|
+
# @return [String]
|
654
|
+
attr_accessor :url
|
655
|
+
|
656
|
+
def initialize(**args)
|
657
|
+
update!(**args)
|
658
|
+
end
|
659
|
+
|
660
|
+
# Update properties of this object
|
661
|
+
def update!(**args)
|
662
|
+
@url = args[:url] if args.key?(:url)
|
663
|
+
end
|
664
|
+
end
|
665
|
+
|
666
|
+
# A batch update failure resource.
|
667
|
+
class EventBatchRecordFailure
|
668
|
+
include Google::Apis::Core::Hashable
|
669
|
+
|
670
|
+
# The cause for the update failure.
|
671
|
+
# Corresponds to the JSON property `failureCause`
|
672
|
+
# @return [String]
|
673
|
+
attr_accessor :failure_cause
|
674
|
+
|
675
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
676
|
+
# string `games#eventBatchRecordFailure`.
|
677
|
+
# Corresponds to the JSON property `kind`
|
678
|
+
# @return [String]
|
679
|
+
attr_accessor :kind
|
680
|
+
|
681
|
+
# An event period time range.
|
682
|
+
# Corresponds to the JSON property `range`
|
683
|
+
# @return [Google::Apis::GamesV1::EventPeriodRange]
|
684
|
+
attr_accessor :range
|
685
|
+
|
686
|
+
def initialize(**args)
|
687
|
+
update!(**args)
|
688
|
+
end
|
689
|
+
|
690
|
+
# Update properties of this object
|
691
|
+
def update!(**args)
|
692
|
+
@failure_cause = args[:failure_cause] if args.key?(:failure_cause)
|
693
|
+
@kind = args[:kind] if args.key?(:kind)
|
694
|
+
@range = args[:range] if args.key?(:range)
|
695
|
+
end
|
696
|
+
end
|
697
|
+
|
698
|
+
# An event child relationship resource.
|
699
|
+
class EventChild
|
700
|
+
include Google::Apis::Core::Hashable
|
701
|
+
|
702
|
+
# The ID of the child event.
|
703
|
+
# Corresponds to the JSON property `childId`
|
704
|
+
# @return [String]
|
705
|
+
attr_accessor :child_id
|
706
|
+
|
707
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
708
|
+
# string `games#eventChild`.
|
709
|
+
# Corresponds to the JSON property `kind`
|
710
|
+
# @return [String]
|
711
|
+
attr_accessor :kind
|
712
|
+
|
713
|
+
def initialize(**args)
|
714
|
+
update!(**args)
|
715
|
+
end
|
716
|
+
|
717
|
+
# Update properties of this object
|
718
|
+
def update!(**args)
|
719
|
+
@child_id = args[:child_id] if args.key?(:child_id)
|
720
|
+
@kind = args[:kind] if args.key?(:kind)
|
721
|
+
end
|
722
|
+
end
|
723
|
+
|
724
|
+
# An event definition resource.
|
725
|
+
class EventDefinition
|
726
|
+
include Google::Apis::Core::Hashable
|
727
|
+
|
728
|
+
# A list of events that are a child of this event.
|
729
|
+
# Corresponds to the JSON property `childEvents`
|
730
|
+
# @return [Array<Google::Apis::GamesV1::EventChild>]
|
731
|
+
attr_accessor :child_events
|
732
|
+
|
733
|
+
# Description of what this event represents.
|
734
|
+
# Corresponds to the JSON property `description`
|
735
|
+
# @return [String]
|
736
|
+
attr_accessor :description
|
737
|
+
|
738
|
+
# The name to display for the event.
|
739
|
+
# Corresponds to the JSON property `displayName`
|
740
|
+
# @return [String]
|
741
|
+
attr_accessor :display_name
|
742
|
+
|
743
|
+
# The ID of the event.
|
744
|
+
# Corresponds to the JSON property `id`
|
745
|
+
# @return [String]
|
746
|
+
attr_accessor :id
|
747
|
+
|
748
|
+
# The base URL for the image that represents the event.
|
749
|
+
# Corresponds to the JSON property `imageUrl`
|
750
|
+
# @return [String]
|
751
|
+
attr_accessor :image_url
|
752
|
+
|
753
|
+
# Indicates whether the icon image being returned is a default image, or is game-
|
754
|
+
# provided.
|
755
|
+
# Corresponds to the JSON property `isDefaultImageUrl`
|
756
|
+
# @return [Boolean]
|
757
|
+
attr_accessor :is_default_image_url
|
758
|
+
alias_method :is_default_image_url?, :is_default_image_url
|
759
|
+
|
760
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
761
|
+
# string `games#eventDefinition`.
|
762
|
+
# Corresponds to the JSON property `kind`
|
763
|
+
# @return [String]
|
764
|
+
attr_accessor :kind
|
765
|
+
|
766
|
+
# The visibility of event being tracked in this definition.
|
767
|
+
# Corresponds to the JSON property `visibility`
|
768
|
+
# @return [String]
|
769
|
+
attr_accessor :visibility
|
770
|
+
|
771
|
+
def initialize(**args)
|
772
|
+
update!(**args)
|
773
|
+
end
|
774
|
+
|
775
|
+
# Update properties of this object
|
776
|
+
def update!(**args)
|
777
|
+
@child_events = args[:child_events] if args.key?(:child_events)
|
778
|
+
@description = args[:description] if args.key?(:description)
|
779
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
780
|
+
@id = args[:id] if args.key?(:id)
|
781
|
+
@image_url = args[:image_url] if args.key?(:image_url)
|
782
|
+
@is_default_image_url = args[:is_default_image_url] if args.key?(:is_default_image_url)
|
783
|
+
@kind = args[:kind] if args.key?(:kind)
|
784
|
+
@visibility = args[:visibility] if args.key?(:visibility)
|
785
|
+
end
|
786
|
+
end
|
787
|
+
|
788
|
+
# A ListDefinitions response.
|
789
|
+
class ListEventDefinitionResponse
|
790
|
+
include Google::Apis::Core::Hashable
|
791
|
+
|
792
|
+
# The event definitions.
|
793
|
+
# Corresponds to the JSON property `items`
|
794
|
+
# @return [Array<Google::Apis::GamesV1::EventDefinition>]
|
795
|
+
attr_accessor :items
|
796
|
+
|
797
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
798
|
+
# string `games#eventDefinitionListResponse`.
|
799
|
+
# Corresponds to the JSON property `kind`
|
800
|
+
# @return [String]
|
801
|
+
attr_accessor :kind
|
802
|
+
|
803
|
+
# The pagination token for the next page of results.
|
804
|
+
# Corresponds to the JSON property `nextPageToken`
|
805
|
+
# @return [String]
|
806
|
+
attr_accessor :next_page_token
|
807
|
+
|
808
|
+
def initialize(**args)
|
809
|
+
update!(**args)
|
810
|
+
end
|
811
|
+
|
812
|
+
# Update properties of this object
|
813
|
+
def update!(**args)
|
814
|
+
@items = args[:items] if args.key?(:items)
|
815
|
+
@kind = args[:kind] if args.key?(:kind)
|
816
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
817
|
+
end
|
818
|
+
end
|
819
|
+
|
820
|
+
# An event period time range.
|
821
|
+
class EventPeriodRange
|
822
|
+
include Google::Apis::Core::Hashable
|
823
|
+
|
824
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
825
|
+
# string `games#eventPeriodRange`.
|
826
|
+
# Corresponds to the JSON property `kind`
|
827
|
+
# @return [String]
|
828
|
+
attr_accessor :kind
|
829
|
+
|
830
|
+
# The time when this update period ends, in millis, since 1970 UTC (Unix Epoch).
|
831
|
+
# Corresponds to the JSON property `periodEndMillis`
|
832
|
+
# @return [Fixnum]
|
833
|
+
attr_accessor :period_end_millis
|
834
|
+
|
835
|
+
# The time when this update period begins, in millis, since 1970 UTC (Unix Epoch)
|
836
|
+
# .
|
837
|
+
# Corresponds to the JSON property `periodStartMillis`
|
838
|
+
# @return [Fixnum]
|
839
|
+
attr_accessor :period_start_millis
|
840
|
+
|
841
|
+
def initialize(**args)
|
842
|
+
update!(**args)
|
843
|
+
end
|
844
|
+
|
845
|
+
# Update properties of this object
|
846
|
+
def update!(**args)
|
847
|
+
@kind = args[:kind] if args.key?(:kind)
|
848
|
+
@period_end_millis = args[:period_end_millis] if args.key?(:period_end_millis)
|
849
|
+
@period_start_millis = args[:period_start_millis] if args.key?(:period_start_millis)
|
850
|
+
end
|
851
|
+
end
|
852
|
+
|
853
|
+
# An event period update resource.
|
854
|
+
class EventPeriodUpdate
|
855
|
+
include Google::Apis::Core::Hashable
|
856
|
+
|
857
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
858
|
+
# string `games#eventPeriodUpdate`.
|
859
|
+
# Corresponds to the JSON property `kind`
|
860
|
+
# @return [String]
|
861
|
+
attr_accessor :kind
|
862
|
+
|
863
|
+
# An event period time range.
|
864
|
+
# Corresponds to the JSON property `timePeriod`
|
865
|
+
# @return [Google::Apis::GamesV1::EventPeriodRange]
|
866
|
+
attr_accessor :time_period
|
867
|
+
|
868
|
+
# The updates being made for this time period.
|
869
|
+
# Corresponds to the JSON property `updates`
|
870
|
+
# @return [Array<Google::Apis::GamesV1::UpdateEventRequest>]
|
871
|
+
attr_accessor :updates
|
872
|
+
|
873
|
+
def initialize(**args)
|
874
|
+
update!(**args)
|
875
|
+
end
|
876
|
+
|
877
|
+
# Update properties of this object
|
878
|
+
def update!(**args)
|
879
|
+
@kind = args[:kind] if args.key?(:kind)
|
880
|
+
@time_period = args[:time_period] if args.key?(:time_period)
|
881
|
+
@updates = args[:updates] if args.key?(:updates)
|
882
|
+
end
|
883
|
+
end
|
884
|
+
|
885
|
+
# An event update failure resource.
|
886
|
+
class EventRecordFailure
|
887
|
+
include Google::Apis::Core::Hashable
|
888
|
+
|
889
|
+
# The ID of the event that was not updated.
|
890
|
+
# Corresponds to the JSON property `eventId`
|
891
|
+
# @return [String]
|
892
|
+
attr_accessor :event_id
|
893
|
+
|
894
|
+
# The cause for the update failure.
|
895
|
+
# Corresponds to the JSON property `failureCause`
|
896
|
+
# @return [String]
|
897
|
+
attr_accessor :failure_cause
|
898
|
+
|
899
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
900
|
+
# string `games#eventRecordFailure`.
|
901
|
+
# Corresponds to the JSON property `kind`
|
902
|
+
# @return [String]
|
903
|
+
attr_accessor :kind
|
904
|
+
|
905
|
+
def initialize(**args)
|
906
|
+
update!(**args)
|
907
|
+
end
|
908
|
+
|
909
|
+
# Update properties of this object
|
910
|
+
def update!(**args)
|
911
|
+
@event_id = args[:event_id] if args.key?(:event_id)
|
912
|
+
@failure_cause = args[:failure_cause] if args.key?(:failure_cause)
|
913
|
+
@kind = args[:kind] if args.key?(:kind)
|
914
|
+
end
|
915
|
+
end
|
916
|
+
|
917
|
+
# An event period update resource.
|
918
|
+
class EventRecordRequest
|
919
|
+
include Google::Apis::Core::Hashable
|
920
|
+
|
921
|
+
# The current time when this update was sent, in milliseconds, since 1970 UTC (
|
922
|
+
# Unix Epoch).
|
923
|
+
# Corresponds to the JSON property `currentTimeMillis`
|
924
|
+
# @return [Fixnum]
|
925
|
+
attr_accessor :current_time_millis
|
926
|
+
|
927
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
928
|
+
# string `games#eventRecordRequest`.
|
929
|
+
# Corresponds to the JSON property `kind`
|
930
|
+
# @return [String]
|
931
|
+
attr_accessor :kind
|
932
|
+
|
933
|
+
# The request ID used to identify this attempt to record events.
|
934
|
+
# Corresponds to the JSON property `requestId`
|
935
|
+
# @return [Fixnum]
|
936
|
+
attr_accessor :request_id
|
937
|
+
|
938
|
+
# A list of the time period updates being made in this request.
|
939
|
+
# Corresponds to the JSON property `timePeriods`
|
940
|
+
# @return [Array<Google::Apis::GamesV1::EventPeriodUpdate>]
|
941
|
+
attr_accessor :time_periods
|
942
|
+
|
943
|
+
def initialize(**args)
|
944
|
+
update!(**args)
|
945
|
+
end
|
946
|
+
|
947
|
+
# Update properties of this object
|
948
|
+
def update!(**args)
|
949
|
+
@current_time_millis = args[:current_time_millis] if args.key?(:current_time_millis)
|
950
|
+
@kind = args[:kind] if args.key?(:kind)
|
951
|
+
@request_id = args[:request_id] if args.key?(:request_id)
|
952
|
+
@time_periods = args[:time_periods] if args.key?(:time_periods)
|
953
|
+
end
|
954
|
+
end
|
955
|
+
|
956
|
+
# An event period update resource.
|
957
|
+
class UpdateEventRequest
|
958
|
+
include Google::Apis::Core::Hashable
|
959
|
+
|
960
|
+
# The ID of the event being modified in this update.
|
961
|
+
# Corresponds to the JSON property `definitionId`
|
962
|
+
# @return [String]
|
963
|
+
attr_accessor :definition_id
|
964
|
+
|
965
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
966
|
+
# string `games#eventUpdateRequest`.
|
967
|
+
# Corresponds to the JSON property `kind`
|
968
|
+
# @return [String]
|
969
|
+
attr_accessor :kind
|
970
|
+
|
971
|
+
# The number of times this event occurred in this time period.
|
972
|
+
# Corresponds to the JSON property `updateCount`
|
973
|
+
# @return [Fixnum]
|
974
|
+
attr_accessor :update_count
|
975
|
+
|
976
|
+
def initialize(**args)
|
977
|
+
update!(**args)
|
978
|
+
end
|
979
|
+
|
980
|
+
# Update properties of this object
|
981
|
+
def update!(**args)
|
982
|
+
@definition_id = args[:definition_id] if args.key?(:definition_id)
|
983
|
+
@kind = args[:kind] if args.key?(:kind)
|
984
|
+
@update_count = args[:update_count] if args.key?(:update_count)
|
985
|
+
end
|
986
|
+
end
|
987
|
+
|
988
|
+
# An event period update resource.
|
989
|
+
class UpdateEventResponse
|
990
|
+
include Google::Apis::Core::Hashable
|
991
|
+
|
992
|
+
# Any batch-wide failures which occurred applying updates.
|
993
|
+
# Corresponds to the JSON property `batchFailures`
|
994
|
+
# @return [Array<Google::Apis::GamesV1::EventBatchRecordFailure>]
|
995
|
+
attr_accessor :batch_failures
|
996
|
+
|
997
|
+
# Any failures updating a particular event.
|
998
|
+
# Corresponds to the JSON property `eventFailures`
|
999
|
+
# @return [Array<Google::Apis::GamesV1::EventRecordFailure>]
|
1000
|
+
attr_accessor :event_failures
|
1001
|
+
|
1002
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1003
|
+
# string `games#eventUpdateResponse`.
|
1004
|
+
# Corresponds to the JSON property `kind`
|
1005
|
+
# @return [String]
|
1006
|
+
attr_accessor :kind
|
1007
|
+
|
1008
|
+
# The current status of any updated events
|
1009
|
+
# Corresponds to the JSON property `playerEvents`
|
1010
|
+
# @return [Array<Google::Apis::GamesV1::PlayerEvent>]
|
1011
|
+
attr_accessor :player_events
|
1012
|
+
|
1013
|
+
def initialize(**args)
|
1014
|
+
update!(**args)
|
1015
|
+
end
|
1016
|
+
|
1017
|
+
# Update properties of this object
|
1018
|
+
def update!(**args)
|
1019
|
+
@batch_failures = args[:batch_failures] if args.key?(:batch_failures)
|
1020
|
+
@event_failures = args[:event_failures] if args.key?(:event_failures)
|
1021
|
+
@kind = args[:kind] if args.key?(:kind)
|
1022
|
+
@player_events = args[:player_events] if args.key?(:player_events)
|
1023
|
+
end
|
1024
|
+
end
|
1025
|
+
|
1026
|
+
# The payload to request to increment an achievement.
|
1027
|
+
class GamesAchievementIncrement
|
1028
|
+
include Google::Apis::Core::Hashable
|
1029
|
+
|
1030
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1031
|
+
# string `games#GamesAchievementIncrement`.
|
1032
|
+
# Corresponds to the JSON property `kind`
|
1033
|
+
# @return [String]
|
1034
|
+
attr_accessor :kind
|
1035
|
+
|
1036
|
+
# The requestId associated with an increment to an achievement.
|
1037
|
+
# Corresponds to the JSON property `requestId`
|
1038
|
+
# @return [Fixnum]
|
1039
|
+
attr_accessor :request_id
|
1040
|
+
|
1041
|
+
# The number of steps to be incremented.
|
1042
|
+
# Corresponds to the JSON property `steps`
|
1043
|
+
# @return [Fixnum]
|
1044
|
+
attr_accessor :steps
|
1045
|
+
|
1046
|
+
def initialize(**args)
|
1047
|
+
update!(**args)
|
1048
|
+
end
|
1049
|
+
|
1050
|
+
# Update properties of this object
|
1051
|
+
def update!(**args)
|
1052
|
+
@kind = args[:kind] if args.key?(:kind)
|
1053
|
+
@request_id = args[:request_id] if args.key?(:request_id)
|
1054
|
+
@steps = args[:steps] if args.key?(:steps)
|
1055
|
+
end
|
1056
|
+
end
|
1057
|
+
|
1058
|
+
# The payload to request to increment an achievement.
|
1059
|
+
class GamesAchievementSetStepsAtLeast
|
1060
|
+
include Google::Apis::Core::Hashable
|
1061
|
+
|
1062
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1063
|
+
# string `games#GamesAchievementSetStepsAtLeast`.
|
1064
|
+
# Corresponds to the JSON property `kind`
|
1065
|
+
# @return [String]
|
1066
|
+
attr_accessor :kind
|
1067
|
+
|
1068
|
+
# The minimum number of steps for the achievement to be set to.
|
1069
|
+
# Corresponds to the JSON property `steps`
|
1070
|
+
# @return [Fixnum]
|
1071
|
+
attr_accessor :steps
|
1072
|
+
|
1073
|
+
def initialize(**args)
|
1074
|
+
update!(**args)
|
1075
|
+
end
|
1076
|
+
|
1077
|
+
# Update properties of this object
|
1078
|
+
def update!(**args)
|
1079
|
+
@kind = args[:kind] if args.key?(:kind)
|
1080
|
+
@steps = args[:steps] if args.key?(:steps)
|
1081
|
+
end
|
1082
|
+
end
|
1083
|
+
|
1084
|
+
# An image asset object.
|
1085
|
+
class ImageAsset
|
1086
|
+
include Google::Apis::Core::Hashable
|
1087
|
+
|
1088
|
+
# The height of the asset.
|
1089
|
+
# Corresponds to the JSON property `height`
|
1090
|
+
# @return [Fixnum]
|
1091
|
+
attr_accessor :height
|
1092
|
+
|
1093
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1094
|
+
# string `games#imageAsset`.
|
1095
|
+
# Corresponds to the JSON property `kind`
|
1096
|
+
# @return [String]
|
1097
|
+
attr_accessor :kind
|
1098
|
+
|
1099
|
+
# The name of the asset.
|
1100
|
+
# Corresponds to the JSON property `name`
|
1101
|
+
# @return [String]
|
1102
|
+
attr_accessor :name
|
1103
|
+
|
1104
|
+
# The URL of the asset.
|
1105
|
+
# Corresponds to the JSON property `url`
|
1106
|
+
# @return [String]
|
1107
|
+
attr_accessor :url
|
1108
|
+
|
1109
|
+
# The width of the asset.
|
1110
|
+
# Corresponds to the JSON property `width`
|
1111
|
+
# @return [Fixnum]
|
1112
|
+
attr_accessor :width
|
1113
|
+
|
1114
|
+
def initialize(**args)
|
1115
|
+
update!(**args)
|
1116
|
+
end
|
1117
|
+
|
1118
|
+
# Update properties of this object
|
1119
|
+
def update!(**args)
|
1120
|
+
@height = args[:height] if args.key?(:height)
|
1121
|
+
@kind = args[:kind] if args.key?(:kind)
|
1122
|
+
@name = args[:name] if args.key?(:name)
|
1123
|
+
@url = args[:url] if args.key?(:url)
|
1124
|
+
@width = args[:width] if args.key?(:width)
|
1125
|
+
end
|
1126
|
+
end
|
1127
|
+
|
1128
|
+
# The Instance resource.
|
1129
|
+
class Instance
|
1130
|
+
include Google::Apis::Core::Hashable
|
1131
|
+
|
1132
|
+
# URI which shows where a user can acquire this instance.
|
1133
|
+
# Corresponds to the JSON property `acquisitionUri`
|
1134
|
+
# @return [String]
|
1135
|
+
attr_accessor :acquisition_uri
|
1136
|
+
|
1137
|
+
# The Android instance details resource.
|
1138
|
+
# Corresponds to the JSON property `androidInstance`
|
1139
|
+
# @return [Google::Apis::GamesV1::InstanceAndroidDetails]
|
1140
|
+
attr_accessor :android_instance
|
1141
|
+
|
1142
|
+
# The iOS details resource.
|
1143
|
+
# Corresponds to the JSON property `iosInstance`
|
1144
|
+
# @return [Google::Apis::GamesV1::InstanceIosDetails]
|
1145
|
+
attr_accessor :ios_instance
|
1146
|
+
|
1147
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1148
|
+
# string `games#instance`.
|
1149
|
+
# Corresponds to the JSON property `kind`
|
1150
|
+
# @return [String]
|
1151
|
+
attr_accessor :kind
|
1152
|
+
|
1153
|
+
# Localized display name.
|
1154
|
+
# Corresponds to the JSON property `name`
|
1155
|
+
# @return [String]
|
1156
|
+
attr_accessor :name
|
1157
|
+
|
1158
|
+
# The platform type.
|
1159
|
+
# Corresponds to the JSON property `platformType`
|
1160
|
+
# @return [String]
|
1161
|
+
attr_accessor :platform_type
|
1162
|
+
|
1163
|
+
# Flag to show if this game instance supports realtime play.
|
1164
|
+
# Corresponds to the JSON property `realtimePlay`
|
1165
|
+
# @return [Boolean]
|
1166
|
+
attr_accessor :realtime_play
|
1167
|
+
alias_method :realtime_play?, :realtime_play
|
1168
|
+
|
1169
|
+
# Flag to show if this game instance supports turn based play.
|
1170
|
+
# Corresponds to the JSON property `turnBasedPlay`
|
1171
|
+
# @return [Boolean]
|
1172
|
+
attr_accessor :turn_based_play
|
1173
|
+
alias_method :turn_based_play?, :turn_based_play
|
1174
|
+
|
1175
|
+
# The Web details resource.
|
1176
|
+
# Corresponds to the JSON property `webInstance`
|
1177
|
+
# @return [Google::Apis::GamesV1::InstanceWebDetails]
|
1178
|
+
attr_accessor :web_instance
|
1179
|
+
|
1180
|
+
def initialize(**args)
|
1181
|
+
update!(**args)
|
1182
|
+
end
|
1183
|
+
|
1184
|
+
# Update properties of this object
|
1185
|
+
def update!(**args)
|
1186
|
+
@acquisition_uri = args[:acquisition_uri] if args.key?(:acquisition_uri)
|
1187
|
+
@android_instance = args[:android_instance] if args.key?(:android_instance)
|
1188
|
+
@ios_instance = args[:ios_instance] if args.key?(:ios_instance)
|
1189
|
+
@kind = args[:kind] if args.key?(:kind)
|
1190
|
+
@name = args[:name] if args.key?(:name)
|
1191
|
+
@platform_type = args[:platform_type] if args.key?(:platform_type)
|
1192
|
+
@realtime_play = args[:realtime_play] if args.key?(:realtime_play)
|
1193
|
+
@turn_based_play = args[:turn_based_play] if args.key?(:turn_based_play)
|
1194
|
+
@web_instance = args[:web_instance] if args.key?(:web_instance)
|
1195
|
+
end
|
1196
|
+
end
|
1197
|
+
|
1198
|
+
# The Android instance details resource.
|
1199
|
+
class InstanceAndroidDetails
|
1200
|
+
include Google::Apis::Core::Hashable
|
1201
|
+
|
1202
|
+
# Flag indicating whether the anti-piracy check is enabled.
|
1203
|
+
# Corresponds to the JSON property `enablePiracyCheck`
|
1204
|
+
# @return [Boolean]
|
1205
|
+
attr_accessor :enable_piracy_check
|
1206
|
+
alias_method :enable_piracy_check?, :enable_piracy_check
|
1207
|
+
|
1208
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1209
|
+
# string `games#instanceAndroidDetails`.
|
1210
|
+
# Corresponds to the JSON property `kind`
|
1211
|
+
# @return [String]
|
1212
|
+
attr_accessor :kind
|
1213
|
+
|
1214
|
+
# Android package name which maps to Google Play URL.
|
1215
|
+
# Corresponds to the JSON property `packageName`
|
1216
|
+
# @return [String]
|
1217
|
+
attr_accessor :package_name
|
1218
|
+
|
1219
|
+
# Indicates that this instance is the default for new installations.
|
1220
|
+
# Corresponds to the JSON property `preferred`
|
1221
|
+
# @return [Boolean]
|
1222
|
+
attr_accessor :preferred
|
1223
|
+
alias_method :preferred?, :preferred
|
1224
|
+
|
1225
|
+
def initialize(**args)
|
1226
|
+
update!(**args)
|
1227
|
+
end
|
1228
|
+
|
1229
|
+
# Update properties of this object
|
1230
|
+
def update!(**args)
|
1231
|
+
@enable_piracy_check = args[:enable_piracy_check] if args.key?(:enable_piracy_check)
|
1232
|
+
@kind = args[:kind] if args.key?(:kind)
|
1233
|
+
@package_name = args[:package_name] if args.key?(:package_name)
|
1234
|
+
@preferred = args[:preferred] if args.key?(:preferred)
|
1235
|
+
end
|
1236
|
+
end
|
1237
|
+
|
1238
|
+
# The iOS details resource.
|
1239
|
+
class InstanceIosDetails
|
1240
|
+
include Google::Apis::Core::Hashable
|
1241
|
+
|
1242
|
+
# Bundle identifier.
|
1243
|
+
# Corresponds to the JSON property `bundleIdentifier`
|
1244
|
+
# @return [String]
|
1245
|
+
attr_accessor :bundle_identifier
|
1246
|
+
|
1247
|
+
# iTunes App ID.
|
1248
|
+
# Corresponds to the JSON property `itunesAppId`
|
1249
|
+
# @return [String]
|
1250
|
+
attr_accessor :itunes_app_id
|
1251
|
+
|
1252
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1253
|
+
# string `games#instanceIosDetails`.
|
1254
|
+
# Corresponds to the JSON property `kind`
|
1255
|
+
# @return [String]
|
1256
|
+
attr_accessor :kind
|
1257
|
+
|
1258
|
+
# Indicates that this instance is the default for new installations on iPad
|
1259
|
+
# devices.
|
1260
|
+
# Corresponds to the JSON property `preferredForIpad`
|
1261
|
+
# @return [Boolean]
|
1262
|
+
attr_accessor :preferred_for_ipad
|
1263
|
+
alias_method :preferred_for_ipad?, :preferred_for_ipad
|
1264
|
+
|
1265
|
+
# Indicates that this instance is the default for new installations on iPhone
|
1266
|
+
# devices.
|
1267
|
+
# Corresponds to the JSON property `preferredForIphone`
|
1268
|
+
# @return [Boolean]
|
1269
|
+
attr_accessor :preferred_for_iphone
|
1270
|
+
alias_method :preferred_for_iphone?, :preferred_for_iphone
|
1271
|
+
|
1272
|
+
# Flag to indicate if this instance supports iPad.
|
1273
|
+
# Corresponds to the JSON property `supportIpad`
|
1274
|
+
# @return [Boolean]
|
1275
|
+
attr_accessor :support_ipad
|
1276
|
+
alias_method :support_ipad?, :support_ipad
|
1277
|
+
|
1278
|
+
# Flag to indicate if this instance supports iPhone.
|
1279
|
+
# Corresponds to the JSON property `supportIphone`
|
1280
|
+
# @return [Boolean]
|
1281
|
+
attr_accessor :support_iphone
|
1282
|
+
alias_method :support_iphone?, :support_iphone
|
1283
|
+
|
1284
|
+
def initialize(**args)
|
1285
|
+
update!(**args)
|
1286
|
+
end
|
1287
|
+
|
1288
|
+
# Update properties of this object
|
1289
|
+
def update!(**args)
|
1290
|
+
@bundle_identifier = args[:bundle_identifier] if args.key?(:bundle_identifier)
|
1291
|
+
@itunes_app_id = args[:itunes_app_id] if args.key?(:itunes_app_id)
|
1292
|
+
@kind = args[:kind] if args.key?(:kind)
|
1293
|
+
@preferred_for_ipad = args[:preferred_for_ipad] if args.key?(:preferred_for_ipad)
|
1294
|
+
@preferred_for_iphone = args[:preferred_for_iphone] if args.key?(:preferred_for_iphone)
|
1295
|
+
@support_ipad = args[:support_ipad] if args.key?(:support_ipad)
|
1296
|
+
@support_iphone = args[:support_iphone] if args.key?(:support_iphone)
|
1297
|
+
end
|
1298
|
+
end
|
1299
|
+
|
1300
|
+
# The Web details resource.
|
1301
|
+
class InstanceWebDetails
|
1302
|
+
include Google::Apis::Core::Hashable
|
1303
|
+
|
1304
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1305
|
+
# string `games#instanceWebDetails`.
|
1306
|
+
# Corresponds to the JSON property `kind`
|
1307
|
+
# @return [String]
|
1308
|
+
attr_accessor :kind
|
1309
|
+
|
1310
|
+
# Launch URL for the game.
|
1311
|
+
# Corresponds to the JSON property `launchUrl`
|
1312
|
+
# @return [String]
|
1313
|
+
attr_accessor :launch_url
|
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
|
+
@kind = args[:kind] if args.key?(:kind)
|
1328
|
+
@launch_url = args[:launch_url] if args.key?(:launch_url)
|
1329
|
+
@preferred = args[:preferred] if args.key?(:preferred)
|
1330
|
+
end
|
1331
|
+
end
|
1332
|
+
|
1333
|
+
# The Leaderboard resource.
|
1334
|
+
class Leaderboard
|
1335
|
+
include Google::Apis::Core::Hashable
|
1336
|
+
|
1337
|
+
# The icon for the leaderboard.
|
1338
|
+
# Corresponds to the JSON property `iconUrl`
|
1339
|
+
# @return [String]
|
1340
|
+
attr_accessor :icon_url
|
1341
|
+
|
1342
|
+
# The leaderboard ID.
|
1343
|
+
# Corresponds to the JSON property `id`
|
1344
|
+
# @return [String]
|
1345
|
+
attr_accessor :id
|
1346
|
+
|
1347
|
+
# Indicates whether the icon image being returned is a default image, or is game-
|
1348
|
+
# provided.
|
1349
|
+
# Corresponds to the JSON property `isIconUrlDefault`
|
1350
|
+
# @return [Boolean]
|
1351
|
+
attr_accessor :is_icon_url_default
|
1352
|
+
alias_method :is_icon_url_default?, :is_icon_url_default
|
1353
|
+
|
1354
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1355
|
+
# string `games#leaderboard`.
|
1356
|
+
# Corresponds to the JSON property `kind`
|
1357
|
+
# @return [String]
|
1358
|
+
attr_accessor :kind
|
1359
|
+
|
1360
|
+
# The name of the leaderboard.
|
1361
|
+
# Corresponds to the JSON property `name`
|
1362
|
+
# @return [String]
|
1363
|
+
attr_accessor :name
|
1364
|
+
|
1365
|
+
# How scores are ordered.
|
1366
|
+
# Corresponds to the JSON property `order`
|
1367
|
+
# @return [String]
|
1368
|
+
attr_accessor :order
|
1369
|
+
|
1370
|
+
def initialize(**args)
|
1371
|
+
update!(**args)
|
1372
|
+
end
|
1373
|
+
|
1374
|
+
# Update properties of this object
|
1375
|
+
def update!(**args)
|
1376
|
+
@icon_url = args[:icon_url] if args.key?(:icon_url)
|
1377
|
+
@id = args[:id] if args.key?(:id)
|
1378
|
+
@is_icon_url_default = args[:is_icon_url_default] if args.key?(:is_icon_url_default)
|
1379
|
+
@kind = args[:kind] if args.key?(:kind)
|
1380
|
+
@name = args[:name] if args.key?(:name)
|
1381
|
+
@order = args[:order] if args.key?(:order)
|
1382
|
+
end
|
1383
|
+
end
|
1384
|
+
|
1385
|
+
# The Leaderboard Entry resource.
|
1386
|
+
class LeaderboardEntry
|
1387
|
+
include Google::Apis::Core::Hashable
|
1388
|
+
|
1389
|
+
# The localized string for the numerical value of this score.
|
1390
|
+
# Corresponds to the JSON property `formattedScore`
|
1391
|
+
# @return [String]
|
1392
|
+
attr_accessor :formatted_score
|
1393
|
+
|
1394
|
+
# The localized string for the rank of this score for this leaderboard.
|
1395
|
+
# Corresponds to the JSON property `formattedScoreRank`
|
1396
|
+
# @return [String]
|
1397
|
+
attr_accessor :formatted_score_rank
|
1398
|
+
|
1399
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1400
|
+
# string `games#leaderboardEntry`.
|
1401
|
+
# Corresponds to the JSON property `kind`
|
1402
|
+
# @return [String]
|
1403
|
+
attr_accessor :kind
|
1404
|
+
|
1405
|
+
# A Player resource.
|
1406
|
+
# Corresponds to the JSON property `player`
|
1407
|
+
# @return [Google::Apis::GamesV1::Player]
|
1408
|
+
attr_accessor :player
|
1409
|
+
|
1410
|
+
# The rank of this score for this leaderboard.
|
1411
|
+
# Corresponds to the JSON property `scoreRank`
|
1412
|
+
# @return [Fixnum]
|
1413
|
+
attr_accessor :score_rank
|
1414
|
+
|
1415
|
+
# Additional information about the score. Values must contain no more than 64
|
1416
|
+
# URI-safe characters as defined by section 2.3 of RFC 3986.
|
1417
|
+
# Corresponds to the JSON property `scoreTag`
|
1418
|
+
# @return [String]
|
1419
|
+
attr_accessor :score_tag
|
1420
|
+
|
1421
|
+
# The numerical value of this score.
|
1422
|
+
# Corresponds to the JSON property `scoreValue`
|
1423
|
+
# @return [Fixnum]
|
1424
|
+
attr_accessor :score_value
|
1425
|
+
|
1426
|
+
# The time span of this high score.
|
1427
|
+
# Corresponds to the JSON property `timeSpan`
|
1428
|
+
# @return [String]
|
1429
|
+
attr_accessor :time_span
|
1430
|
+
|
1431
|
+
# The timestamp at which this score was recorded, in milliseconds since the
|
1432
|
+
# epoch in UTC.
|
1433
|
+
# Corresponds to the JSON property `writeTimestampMillis`
|
1434
|
+
# @return [Fixnum]
|
1435
|
+
attr_accessor :write_timestamp_millis
|
1436
|
+
|
1437
|
+
def initialize(**args)
|
1438
|
+
update!(**args)
|
1439
|
+
end
|
1440
|
+
|
1441
|
+
# Update properties of this object
|
1442
|
+
def update!(**args)
|
1443
|
+
@formatted_score = args[:formatted_score] if args.key?(:formatted_score)
|
1444
|
+
@formatted_score_rank = args[:formatted_score_rank] if args.key?(:formatted_score_rank)
|
1445
|
+
@kind = args[:kind] if args.key?(:kind)
|
1446
|
+
@player = args[:player] if args.key?(:player)
|
1447
|
+
@score_rank = args[:score_rank] if args.key?(:score_rank)
|
1448
|
+
@score_tag = args[:score_tag] if args.key?(:score_tag)
|
1449
|
+
@score_value = args[:score_value] if args.key?(:score_value)
|
1450
|
+
@time_span = args[:time_span] if args.key?(:time_span)
|
1451
|
+
@write_timestamp_millis = args[:write_timestamp_millis] if args.key?(:write_timestamp_millis)
|
1452
|
+
end
|
1453
|
+
end
|
1454
|
+
|
1455
|
+
# A list of leaderboard objects.
|
1456
|
+
class ListLeaderboardResponse
|
1457
|
+
include Google::Apis::Core::Hashable
|
1458
|
+
|
1459
|
+
# The leaderboards.
|
1460
|
+
# Corresponds to the JSON property `items`
|
1461
|
+
# @return [Array<Google::Apis::GamesV1::Leaderboard>]
|
1462
|
+
attr_accessor :items
|
1463
|
+
|
1464
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1465
|
+
# string `games#leaderboardListResponse`.
|
1466
|
+
# Corresponds to the JSON property `kind`
|
1467
|
+
# @return [String]
|
1468
|
+
attr_accessor :kind
|
1469
|
+
|
1470
|
+
# Token corresponding to the next page of results.
|
1471
|
+
# Corresponds to the JSON property `nextPageToken`
|
1472
|
+
# @return [String]
|
1473
|
+
attr_accessor :next_page_token
|
1474
|
+
|
1475
|
+
def initialize(**args)
|
1476
|
+
update!(**args)
|
1477
|
+
end
|
1478
|
+
|
1479
|
+
# Update properties of this object
|
1480
|
+
def update!(**args)
|
1481
|
+
@items = args[:items] if args.key?(:items)
|
1482
|
+
@kind = args[:kind] if args.key?(:kind)
|
1483
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1484
|
+
end
|
1485
|
+
end
|
1486
|
+
|
1487
|
+
# A score rank in a leaderboard.
|
1488
|
+
class LeaderboardScoreRank
|
1489
|
+
include Google::Apis::Core::Hashable
|
1490
|
+
|
1491
|
+
# The number of scores in the leaderboard as a string.
|
1492
|
+
# Corresponds to the JSON property `formattedNumScores`
|
1493
|
+
# @return [String]
|
1494
|
+
attr_accessor :formatted_num_scores
|
1495
|
+
|
1496
|
+
# The rank in the leaderboard as a string.
|
1497
|
+
# Corresponds to the JSON property `formattedRank`
|
1498
|
+
# @return [String]
|
1499
|
+
attr_accessor :formatted_rank
|
1500
|
+
|
1501
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1502
|
+
# string `games#leaderboardScoreRank`.
|
1503
|
+
# Corresponds to the JSON property `kind`
|
1504
|
+
# @return [String]
|
1505
|
+
attr_accessor :kind
|
1506
|
+
|
1507
|
+
# The number of scores in the leaderboard.
|
1508
|
+
# Corresponds to the JSON property `numScores`
|
1509
|
+
# @return [Fixnum]
|
1510
|
+
attr_accessor :num_scores
|
1511
|
+
|
1512
|
+
# The rank in the leaderboard.
|
1513
|
+
# Corresponds to the JSON property `rank`
|
1514
|
+
# @return [Fixnum]
|
1515
|
+
attr_accessor :rank
|
1516
|
+
|
1517
|
+
def initialize(**args)
|
1518
|
+
update!(**args)
|
1519
|
+
end
|
1520
|
+
|
1521
|
+
# Update properties of this object
|
1522
|
+
def update!(**args)
|
1523
|
+
@formatted_num_scores = args[:formatted_num_scores] if args.key?(:formatted_num_scores)
|
1524
|
+
@formatted_rank = args[:formatted_rank] if args.key?(:formatted_rank)
|
1525
|
+
@kind = args[:kind] if args.key?(:kind)
|
1526
|
+
@num_scores = args[:num_scores] if args.key?(:num_scores)
|
1527
|
+
@rank = args[:rank] if args.key?(:rank)
|
1528
|
+
end
|
1529
|
+
end
|
1530
|
+
|
1531
|
+
# A ListScores response.
|
1532
|
+
class LeaderboardScores
|
1533
|
+
include Google::Apis::Core::Hashable
|
1534
|
+
|
1535
|
+
# The scores in the leaderboard.
|
1536
|
+
# Corresponds to the JSON property `items`
|
1537
|
+
# @return [Array<Google::Apis::GamesV1::LeaderboardEntry>]
|
1538
|
+
attr_accessor :items
|
1539
|
+
|
1540
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1541
|
+
# string `games#leaderboardScores`.
|
1542
|
+
# Corresponds to the JSON property `kind`
|
1543
|
+
# @return [String]
|
1544
|
+
attr_accessor :kind
|
1545
|
+
|
1546
|
+
# The pagination token for the next page of results.
|
1547
|
+
# Corresponds to the JSON property `nextPageToken`
|
1548
|
+
# @return [String]
|
1549
|
+
attr_accessor :next_page_token
|
1550
|
+
|
1551
|
+
# The total number of scores in the leaderboard.
|
1552
|
+
# Corresponds to the JSON property `numScores`
|
1553
|
+
# @return [Fixnum]
|
1554
|
+
attr_accessor :num_scores
|
1555
|
+
|
1556
|
+
# The Leaderboard Entry resource.
|
1557
|
+
# Corresponds to the JSON property `playerScore`
|
1558
|
+
# @return [Google::Apis::GamesV1::LeaderboardEntry]
|
1559
|
+
attr_accessor :player_score
|
1560
|
+
|
1561
|
+
# The pagination token for the previous page of results.
|
1562
|
+
# Corresponds to the JSON property `prevPageToken`
|
1563
|
+
# @return [String]
|
1564
|
+
attr_accessor :prev_page_token
|
1565
|
+
|
1566
|
+
def initialize(**args)
|
1567
|
+
update!(**args)
|
1568
|
+
end
|
1569
|
+
|
1570
|
+
# Update properties of this object
|
1571
|
+
def update!(**args)
|
1572
|
+
@items = args[:items] if args.key?(:items)
|
1573
|
+
@kind = args[:kind] if args.key?(:kind)
|
1574
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1575
|
+
@num_scores = args[:num_scores] if args.key?(:num_scores)
|
1576
|
+
@player_score = args[:player_score] if args.key?(:player_score)
|
1577
|
+
@prev_page_token = args[:prev_page_token] if args.key?(:prev_page_token)
|
1578
|
+
end
|
1579
|
+
end
|
1580
|
+
|
1581
|
+
# The metagame config resource
|
1582
|
+
class MetagameConfig
|
1583
|
+
include Google::Apis::Core::Hashable
|
1584
|
+
|
1585
|
+
# Current version of the metagame configuration data. When this data is updated,
|
1586
|
+
# the version number will be increased by one.
|
1587
|
+
# Corresponds to the JSON property `currentVersion`
|
1588
|
+
# @return [Fixnum]
|
1589
|
+
attr_accessor :current_version
|
1590
|
+
|
1591
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1592
|
+
# string `games#metagameConfig`.
|
1593
|
+
# Corresponds to the JSON property `kind`
|
1594
|
+
# @return [String]
|
1595
|
+
attr_accessor :kind
|
1596
|
+
|
1597
|
+
# The list of player levels.
|
1598
|
+
# Corresponds to the JSON property `playerLevels`
|
1599
|
+
# @return [Array<Google::Apis::GamesV1::PlayerLevel>]
|
1600
|
+
attr_accessor :player_levels
|
1601
|
+
|
1602
|
+
def initialize(**args)
|
1603
|
+
update!(**args)
|
1604
|
+
end
|
1605
|
+
|
1606
|
+
# Update properties of this object
|
1607
|
+
def update!(**args)
|
1608
|
+
@current_version = args[:current_version] if args.key?(:current_version)
|
1609
|
+
@kind = args[:kind] if args.key?(:kind)
|
1610
|
+
@player_levels = args[:player_levels] if args.key?(:player_levels)
|
1611
|
+
end
|
1612
|
+
end
|
1613
|
+
|
1614
|
+
# A Player resource.
|
1615
|
+
class Player
|
1616
|
+
include Google::Apis::Core::Hashable
|
1617
|
+
|
1618
|
+
# The base URL for the image that represents the player.
|
1619
|
+
# Corresponds to the JSON property `avatarImageUrl`
|
1620
|
+
# @return [String]
|
1621
|
+
attr_accessor :avatar_image_url
|
1622
|
+
|
1623
|
+
# The url to the landscape mode player banner image.
|
1624
|
+
# Corresponds to the JSON property `bannerUrlLandscape`
|
1625
|
+
# @return [String]
|
1626
|
+
attr_accessor :banner_url_landscape
|
1627
|
+
|
1628
|
+
# The url to the portrait mode player banner image.
|
1629
|
+
# Corresponds to the JSON property `bannerUrlPortrait`
|
1630
|
+
# @return [String]
|
1631
|
+
attr_accessor :banner_url_portrait
|
1632
|
+
|
1633
|
+
# The name to display for the player.
|
1634
|
+
# Corresponds to the JSON property `displayName`
|
1635
|
+
# @return [String]
|
1636
|
+
attr_accessor :display_name
|
1637
|
+
|
1638
|
+
# 1P/3P metadata about the player's experience.
|
1639
|
+
# Corresponds to the JSON property `experienceInfo`
|
1640
|
+
# @return [Google::Apis::GamesV1::PlayerExperienceInfo]
|
1641
|
+
attr_accessor :experience_info
|
1642
|
+
|
1643
|
+
# The friend status of the given player, relative to the requester. This is
|
1644
|
+
# unset if the player is not sharing their friends list with the game.
|
1645
|
+
# Corresponds to the JSON property `friendStatus`
|
1646
|
+
# @return [String]
|
1647
|
+
attr_accessor :friend_status
|
1648
|
+
|
1649
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1650
|
+
# string `games#player`
|
1651
|
+
# Corresponds to the JSON property `kind`
|
1652
|
+
# @return [String]
|
1653
|
+
attr_accessor :kind
|
1654
|
+
|
1655
|
+
# A representation of the individual components of the name.
|
1656
|
+
# Corresponds to the JSON property `name`
|
1657
|
+
# @return [Google::Apis::GamesV1::Player::Name]
|
1658
|
+
attr_accessor :name
|
1659
|
+
|
1660
|
+
# The player ID that was used for this player the first time they signed into
|
1661
|
+
# the game in question. This is only populated for calls to player.get for the
|
1662
|
+
# requesting player, only if the player ID has subsequently changed, and only to
|
1663
|
+
# clients that support remapping player IDs.
|
1664
|
+
# Corresponds to the JSON property `originalPlayerId`
|
1665
|
+
# @return [String]
|
1666
|
+
attr_accessor :original_player_id
|
1667
|
+
|
1668
|
+
# The ID of the player.
|
1669
|
+
# Corresponds to the JSON property `playerId`
|
1670
|
+
# @return [String]
|
1671
|
+
attr_accessor :player_id
|
1672
|
+
|
1673
|
+
# Profile settings
|
1674
|
+
# Corresponds to the JSON property `profileSettings`
|
1675
|
+
# @return [Google::Apis::GamesV1::ProfileSettings]
|
1676
|
+
attr_accessor :profile_settings
|
1677
|
+
|
1678
|
+
# The player's title rewarded for their game activities.
|
1679
|
+
# Corresponds to the JSON property `title`
|
1680
|
+
# @return [String]
|
1681
|
+
attr_accessor :title
|
1682
|
+
|
1683
|
+
def initialize(**args)
|
1684
|
+
update!(**args)
|
1685
|
+
end
|
1686
|
+
|
1687
|
+
# Update properties of this object
|
1688
|
+
def update!(**args)
|
1689
|
+
@avatar_image_url = args[:avatar_image_url] if args.key?(:avatar_image_url)
|
1690
|
+
@banner_url_landscape = args[:banner_url_landscape] if args.key?(:banner_url_landscape)
|
1691
|
+
@banner_url_portrait = args[:banner_url_portrait] if args.key?(:banner_url_portrait)
|
1692
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
1693
|
+
@experience_info = args[:experience_info] if args.key?(:experience_info)
|
1694
|
+
@friend_status = args[:friend_status] if args.key?(:friend_status)
|
1695
|
+
@kind = args[:kind] if args.key?(:kind)
|
1696
|
+
@name = args[:name] if args.key?(:name)
|
1697
|
+
@original_player_id = args[:original_player_id] if args.key?(:original_player_id)
|
1698
|
+
@player_id = args[:player_id] if args.key?(:player_id)
|
1699
|
+
@profile_settings = args[:profile_settings] if args.key?(:profile_settings)
|
1700
|
+
@title = args[:title] if args.key?(:title)
|
1701
|
+
end
|
1702
|
+
|
1703
|
+
# A representation of the individual components of the name.
|
1704
|
+
class Name
|
1705
|
+
include Google::Apis::Core::Hashable
|
1706
|
+
|
1707
|
+
# The family name of this player. In some places, this is known as the last name.
|
1708
|
+
# Corresponds to the JSON property `familyName`
|
1709
|
+
# @return [String]
|
1710
|
+
attr_accessor :family_name
|
1711
|
+
|
1712
|
+
# The given name of this player. In some places, this is known as the first name.
|
1713
|
+
# Corresponds to the JSON property `givenName`
|
1714
|
+
# @return [String]
|
1715
|
+
attr_accessor :given_name
|
1716
|
+
|
1717
|
+
def initialize(**args)
|
1718
|
+
update!(**args)
|
1719
|
+
end
|
1720
|
+
|
1721
|
+
# Update properties of this object
|
1722
|
+
def update!(**args)
|
1723
|
+
@family_name = args[:family_name] if args.key?(:family_name)
|
1724
|
+
@given_name = args[:given_name] if args.key?(:given_name)
|
1725
|
+
end
|
1726
|
+
end
|
1727
|
+
end
|
1728
|
+
|
1729
|
+
# An achievement object.
|
1730
|
+
class PlayerAchievement
|
1731
|
+
include Google::Apis::Core::Hashable
|
1732
|
+
|
1733
|
+
# The state of the achievement.
|
1734
|
+
# Corresponds to the JSON property `achievementState`
|
1735
|
+
# @return [String]
|
1736
|
+
attr_accessor :achievement_state
|
1737
|
+
|
1738
|
+
# The current steps for an incremental achievement.
|
1739
|
+
# Corresponds to the JSON property `currentSteps`
|
1740
|
+
# @return [Fixnum]
|
1741
|
+
attr_accessor :current_steps
|
1742
|
+
|
1743
|
+
# Experience points earned for the achievement. This field is absent for
|
1744
|
+
# achievements that have not yet been unlocked and 0 for achievements that have
|
1745
|
+
# been unlocked by testers but that are unpublished.
|
1746
|
+
# Corresponds to the JSON property `experiencePoints`
|
1747
|
+
# @return [Fixnum]
|
1748
|
+
attr_accessor :experience_points
|
1749
|
+
|
1750
|
+
# The current steps for an incremental achievement as a string.
|
1751
|
+
# Corresponds to the JSON property `formattedCurrentStepsString`
|
1752
|
+
# @return [String]
|
1753
|
+
attr_accessor :formatted_current_steps_string
|
1754
|
+
|
1755
|
+
# The ID of the achievement.
|
1756
|
+
# Corresponds to the JSON property `id`
|
1757
|
+
# @return [String]
|
1758
|
+
attr_accessor :id
|
1759
|
+
|
1760
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1761
|
+
# string `games#playerAchievement`.
|
1762
|
+
# Corresponds to the JSON property `kind`
|
1763
|
+
# @return [String]
|
1764
|
+
attr_accessor :kind
|
1765
|
+
|
1766
|
+
# The timestamp of the last modification to this achievement's state.
|
1767
|
+
# Corresponds to the JSON property `lastUpdatedTimestamp`
|
1768
|
+
# @return [Fixnum]
|
1769
|
+
attr_accessor :last_updated_timestamp
|
1770
|
+
|
1771
|
+
def initialize(**args)
|
1772
|
+
update!(**args)
|
1773
|
+
end
|
1774
|
+
|
1775
|
+
# Update properties of this object
|
1776
|
+
def update!(**args)
|
1777
|
+
@achievement_state = args[:achievement_state] if args.key?(:achievement_state)
|
1778
|
+
@current_steps = args[:current_steps] if args.key?(:current_steps)
|
1779
|
+
@experience_points = args[:experience_points] if args.key?(:experience_points)
|
1780
|
+
@formatted_current_steps_string = args[:formatted_current_steps_string] if args.key?(:formatted_current_steps_string)
|
1781
|
+
@id = args[:id] if args.key?(:id)
|
1782
|
+
@kind = args[:kind] if args.key?(:kind)
|
1783
|
+
@last_updated_timestamp = args[:last_updated_timestamp] if args.key?(:last_updated_timestamp)
|
1784
|
+
end
|
1785
|
+
end
|
1786
|
+
|
1787
|
+
# A list of achievement objects.
|
1788
|
+
class ListPlayerAchievementResponse
|
1789
|
+
include Google::Apis::Core::Hashable
|
1790
|
+
|
1791
|
+
# The achievements.
|
1792
|
+
# Corresponds to the JSON property `items`
|
1793
|
+
# @return [Array<Google::Apis::GamesV1::PlayerAchievement>]
|
1794
|
+
attr_accessor :items
|
1795
|
+
|
1796
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1797
|
+
# string `games#playerAchievementListResponse`.
|
1798
|
+
# Corresponds to the JSON property `kind`
|
1799
|
+
# @return [String]
|
1800
|
+
attr_accessor :kind
|
1801
|
+
|
1802
|
+
# Token corresponding to the next page of results.
|
1803
|
+
# Corresponds to the JSON property `nextPageToken`
|
1804
|
+
# @return [String]
|
1805
|
+
attr_accessor :next_page_token
|
1806
|
+
|
1807
|
+
def initialize(**args)
|
1808
|
+
update!(**args)
|
1809
|
+
end
|
1810
|
+
|
1811
|
+
# Update properties of this object
|
1812
|
+
def update!(**args)
|
1813
|
+
@items = args[:items] if args.key?(:items)
|
1814
|
+
@kind = args[:kind] if args.key?(:kind)
|
1815
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1816
|
+
end
|
1817
|
+
end
|
1818
|
+
|
1819
|
+
# An event status resource.
|
1820
|
+
class PlayerEvent
|
1821
|
+
include Google::Apis::Core::Hashable
|
1822
|
+
|
1823
|
+
# The ID of the event definition.
|
1824
|
+
# Corresponds to the JSON property `definitionId`
|
1825
|
+
# @return [String]
|
1826
|
+
attr_accessor :definition_id
|
1827
|
+
|
1828
|
+
# The current number of times this event has occurred, as a string. The
|
1829
|
+
# formatting of this string depends on the configuration of your event in the
|
1830
|
+
# Play Games Developer Console.
|
1831
|
+
# Corresponds to the JSON property `formattedNumEvents`
|
1832
|
+
# @return [String]
|
1833
|
+
attr_accessor :formatted_num_events
|
1834
|
+
|
1835
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1836
|
+
# string `games#playerEvent`.
|
1837
|
+
# Corresponds to the JSON property `kind`
|
1838
|
+
# @return [String]
|
1839
|
+
attr_accessor :kind
|
1840
|
+
|
1841
|
+
# The current number of times this event has occurred.
|
1842
|
+
# Corresponds to the JSON property `numEvents`
|
1843
|
+
# @return [Fixnum]
|
1844
|
+
attr_accessor :num_events
|
1845
|
+
|
1846
|
+
# The ID of the player.
|
1847
|
+
# Corresponds to the JSON property `playerId`
|
1848
|
+
# @return [String]
|
1849
|
+
attr_accessor :player_id
|
1850
|
+
|
1851
|
+
def initialize(**args)
|
1852
|
+
update!(**args)
|
1853
|
+
end
|
1854
|
+
|
1855
|
+
# Update properties of this object
|
1856
|
+
def update!(**args)
|
1857
|
+
@definition_id = args[:definition_id] if args.key?(:definition_id)
|
1858
|
+
@formatted_num_events = args[:formatted_num_events] if args.key?(:formatted_num_events)
|
1859
|
+
@kind = args[:kind] if args.key?(:kind)
|
1860
|
+
@num_events = args[:num_events] if args.key?(:num_events)
|
1861
|
+
@player_id = args[:player_id] if args.key?(:player_id)
|
1862
|
+
end
|
1863
|
+
end
|
1864
|
+
|
1865
|
+
# A ListByPlayer response.
|
1866
|
+
class ListPlayerEventResponse
|
1867
|
+
include Google::Apis::Core::Hashable
|
1868
|
+
|
1869
|
+
# The player events.
|
1870
|
+
# Corresponds to the JSON property `items`
|
1871
|
+
# @return [Array<Google::Apis::GamesV1::PlayerEvent>]
|
1872
|
+
attr_accessor :items
|
1873
|
+
|
1874
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1875
|
+
# string `games#playerEventListResponse`.
|
1876
|
+
# Corresponds to the JSON property `kind`
|
1877
|
+
# @return [String]
|
1878
|
+
attr_accessor :kind
|
1879
|
+
|
1880
|
+
# The pagination token for the next page of results.
|
1881
|
+
# Corresponds to the JSON property `nextPageToken`
|
1882
|
+
# @return [String]
|
1883
|
+
attr_accessor :next_page_token
|
1884
|
+
|
1885
|
+
def initialize(**args)
|
1886
|
+
update!(**args)
|
1887
|
+
end
|
1888
|
+
|
1889
|
+
# Update properties of this object
|
1890
|
+
def update!(**args)
|
1891
|
+
@items = args[:items] if args.key?(:items)
|
1892
|
+
@kind = args[:kind] if args.key?(:kind)
|
1893
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1894
|
+
end
|
1895
|
+
end
|
1896
|
+
|
1897
|
+
# 1P/3P metadata about the player's experience.
|
1898
|
+
class PlayerExperienceInfo
|
1899
|
+
include Google::Apis::Core::Hashable
|
1900
|
+
|
1901
|
+
# The current number of experience points for the player.
|
1902
|
+
# Corresponds to the JSON property `currentExperiencePoints`
|
1903
|
+
# @return [Fixnum]
|
1904
|
+
attr_accessor :current_experience_points
|
1905
|
+
|
1906
|
+
# 1P/3P metadata about a user's level.
|
1907
|
+
# Corresponds to the JSON property `currentLevel`
|
1908
|
+
# @return [Google::Apis::GamesV1::PlayerLevel]
|
1909
|
+
attr_accessor :current_level
|
1910
|
+
|
1911
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1912
|
+
# string `games#playerExperienceInfo`.
|
1913
|
+
# Corresponds to the JSON property `kind`
|
1914
|
+
# @return [String]
|
1915
|
+
attr_accessor :kind
|
1916
|
+
|
1917
|
+
# The timestamp when the player was leveled up, in millis since Unix epoch UTC.
|
1918
|
+
# Corresponds to the JSON property `lastLevelUpTimestampMillis`
|
1919
|
+
# @return [Fixnum]
|
1920
|
+
attr_accessor :last_level_up_timestamp_millis
|
1921
|
+
|
1922
|
+
# 1P/3P metadata about a user's level.
|
1923
|
+
# Corresponds to the JSON property `nextLevel`
|
1924
|
+
# @return [Google::Apis::GamesV1::PlayerLevel]
|
1925
|
+
attr_accessor :next_level
|
1926
|
+
|
1927
|
+
def initialize(**args)
|
1928
|
+
update!(**args)
|
1929
|
+
end
|
1930
|
+
|
1931
|
+
# Update properties of this object
|
1932
|
+
def update!(**args)
|
1933
|
+
@current_experience_points = args[:current_experience_points] if args.key?(:current_experience_points)
|
1934
|
+
@current_level = args[:current_level] if args.key?(:current_level)
|
1935
|
+
@kind = args[:kind] if args.key?(:kind)
|
1936
|
+
@last_level_up_timestamp_millis = args[:last_level_up_timestamp_millis] if args.key?(:last_level_up_timestamp_millis)
|
1937
|
+
@next_level = args[:next_level] if args.key?(:next_level)
|
1938
|
+
end
|
1939
|
+
end
|
1940
|
+
|
1941
|
+
# A player leaderboard score object.
|
1942
|
+
class PlayerLeaderboardScore
|
1943
|
+
include Google::Apis::Core::Hashable
|
1944
|
+
|
1945
|
+
# A score rank in a leaderboard.
|
1946
|
+
# Corresponds to the JSON property `friendsRank`
|
1947
|
+
# @return [Google::Apis::GamesV1::LeaderboardScoreRank]
|
1948
|
+
attr_accessor :friends_rank
|
1949
|
+
|
1950
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
1951
|
+
# string `games#playerLeaderboardScore`.
|
1952
|
+
# Corresponds to the JSON property `kind`
|
1953
|
+
# @return [String]
|
1954
|
+
attr_accessor :kind
|
1955
|
+
|
1956
|
+
# The ID of the leaderboard this score is in.
|
1957
|
+
# Corresponds to the JSON property `leaderboard_id`
|
1958
|
+
# @return [String]
|
1959
|
+
attr_accessor :leaderboard_id
|
1960
|
+
|
1961
|
+
# A score rank in a leaderboard.
|
1962
|
+
# Corresponds to the JSON property `publicRank`
|
1963
|
+
# @return [Google::Apis::GamesV1::LeaderboardScoreRank]
|
1964
|
+
attr_accessor :public_rank
|
1965
|
+
|
1966
|
+
# The formatted value of this score.
|
1967
|
+
# Corresponds to the JSON property `scoreString`
|
1968
|
+
# @return [String]
|
1969
|
+
attr_accessor :score_string
|
1970
|
+
|
1971
|
+
# Additional information about the score. Values must contain no more than 64
|
1972
|
+
# URI-safe characters as defined by section 2.3 of RFC 3986.
|
1973
|
+
# Corresponds to the JSON property `scoreTag`
|
1974
|
+
# @return [String]
|
1975
|
+
attr_accessor :score_tag
|
1976
|
+
|
1977
|
+
# The numerical value of this score.
|
1978
|
+
# Corresponds to the JSON property `scoreValue`
|
1979
|
+
# @return [Fixnum]
|
1980
|
+
attr_accessor :score_value
|
1981
|
+
|
1982
|
+
# A score rank in a leaderboard.
|
1983
|
+
# Corresponds to the JSON property `socialRank`
|
1984
|
+
# @return [Google::Apis::GamesV1::LeaderboardScoreRank]
|
1985
|
+
attr_accessor :social_rank
|
1986
|
+
|
1987
|
+
# The time span of this score.
|
1988
|
+
# Corresponds to the JSON property `timeSpan`
|
1989
|
+
# @return [String]
|
1990
|
+
attr_accessor :time_span
|
1991
|
+
|
1992
|
+
# The timestamp at which this score was recorded, in milliseconds since the
|
1993
|
+
# epoch in UTC.
|
1994
|
+
# Corresponds to the JSON property `writeTimestamp`
|
1995
|
+
# @return [Fixnum]
|
1996
|
+
attr_accessor :write_timestamp
|
1997
|
+
|
1998
|
+
def initialize(**args)
|
1999
|
+
update!(**args)
|
2000
|
+
end
|
2001
|
+
|
2002
|
+
# Update properties of this object
|
2003
|
+
def update!(**args)
|
2004
|
+
@friends_rank = args[:friends_rank] if args.key?(:friends_rank)
|
2005
|
+
@kind = args[:kind] if args.key?(:kind)
|
2006
|
+
@leaderboard_id = args[:leaderboard_id] if args.key?(:leaderboard_id)
|
2007
|
+
@public_rank = args[:public_rank] if args.key?(:public_rank)
|
2008
|
+
@score_string = args[:score_string] if args.key?(:score_string)
|
2009
|
+
@score_tag = args[:score_tag] if args.key?(:score_tag)
|
2010
|
+
@score_value = args[:score_value] if args.key?(:score_value)
|
2011
|
+
@social_rank = args[:social_rank] if args.key?(:social_rank)
|
2012
|
+
@time_span = args[:time_span] if args.key?(:time_span)
|
2013
|
+
@write_timestamp = args[:write_timestamp] if args.key?(:write_timestamp)
|
2014
|
+
end
|
2015
|
+
end
|
2016
|
+
|
2017
|
+
# A list of player leaderboard scores.
|
2018
|
+
class ListPlayerLeaderboardScoreResponse
|
2019
|
+
include Google::Apis::Core::Hashable
|
2020
|
+
|
2021
|
+
# The leaderboard scores.
|
2022
|
+
# Corresponds to the JSON property `items`
|
2023
|
+
# @return [Array<Google::Apis::GamesV1::PlayerLeaderboardScore>]
|
2024
|
+
attr_accessor :items
|
2025
|
+
|
2026
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
2027
|
+
# string `games#playerLeaderboardScoreListResponse`.
|
2028
|
+
# Corresponds to the JSON property `kind`
|
2029
|
+
# @return [String]
|
2030
|
+
attr_accessor :kind
|
2031
|
+
|
2032
|
+
# The pagination token for the next page of results.
|
2033
|
+
# Corresponds to the JSON property `nextPageToken`
|
2034
|
+
# @return [String]
|
2035
|
+
attr_accessor :next_page_token
|
2036
|
+
|
2037
|
+
# A Player resource.
|
2038
|
+
# Corresponds to the JSON property `player`
|
2039
|
+
# @return [Google::Apis::GamesV1::Player]
|
2040
|
+
attr_accessor :player
|
2041
|
+
|
2042
|
+
def initialize(**args)
|
2043
|
+
update!(**args)
|
2044
|
+
end
|
2045
|
+
|
2046
|
+
# Update properties of this object
|
2047
|
+
def update!(**args)
|
2048
|
+
@items = args[:items] if args.key?(:items)
|
2049
|
+
@kind = args[:kind] if args.key?(:kind)
|
2050
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
2051
|
+
@player = args[:player] if args.key?(:player)
|
2052
|
+
end
|
2053
|
+
end
|
2054
|
+
|
2055
|
+
# 1P/3P metadata about a user's level.
|
2056
|
+
class PlayerLevel
|
2057
|
+
include Google::Apis::Core::Hashable
|
2058
|
+
|
2059
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
2060
|
+
# string `games#playerLevel`.
|
2061
|
+
# Corresponds to the JSON property `kind`
|
2062
|
+
# @return [String]
|
2063
|
+
attr_accessor :kind
|
2064
|
+
|
2065
|
+
# The level for the user.
|
2066
|
+
# Corresponds to the JSON property `level`
|
2067
|
+
# @return [Fixnum]
|
2068
|
+
attr_accessor :level
|
2069
|
+
|
2070
|
+
# The maximum experience points for this level.
|
2071
|
+
# Corresponds to the JSON property `maxExperiencePoints`
|
2072
|
+
# @return [Fixnum]
|
2073
|
+
attr_accessor :max_experience_points
|
2074
|
+
|
2075
|
+
# The minimum experience points for this level.
|
2076
|
+
# Corresponds to the JSON property `minExperiencePoints`
|
2077
|
+
# @return [Fixnum]
|
2078
|
+
attr_accessor :min_experience_points
|
2079
|
+
|
2080
|
+
def initialize(**args)
|
2081
|
+
update!(**args)
|
2082
|
+
end
|
2083
|
+
|
2084
|
+
# Update properties of this object
|
2085
|
+
def update!(**args)
|
2086
|
+
@kind = args[:kind] if args.key?(:kind)
|
2087
|
+
@level = args[:level] if args.key?(:level)
|
2088
|
+
@max_experience_points = args[:max_experience_points] if args.key?(:max_experience_points)
|
2089
|
+
@min_experience_points = args[:min_experience_points] if args.key?(:min_experience_points)
|
2090
|
+
end
|
2091
|
+
end
|
2092
|
+
|
2093
|
+
# A third party player list response.
|
2094
|
+
class ListPlayerResponse
|
2095
|
+
include Google::Apis::Core::Hashable
|
2096
|
+
|
2097
|
+
# The players.
|
2098
|
+
# Corresponds to the JSON property `items`
|
2099
|
+
# @return [Array<Google::Apis::GamesV1::Player>]
|
2100
|
+
attr_accessor :items
|
2101
|
+
|
2102
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
2103
|
+
# string `games#playerListResponse`.
|
2104
|
+
# Corresponds to the JSON property `kind`
|
2105
|
+
# @return [String]
|
2106
|
+
attr_accessor :kind
|
2107
|
+
|
2108
|
+
# Token corresponding to the next page of results.
|
2109
|
+
# Corresponds to the JSON property `nextPageToken`
|
2110
|
+
# @return [String]
|
2111
|
+
attr_accessor :next_page_token
|
2112
|
+
|
2113
|
+
def initialize(**args)
|
2114
|
+
update!(**args)
|
2115
|
+
end
|
2116
|
+
|
2117
|
+
# Update properties of this object
|
2118
|
+
def update!(**args)
|
2119
|
+
@items = args[:items] if args.key?(:items)
|
2120
|
+
@kind = args[:kind] if args.key?(:kind)
|
2121
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
2122
|
+
end
|
2123
|
+
end
|
2124
|
+
|
2125
|
+
# A player score.
|
2126
|
+
class PlayerScore
|
2127
|
+
include Google::Apis::Core::Hashable
|
2128
|
+
|
2129
|
+
# The formatted score for this player score.
|
2130
|
+
# Corresponds to the JSON property `formattedScore`
|
2131
|
+
# @return [String]
|
2132
|
+
attr_accessor :formatted_score
|
2133
|
+
|
2134
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
2135
|
+
# string `games#playerScore`.
|
2136
|
+
# Corresponds to the JSON property `kind`
|
2137
|
+
# @return [String]
|
2138
|
+
attr_accessor :kind
|
2139
|
+
|
2140
|
+
# The numerical value for this player score.
|
2141
|
+
# Corresponds to the JSON property `score`
|
2142
|
+
# @return [Fixnum]
|
2143
|
+
attr_accessor :score
|
2144
|
+
|
2145
|
+
# Additional information about this score. Values will contain no more than 64
|
2146
|
+
# URI-safe characters as defined by section 2.3 of RFC 3986.
|
2147
|
+
# Corresponds to the JSON property `scoreTag`
|
2148
|
+
# @return [String]
|
2149
|
+
attr_accessor :score_tag
|
2150
|
+
|
2151
|
+
# The time span for this player score.
|
2152
|
+
# Corresponds to the JSON property `timeSpan`
|
2153
|
+
# @return [String]
|
2154
|
+
attr_accessor :time_span
|
2155
|
+
|
2156
|
+
def initialize(**args)
|
2157
|
+
update!(**args)
|
2158
|
+
end
|
2159
|
+
|
2160
|
+
# Update properties of this object
|
2161
|
+
def update!(**args)
|
2162
|
+
@formatted_score = args[:formatted_score] if args.key?(:formatted_score)
|
2163
|
+
@kind = args[:kind] if args.key?(:kind)
|
2164
|
+
@score = args[:score] if args.key?(:score)
|
2165
|
+
@score_tag = args[:score_tag] if args.key?(:score_tag)
|
2166
|
+
@time_span = args[:time_span] if args.key?(:time_span)
|
2167
|
+
end
|
2168
|
+
end
|
2169
|
+
|
2170
|
+
# A list of score submission statuses.
|
2171
|
+
class ListPlayerScoreResponse
|
2172
|
+
include Google::Apis::Core::Hashable
|
2173
|
+
|
2174
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
2175
|
+
# string `games#playerScoreListResponse`.
|
2176
|
+
# Corresponds to the JSON property `kind`
|
2177
|
+
# @return [String]
|
2178
|
+
attr_accessor :kind
|
2179
|
+
|
2180
|
+
# The score submissions statuses.
|
2181
|
+
# Corresponds to the JSON property `submittedScores`
|
2182
|
+
# @return [Array<Google::Apis::GamesV1::PlayerScoreResponse>]
|
2183
|
+
attr_accessor :submitted_scores
|
2184
|
+
|
2185
|
+
def initialize(**args)
|
2186
|
+
update!(**args)
|
2187
|
+
end
|
2188
|
+
|
2189
|
+
# Update properties of this object
|
2190
|
+
def update!(**args)
|
2191
|
+
@kind = args[:kind] if args.key?(:kind)
|
2192
|
+
@submitted_scores = args[:submitted_scores] if args.key?(:submitted_scores)
|
2193
|
+
end
|
2194
|
+
end
|
2195
|
+
|
2196
|
+
# A list of leaderboard entry resources.
|
2197
|
+
class PlayerScoreResponse
|
2198
|
+
include Google::Apis::Core::Hashable
|
2199
|
+
|
2200
|
+
# The time spans where the submitted score is better than the existing score for
|
2201
|
+
# that time span.
|
2202
|
+
# Corresponds to the JSON property `beatenScoreTimeSpans`
|
2203
|
+
# @return [Array<String>]
|
2204
|
+
attr_accessor :beaten_score_time_spans
|
2205
|
+
|
2206
|
+
# The formatted value of the submitted score.
|
2207
|
+
# Corresponds to the JSON property `formattedScore`
|
2208
|
+
# @return [String]
|
2209
|
+
attr_accessor :formatted_score
|
2210
|
+
|
2211
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
2212
|
+
# string `games#playerScoreResponse`.
|
2213
|
+
# Corresponds to the JSON property `kind`
|
2214
|
+
# @return [String]
|
2215
|
+
attr_accessor :kind
|
2216
|
+
|
2217
|
+
# The leaderboard ID that this score was submitted to.
|
2218
|
+
# Corresponds to the JSON property `leaderboardId`
|
2219
|
+
# @return [String]
|
2220
|
+
attr_accessor :leaderboard_id
|
2221
|
+
|
2222
|
+
# Additional information about this score. Values will contain no more than 64
|
2223
|
+
# URI-safe characters as defined by section 2.3 of RFC 3986.
|
2224
|
+
# Corresponds to the JSON property `scoreTag`
|
2225
|
+
# @return [String]
|
2226
|
+
attr_accessor :score_tag
|
2227
|
+
|
2228
|
+
# The scores in time spans that have not been beaten. As an example, the
|
2229
|
+
# submitted score may be better than the player's `DAILY` score, but not better
|
2230
|
+
# than the player's scores for the `WEEKLY` or `ALL_TIME` time spans.
|
2231
|
+
# Corresponds to the JSON property `unbeatenScores`
|
2232
|
+
# @return [Array<Google::Apis::GamesV1::PlayerScore>]
|
2233
|
+
attr_accessor :unbeaten_scores
|
2234
|
+
|
2235
|
+
def initialize(**args)
|
2236
|
+
update!(**args)
|
2237
|
+
end
|
2238
|
+
|
2239
|
+
# Update properties of this object
|
2240
|
+
def update!(**args)
|
2241
|
+
@beaten_score_time_spans = args[:beaten_score_time_spans] if args.key?(:beaten_score_time_spans)
|
2242
|
+
@formatted_score = args[:formatted_score] if args.key?(:formatted_score)
|
2243
|
+
@kind = args[:kind] if args.key?(:kind)
|
2244
|
+
@leaderboard_id = args[:leaderboard_id] if args.key?(:leaderboard_id)
|
2245
|
+
@score_tag = args[:score_tag] if args.key?(:score_tag)
|
2246
|
+
@unbeaten_scores = args[:unbeaten_scores] if args.key?(:unbeaten_scores)
|
2247
|
+
end
|
2248
|
+
end
|
2249
|
+
|
2250
|
+
# A list of score submission requests.
|
2251
|
+
class PlayerScoreSubmissionList
|
2252
|
+
include Google::Apis::Core::Hashable
|
2253
|
+
|
2254
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
2255
|
+
# string `games#playerScoreSubmissionList`.
|
2256
|
+
# Corresponds to the JSON property `kind`
|
2257
|
+
# @return [String]
|
2258
|
+
attr_accessor :kind
|
2259
|
+
|
2260
|
+
# The score submissions.
|
2261
|
+
# Corresponds to the JSON property `scores`
|
2262
|
+
# @return [Array<Google::Apis::GamesV1::ScoreSubmission>]
|
2263
|
+
attr_accessor :scores
|
2264
|
+
|
2265
|
+
def initialize(**args)
|
2266
|
+
update!(**args)
|
2267
|
+
end
|
2268
|
+
|
2269
|
+
# Update properties of this object
|
2270
|
+
def update!(**args)
|
2271
|
+
@kind = args[:kind] if args.key?(:kind)
|
2272
|
+
@scores = args[:scores] if args.key?(:scores)
|
2273
|
+
end
|
2274
|
+
end
|
2275
|
+
|
2276
|
+
# Profile settings
|
2277
|
+
class ProfileSettings
|
2278
|
+
include Google::Apis::Core::Hashable
|
2279
|
+
|
2280
|
+
#
|
2281
|
+
# Corresponds to the JSON property `friendsListVisibility`
|
2282
|
+
# @return [String]
|
2283
|
+
attr_accessor :friends_list_visibility
|
2284
|
+
|
2285
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
2286
|
+
# string `games#profileSettings`.
|
2287
|
+
# Corresponds to the JSON property `kind`
|
2288
|
+
# @return [String]
|
2289
|
+
attr_accessor :kind
|
2290
|
+
|
2291
|
+
# Whether the player's profile is visible to the currently signed in player.
|
2292
|
+
# Corresponds to the JSON property `profileVisible`
|
2293
|
+
# @return [Boolean]
|
2294
|
+
attr_accessor :profile_visible
|
2295
|
+
alias_method :profile_visible?, :profile_visible
|
2296
|
+
|
2297
|
+
def initialize(**args)
|
2298
|
+
update!(**args)
|
2299
|
+
end
|
2300
|
+
|
2301
|
+
# Update properties of this object
|
2302
|
+
def update!(**args)
|
2303
|
+
@friends_list_visibility = args[:friends_list_visibility] if args.key?(:friends_list_visibility)
|
2304
|
+
@kind = args[:kind] if args.key?(:kind)
|
2305
|
+
@profile_visible = args[:profile_visible] if args.key?(:profile_visible)
|
2306
|
+
end
|
2307
|
+
end
|
2308
|
+
|
2309
|
+
# Request for ResolveSnapshotHead RPC.
|
2310
|
+
class ResolveSnapshotHeadRequest
|
2311
|
+
include Google::Apis::Core::Hashable
|
2312
|
+
|
2313
|
+
# Required. The automatic resolution policy. All conflicts are resolved in
|
2314
|
+
# chronological order, starting from the/ least recent. If the comparison metric
|
2315
|
+
# is equal for the tentative head and the conflict, the head wins.
|
2316
|
+
# Corresponds to the JSON property `resolutionPolicy`
|
2317
|
+
# @return [String]
|
2318
|
+
attr_accessor :resolution_policy
|
2319
|
+
|
2320
|
+
def initialize(**args)
|
2321
|
+
update!(**args)
|
2322
|
+
end
|
2323
|
+
|
2324
|
+
# Update properties of this object
|
2325
|
+
def update!(**args)
|
2326
|
+
@resolution_policy = args[:resolution_policy] if args.key?(:resolution_policy)
|
2327
|
+
end
|
2328
|
+
end
|
2329
|
+
|
2330
|
+
# Response for ResolveSnapshotHead RPC.
|
2331
|
+
class ResolveSnapshotHeadResponse
|
2332
|
+
include Google::Apis::Core::Hashable
|
2333
|
+
|
2334
|
+
# A snapshot represents a saved game state referred to using the developer-
|
2335
|
+
# provided snapshot_name. The set of attributes and binary data for a specific
|
2336
|
+
# state is called a revision. Each revision is itself immutable, and referred to
|
2337
|
+
# by a snapshot revision id. At any time, a snapshot has a "head" revision, and
|
2338
|
+
# updates are made against that revision. If a snapshot update is received that
|
2339
|
+
# isn't against the current head revision, then instead of changing the head
|
2340
|
+
# revision it will result in a conflicting revision that must be specifically
|
2341
|
+
# resolved.
|
2342
|
+
# Corresponds to the JSON property `snapshot`
|
2343
|
+
# @return [Google::Apis::GamesV1::SnapshotExtended]
|
2344
|
+
attr_accessor :snapshot
|
2345
|
+
|
2346
|
+
def initialize(**args)
|
2347
|
+
update!(**args)
|
2348
|
+
end
|
2349
|
+
|
2350
|
+
# Update properties of this object
|
2351
|
+
def update!(**args)
|
2352
|
+
@snapshot = args[:snapshot] if args.key?(:snapshot)
|
2353
|
+
end
|
2354
|
+
end
|
2355
|
+
|
2356
|
+
# A third party checking a revision response.
|
2357
|
+
class CheckRevisionResponse
|
2358
|
+
include Google::Apis::Core::Hashable
|
2359
|
+
|
2360
|
+
# The version of the API this client revision should use when calling API
|
2361
|
+
# methods.
|
2362
|
+
# Corresponds to the JSON property `apiVersion`
|
2363
|
+
# @return [String]
|
2364
|
+
attr_accessor :api_version
|
2365
|
+
|
2366
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
2367
|
+
# string `games#revisionCheckResponse`.
|
2368
|
+
# Corresponds to the JSON property `kind`
|
2369
|
+
# @return [String]
|
2370
|
+
attr_accessor :kind
|
2371
|
+
|
2372
|
+
# The result of the revision check.
|
2373
|
+
# Corresponds to the JSON property `revisionStatus`
|
2374
|
+
# @return [String]
|
2375
|
+
attr_accessor :revision_status
|
2376
|
+
|
2377
|
+
def initialize(**args)
|
2378
|
+
update!(**args)
|
2379
|
+
end
|
2380
|
+
|
2381
|
+
# Update properties of this object
|
2382
|
+
def update!(**args)
|
2383
|
+
@api_version = args[:api_version] if args.key?(:api_version)
|
2384
|
+
@kind = args[:kind] if args.key?(:kind)
|
2385
|
+
@revision_status = args[:revision_status] if args.key?(:revision_status)
|
2386
|
+
end
|
2387
|
+
end
|
2388
|
+
|
2389
|
+
# A request to submit a score to leaderboards.
|
2390
|
+
class ScoreSubmission
|
2391
|
+
include Google::Apis::Core::Hashable
|
2392
|
+
|
2393
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
2394
|
+
# string `games#scoreSubmission`.
|
2395
|
+
# Corresponds to the JSON property `kind`
|
2396
|
+
# @return [String]
|
2397
|
+
attr_accessor :kind
|
2398
|
+
|
2399
|
+
# The leaderboard this score is being submitted to.
|
2400
|
+
# Corresponds to the JSON property `leaderboardId`
|
2401
|
+
# @return [String]
|
2402
|
+
attr_accessor :leaderboard_id
|
2403
|
+
|
2404
|
+
# The new score being submitted.
|
2405
|
+
# Corresponds to the JSON property `score`
|
2406
|
+
# @return [Fixnum]
|
2407
|
+
attr_accessor :score
|
2408
|
+
|
2409
|
+
# Additional information about this score. Values will contain no more than 64
|
2410
|
+
# URI-safe characters as defined by section 2.3 of RFC 3986.
|
2411
|
+
# Corresponds to the JSON property `scoreTag`
|
2412
|
+
# @return [String]
|
2413
|
+
attr_accessor :score_tag
|
2414
|
+
|
2415
|
+
# Signature Values will contain URI-safe characters as defined by section 2.3 of
|
2416
|
+
# RFC 3986.
|
2417
|
+
# Corresponds to the JSON property `signature`
|
2418
|
+
# @return [String]
|
2419
|
+
attr_accessor :signature
|
2420
|
+
|
2421
|
+
def initialize(**args)
|
2422
|
+
update!(**args)
|
2423
|
+
end
|
2424
|
+
|
2425
|
+
# Update properties of this object
|
2426
|
+
def update!(**args)
|
2427
|
+
@kind = args[:kind] if args.key?(:kind)
|
2428
|
+
@leaderboard_id = args[:leaderboard_id] if args.key?(:leaderboard_id)
|
2429
|
+
@score = args[:score] if args.key?(:score)
|
2430
|
+
@score_tag = args[:score_tag] if args.key?(:score_tag)
|
2431
|
+
@signature = args[:signature] if args.key?(:signature)
|
2432
|
+
end
|
2433
|
+
end
|
2434
|
+
|
2435
|
+
# An snapshot object.
|
2436
|
+
class Snapshot
|
2437
|
+
include Google::Apis::Core::Hashable
|
2438
|
+
|
2439
|
+
# An image of a snapshot.
|
2440
|
+
# Corresponds to the JSON property `coverImage`
|
2441
|
+
# @return [Google::Apis::GamesV1::SnapshotImage]
|
2442
|
+
attr_accessor :cover_image
|
2443
|
+
|
2444
|
+
# The description of this snapshot.
|
2445
|
+
# Corresponds to the JSON property `description`
|
2446
|
+
# @return [String]
|
2447
|
+
attr_accessor :description
|
2448
|
+
|
2449
|
+
# The ID of the file underlying this snapshot in the Drive API. Only present if
|
2450
|
+
# the snapshot is a view on a Drive file and the file is owned by the caller.
|
2451
|
+
# Corresponds to the JSON property `driveId`
|
2452
|
+
# @return [String]
|
2453
|
+
attr_accessor :drive_id
|
2454
|
+
|
2455
|
+
# The duration associated with this snapshot, in millis.
|
2456
|
+
# Corresponds to the JSON property `durationMillis`
|
2457
|
+
# @return [Fixnum]
|
2458
|
+
attr_accessor :duration_millis
|
2459
|
+
|
2460
|
+
# The ID of the snapshot.
|
2461
|
+
# Corresponds to the JSON property `id`
|
2462
|
+
# @return [String]
|
2463
|
+
attr_accessor :id
|
2464
|
+
|
2465
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
2466
|
+
# string `games#snapshot`.
|
2467
|
+
# Corresponds to the JSON property `kind`
|
2468
|
+
# @return [String]
|
2469
|
+
attr_accessor :kind
|
2470
|
+
|
2471
|
+
# The timestamp (in millis since Unix epoch) of the last modification to this
|
2472
|
+
# snapshot.
|
2473
|
+
# Corresponds to the JSON property `lastModifiedMillis`
|
2474
|
+
# @return [Fixnum]
|
2475
|
+
attr_accessor :last_modified_millis
|
2476
|
+
|
2477
|
+
# The progress value (64-bit integer set by developer) associated with this
|
2478
|
+
# snapshot.
|
2479
|
+
# Corresponds to the JSON property `progressValue`
|
2480
|
+
# @return [Fixnum]
|
2481
|
+
attr_accessor :progress_value
|
2482
|
+
|
2483
|
+
# The title of this snapshot.
|
2484
|
+
# Corresponds to the JSON property `title`
|
2485
|
+
# @return [String]
|
2486
|
+
attr_accessor :title
|
2487
|
+
|
2488
|
+
# The type of this snapshot.
|
2489
|
+
# Corresponds to the JSON property `type`
|
2490
|
+
# @return [String]
|
2491
|
+
attr_accessor :type
|
2492
|
+
|
2493
|
+
# The unique name provided when the snapshot was created.
|
2494
|
+
# Corresponds to the JSON property `uniqueName`
|
2495
|
+
# @return [String]
|
2496
|
+
attr_accessor :unique_name
|
2497
|
+
|
2498
|
+
def initialize(**args)
|
2499
|
+
update!(**args)
|
2500
|
+
end
|
2501
|
+
|
2502
|
+
# Update properties of this object
|
2503
|
+
def update!(**args)
|
2504
|
+
@cover_image = args[:cover_image] if args.key?(:cover_image)
|
2505
|
+
@description = args[:description] if args.key?(:description)
|
2506
|
+
@drive_id = args[:drive_id] if args.key?(:drive_id)
|
2507
|
+
@duration_millis = args[:duration_millis] if args.key?(:duration_millis)
|
2508
|
+
@id = args[:id] if args.key?(:id)
|
2509
|
+
@kind = args[:kind] if args.key?(:kind)
|
2510
|
+
@last_modified_millis = args[:last_modified_millis] if args.key?(:last_modified_millis)
|
2511
|
+
@progress_value = args[:progress_value] if args.key?(:progress_value)
|
2512
|
+
@title = args[:title] if args.key?(:title)
|
2513
|
+
@type = args[:type] if args.key?(:type)
|
2514
|
+
@unique_name = args[:unique_name] if args.key?(:unique_name)
|
2515
|
+
end
|
2516
|
+
end
|
2517
|
+
|
2518
|
+
# Identifies a snapshot cover image resource. The image is provided by the game.
|
2519
|
+
class SnapshotCoverImageResource
|
2520
|
+
include Google::Apis::Core::Hashable
|
2521
|
+
|
2522
|
+
# Output only. Hash-like weak identifier of the uploaded image bytes, consistent
|
2523
|
+
# per player per application. The content hash for a given resource will not
|
2524
|
+
# change if the binary data hasn't changed. Except in very rare circumstances,
|
2525
|
+
# the content_hash for matching binary data will be the same within a given
|
2526
|
+
# player and application.
|
2527
|
+
# Corresponds to the JSON property `contentHash`
|
2528
|
+
# @return [String]
|
2529
|
+
attr_accessor :content_hash
|
2530
|
+
|
2531
|
+
# Output only. A URL the client can use to download the image. May vary across
|
2532
|
+
# requests, and only guaranteed to be valid for a short time after it is
|
2533
|
+
# returned.
|
2534
|
+
# Corresponds to the JSON property `downloadUrl`
|
2535
|
+
# @return [String]
|
2536
|
+
attr_accessor :download_url
|
2537
|
+
|
2538
|
+
# The height of the image in pixels.
|
2539
|
+
# Corresponds to the JSON property `height`
|
2540
|
+
# @return [Fixnum]
|
2541
|
+
attr_accessor :height
|
2542
|
+
|
2543
|
+
# The MIME type of the image.
|
2544
|
+
# Corresponds to the JSON property `mimeType`
|
2545
|
+
# @return [String]
|
2546
|
+
attr_accessor :mime_type
|
2547
|
+
|
2548
|
+
# The ID of the image resource. It's guaranteed that if two IDs are equal then
|
2549
|
+
# the contents are equal as well. It's not guaranteed that two identical blobs
|
2550
|
+
# coming from separate uploads have the same ID. The resource ID can only be
|
2551
|
+
# used within the application, user and resource type it was originally returned
|
2552
|
+
# for. For example, it's not possible to use SnapshotDataResource's resource ID
|
2553
|
+
# as the resource_id of a SnapshotCoverImageResource, even if the blob is a
|
2554
|
+
# valid image file.
|
2555
|
+
# Corresponds to the JSON property `resourceId`
|
2556
|
+
# @return [String]
|
2557
|
+
attr_accessor :resource_id
|
2558
|
+
|
2559
|
+
# The width of the image in pixels.
|
2560
|
+
# Corresponds to the JSON property `width`
|
2561
|
+
# @return [Fixnum]
|
2562
|
+
attr_accessor :width
|
2563
|
+
|
2564
|
+
def initialize(**args)
|
2565
|
+
update!(**args)
|
2566
|
+
end
|
2567
|
+
|
2568
|
+
# Update properties of this object
|
2569
|
+
def update!(**args)
|
2570
|
+
@content_hash = args[:content_hash] if args.key?(:content_hash)
|
2571
|
+
@download_url = args[:download_url] if args.key?(:download_url)
|
2572
|
+
@height = args[:height] if args.key?(:height)
|
2573
|
+
@mime_type = args[:mime_type] if args.key?(:mime_type)
|
2574
|
+
@resource_id = args[:resource_id] if args.key?(:resource_id)
|
2575
|
+
@width = args[:width] if args.key?(:width)
|
2576
|
+
end
|
2577
|
+
end
|
2578
|
+
|
2579
|
+
# Identifies a snapshot data resource. The data is provided by the game.
|
2580
|
+
class SnapshotDataResource
|
2581
|
+
include Google::Apis::Core::Hashable
|
2582
|
+
|
2583
|
+
# Output only. Hash-like weak identifier of the uploaded blob bytes, consistent
|
2584
|
+
# per player per application. The content hash for a given resource will not
|
2585
|
+
# change if the binary data hasn't changed. Except in very rare circumstances,
|
2586
|
+
# the content_hash for matching binary data will be the same within a given
|
2587
|
+
# player and application.
|
2588
|
+
# Corresponds to the JSON property `contentHash`
|
2589
|
+
# @return [String]
|
2590
|
+
attr_accessor :content_hash
|
2591
|
+
|
2592
|
+
# Output only. A URL that the client can use to download the blob. May vary
|
2593
|
+
# across requests, and only guaranteed to be valid for a short time after it is
|
2594
|
+
# returned.
|
2595
|
+
# Corresponds to the JSON property `downloadUrl`
|
2596
|
+
# @return [String]
|
2597
|
+
attr_accessor :download_url
|
2598
|
+
|
2599
|
+
# The ID of the blob resource. It's guaranteed that if two IDs are equal then
|
2600
|
+
# the contents are equal as well. It's not guaranteed that two identical blobs
|
2601
|
+
# coming from separate uploads have the same resource ID. The resource ID can
|
2602
|
+
# only be used within the application, user and resource type it was originally
|
2603
|
+
# returned for. For example, it's not possible to use SnapshotDataResource's
|
2604
|
+
# resource ID as the resource_id of a SnapshotCoverImageResource, even if the
|
2605
|
+
# blob is a valid image file.
|
2606
|
+
# Corresponds to the JSON property `resourceId`
|
2607
|
+
# @return [String]
|
2608
|
+
attr_accessor :resource_id
|
2609
|
+
|
2610
|
+
# Output only. Size of the saved game blob in bytes.
|
2611
|
+
# Corresponds to the JSON property `size`
|
2612
|
+
# @return [Fixnum]
|
2613
|
+
attr_accessor :size
|
2614
|
+
|
2615
|
+
def initialize(**args)
|
2616
|
+
update!(**args)
|
2617
|
+
end
|
2618
|
+
|
2619
|
+
# Update properties of this object
|
2620
|
+
def update!(**args)
|
2621
|
+
@content_hash = args[:content_hash] if args.key?(:content_hash)
|
2622
|
+
@download_url = args[:download_url] if args.key?(:download_url)
|
2623
|
+
@resource_id = args[:resource_id] if args.key?(:resource_id)
|
2624
|
+
@size = args[:size] if args.key?(:size)
|
2625
|
+
end
|
2626
|
+
end
|
2627
|
+
|
2628
|
+
# A snapshot represents a saved game state referred to using the developer-
|
2629
|
+
# provided snapshot_name. The set of attributes and binary data for a specific
|
2630
|
+
# state is called a revision. Each revision is itself immutable, and referred to
|
2631
|
+
# by a snapshot revision id. At any time, a snapshot has a "head" revision, and
|
2632
|
+
# updates are made against that revision. If a snapshot update is received that
|
2633
|
+
# isn't against the current head revision, then instead of changing the head
|
2634
|
+
# revision it will result in a conflicting revision that must be specifically
|
2635
|
+
# resolved.
|
2636
|
+
class SnapshotExtended
|
2637
|
+
include Google::Apis::Core::Hashable
|
2638
|
+
|
2639
|
+
# A list of conflicting revisions. Only set if explicitly requested (e.g. using
|
2640
|
+
# a field mask or a request flag), or if the RPC guarantees that this field is
|
2641
|
+
# set. The conflicting revisions are sorted chronologically by their server
|
2642
|
+
# creation time (oldest first). If there are too many conflicting revisions to
|
2643
|
+
# return all of them in a single request this will only contain the first batch.
|
2644
|
+
# In such case, the presented conflicting revisions must be resolved first in
|
2645
|
+
# order to fetch the next batch.
|
2646
|
+
# Corresponds to the JSON property `conflictingRevisions`
|
2647
|
+
# @return [Array<Google::Apis::GamesV1::SnapshotRevision>]
|
2648
|
+
attr_accessor :conflicting_revisions
|
2649
|
+
|
2650
|
+
# An indicator whether the snapshot has any conflicting revisions or not. Always
|
2651
|
+
# set.
|
2652
|
+
# Corresponds to the JSON property `hasConflictingRevisions`
|
2653
|
+
# @return [Boolean]
|
2654
|
+
attr_accessor :has_conflicting_revisions
|
2655
|
+
alias_method :has_conflicting_revisions?, :has_conflicting_revisions
|
2656
|
+
|
2657
|
+
# A Snapshot revision resource. Snapshot revisions are immutable.
|
2658
|
+
# Corresponds to the JSON property `headRevision`
|
2659
|
+
# @return [Google::Apis::GamesV1::SnapshotRevision]
|
2660
|
+
attr_accessor :head_revision
|
2661
|
+
|
2662
|
+
# An identifier of the snapshot, developer-specified. It must match the pattern [
|
2663
|
+
# 0-9a-zA-Z-._~]`1,100`.
|
2664
|
+
# Corresponds to the JSON property `snapshotName`
|
2665
|
+
# @return [String]
|
2666
|
+
attr_accessor :snapshot_name
|
2667
|
+
|
2668
|
+
def initialize(**args)
|
2669
|
+
update!(**args)
|
2670
|
+
end
|
2671
|
+
|
2672
|
+
# Update properties of this object
|
2673
|
+
def update!(**args)
|
2674
|
+
@conflicting_revisions = args[:conflicting_revisions] if args.key?(:conflicting_revisions)
|
2675
|
+
@has_conflicting_revisions = args[:has_conflicting_revisions] if args.key?(:has_conflicting_revisions)
|
2676
|
+
@head_revision = args[:head_revision] if args.key?(:head_revision)
|
2677
|
+
@snapshot_name = args[:snapshot_name] if args.key?(:snapshot_name)
|
2678
|
+
end
|
2679
|
+
end
|
2680
|
+
|
2681
|
+
# An image of a snapshot.
|
2682
|
+
class SnapshotImage
|
2683
|
+
include Google::Apis::Core::Hashable
|
2684
|
+
|
2685
|
+
# The height of the image.
|
2686
|
+
# Corresponds to the JSON property `height`
|
2687
|
+
# @return [Fixnum]
|
2688
|
+
attr_accessor :height
|
2689
|
+
|
2690
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
2691
|
+
# string `games#snapshotImage`.
|
2692
|
+
# Corresponds to the JSON property `kind`
|
2693
|
+
# @return [String]
|
2694
|
+
attr_accessor :kind
|
2695
|
+
|
2696
|
+
# The MIME type of the image.
|
2697
|
+
# Corresponds to the JSON property `mime_type`
|
2698
|
+
# @return [String]
|
2699
|
+
attr_accessor :mime_type
|
2700
|
+
|
2701
|
+
# The URL of the image. This URL may be invalidated at any time and should not
|
2702
|
+
# be cached.
|
2703
|
+
# Corresponds to the JSON property `url`
|
2704
|
+
# @return [String]
|
2705
|
+
attr_accessor :url
|
2706
|
+
|
2707
|
+
# The width of the image.
|
2708
|
+
# Corresponds to the JSON property `width`
|
2709
|
+
# @return [Fixnum]
|
2710
|
+
attr_accessor :width
|
2711
|
+
|
2712
|
+
def initialize(**args)
|
2713
|
+
update!(**args)
|
2714
|
+
end
|
2715
|
+
|
2716
|
+
# Update properties of this object
|
2717
|
+
def update!(**args)
|
2718
|
+
@height = args[:height] if args.key?(:height)
|
2719
|
+
@kind = args[:kind] if args.key?(:kind)
|
2720
|
+
@mime_type = args[:mime_type] if args.key?(:mime_type)
|
2721
|
+
@url = args[:url] if args.key?(:url)
|
2722
|
+
@width = args[:width] if args.key?(:width)
|
2723
|
+
end
|
2724
|
+
end
|
2725
|
+
|
2726
|
+
# A third party list snapshots response.
|
2727
|
+
class ListSnapshotResponse
|
2728
|
+
include Google::Apis::Core::Hashable
|
2729
|
+
|
2730
|
+
# The snapshots.
|
2731
|
+
# Corresponds to the JSON property `items`
|
2732
|
+
# @return [Array<Google::Apis::GamesV1::Snapshot>]
|
2733
|
+
attr_accessor :items
|
2734
|
+
|
2735
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
2736
|
+
# string `games#snapshotListResponse`.
|
2737
|
+
# Corresponds to the JSON property `kind`
|
2738
|
+
# @return [String]
|
2739
|
+
attr_accessor :kind
|
2740
|
+
|
2741
|
+
# Token corresponding to the next page of results. If there are no more results,
|
2742
|
+
# the token is omitted.
|
2743
|
+
# Corresponds to the JSON property `nextPageToken`
|
2744
|
+
# @return [String]
|
2745
|
+
attr_accessor :next_page_token
|
2746
|
+
|
2747
|
+
def initialize(**args)
|
2748
|
+
update!(**args)
|
2749
|
+
end
|
2750
|
+
|
2751
|
+
# Update properties of this object
|
2752
|
+
def update!(**args)
|
2753
|
+
@items = args[:items] if args.key?(:items)
|
2754
|
+
@kind = args[:kind] if args.key?(:kind)
|
2755
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
2756
|
+
end
|
2757
|
+
end
|
2758
|
+
|
2759
|
+
# Metadata about a snapshot revision. Snapshot metadata is immutable - a
|
2760
|
+
# metadata change corresponds to a new snapshot revision.
|
2761
|
+
class SnapshotMetadata
|
2762
|
+
include Google::Apis::Core::Hashable
|
2763
|
+
|
2764
|
+
# The description of this snapshot.
|
2765
|
+
# Corresponds to the JSON property `description`
|
2766
|
+
# @return [String]
|
2767
|
+
attr_accessor :description
|
2768
|
+
|
2769
|
+
# The device that created the current revision.
|
2770
|
+
# Corresponds to the JSON property `deviceName`
|
2771
|
+
# @return [String]
|
2772
|
+
attr_accessor :device_name
|
2773
|
+
|
2774
|
+
# The duration associated with this snapshot. Values with sub-millisecond
|
2775
|
+
# precision can be rounded or trimmed to the closest millisecond.
|
2776
|
+
# Corresponds to the JSON property `gameplayDuration`
|
2777
|
+
# @return [String]
|
2778
|
+
attr_accessor :gameplay_duration
|
2779
|
+
|
2780
|
+
# The timestamp of the last modification to this snapshot as provided by the
|
2781
|
+
# client. Values with sub-millisecond precision can be rounded or trimmed to the
|
2782
|
+
# closest millisecond.
|
2783
|
+
# Corresponds to the JSON property `lastModifyTime`
|
2784
|
+
# @return [String]
|
2785
|
+
attr_accessor :last_modify_time
|
2786
|
+
|
2787
|
+
# The progress value (64-bit integer set by developer) associated with this
|
2788
|
+
# snapshot.
|
2789
|
+
# Corresponds to the JSON property `progressValue`
|
2790
|
+
# @return [Fixnum]
|
2791
|
+
attr_accessor :progress_value
|
2792
|
+
|
2793
|
+
def initialize(**args)
|
2794
|
+
update!(**args)
|
2795
|
+
end
|
2796
|
+
|
2797
|
+
# Update properties of this object
|
2798
|
+
def update!(**args)
|
2799
|
+
@description = args[:description] if args.key?(:description)
|
2800
|
+
@device_name = args[:device_name] if args.key?(:device_name)
|
2801
|
+
@gameplay_duration = args[:gameplay_duration] if args.key?(:gameplay_duration)
|
2802
|
+
@last_modify_time = args[:last_modify_time] if args.key?(:last_modify_time)
|
2803
|
+
@progress_value = args[:progress_value] if args.key?(:progress_value)
|
2804
|
+
end
|
2805
|
+
end
|
2806
|
+
|
2807
|
+
# A Snapshot revision resource. Snapshot revisions are immutable.
|
2808
|
+
class SnapshotRevision
|
2809
|
+
include Google::Apis::Core::Hashable
|
2810
|
+
|
2811
|
+
# Identifies a snapshot data resource. The data is provided by the game.
|
2812
|
+
# Corresponds to the JSON property `blob`
|
2813
|
+
# @return [Google::Apis::GamesV1::SnapshotDataResource]
|
2814
|
+
attr_accessor :blob
|
2815
|
+
|
2816
|
+
# Identifies a snapshot cover image resource. The image is provided by the game.
|
2817
|
+
# Corresponds to the JSON property `coverImage`
|
2818
|
+
# @return [Google::Apis::GamesV1::SnapshotCoverImageResource]
|
2819
|
+
attr_accessor :cover_image
|
2820
|
+
|
2821
|
+
# Output only. A server generated identifier of the snapshot revision.
|
2822
|
+
# Corresponds to the JSON property `id`
|
2823
|
+
# @return [String]
|
2824
|
+
attr_accessor :id
|
2825
|
+
|
2826
|
+
# Metadata about a snapshot revision. Snapshot metadata is immutable - a
|
2827
|
+
# metadata change corresponds to a new snapshot revision.
|
2828
|
+
# Corresponds to the JSON property `metadata`
|
2829
|
+
# @return [Google::Apis::GamesV1::SnapshotMetadata]
|
2830
|
+
attr_accessor :metadata
|
2831
|
+
|
2832
|
+
def initialize(**args)
|
2833
|
+
update!(**args)
|
2834
|
+
end
|
2835
|
+
|
2836
|
+
# Update properties of this object
|
2837
|
+
def update!(**args)
|
2838
|
+
@blob = args[:blob] if args.key?(:blob)
|
2839
|
+
@cover_image = args[:cover_image] if args.key?(:cover_image)
|
2840
|
+
@id = args[:id] if args.key?(:id)
|
2841
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
2842
|
+
end
|
2843
|
+
end
|
2844
|
+
|
2845
|
+
# A third party stats resource.
|
2846
|
+
class StatsResponse
|
2847
|
+
include Google::Apis::Core::Hashable
|
2848
|
+
|
2849
|
+
# Average session length in minutes of the player. E.g., 1, 30, 60, ... . Not
|
2850
|
+
# populated if there is not enough information.
|
2851
|
+
# Corresponds to the JSON property `avg_session_length_minutes`
|
2852
|
+
# @return [Float]
|
2853
|
+
attr_accessor :avg_session_length_minutes
|
2854
|
+
|
2855
|
+
# The probability of the player not returning to play the game in the next day.
|
2856
|
+
# E.g., 0, 0.1, 0.5, ..., 1.0. Not populated if there is not enough information.
|
2857
|
+
# Corresponds to the JSON property `churn_probability`
|
2858
|
+
# @return [Float]
|
2859
|
+
attr_accessor :churn_probability
|
2860
|
+
|
2861
|
+
# Number of days since the player last played this game. E.g., 0, 1, 5, 10, ... .
|
2862
|
+
# Not populated if there is not enough information.
|
2863
|
+
# Corresponds to the JSON property `days_since_last_played`
|
2864
|
+
# @return [Fixnum]
|
2865
|
+
attr_accessor :days_since_last_played
|
2866
|
+
|
2867
|
+
# The probability of the player going to spend beyond a threshold amount of
|
2868
|
+
# money. E.g., 0, 0.25, 0.50, 0.75. Not populated if there is not enough
|
2869
|
+
# information.
|
2870
|
+
# Corresponds to the JSON property `high_spender_probability`
|
2871
|
+
# @return [Float]
|
2872
|
+
attr_accessor :high_spender_probability
|
2873
|
+
|
2874
|
+
# Uniquely identifies the type of this resource. Value is always the fixed
|
2875
|
+
# string `games#statsResponse`.
|
2876
|
+
# Corresponds to the JSON property `kind`
|
2877
|
+
# @return [String]
|
2878
|
+
attr_accessor :kind
|
2879
|
+
|
2880
|
+
# Number of in-app purchases made by the player in this game. E.g., 0, 1, 5, 10,
|
2881
|
+
# ... . Not populated if there is not enough information.
|
2882
|
+
# Corresponds to the JSON property `num_purchases`
|
2883
|
+
# @return [Fixnum]
|
2884
|
+
attr_accessor :num_purchases
|
2885
|
+
|
2886
|
+
# The approximate number of sessions of the player within the last 28 days,
|
2887
|
+
# where a session begins when the player is connected to Play Games Services and
|
2888
|
+
# ends when they are disconnected. E.g., 0, 1, 5, 10, ... . Not populated if
|
2889
|
+
# there is not enough information.
|
2890
|
+
# Corresponds to the JSON property `num_sessions`
|
2891
|
+
# @return [Fixnum]
|
2892
|
+
attr_accessor :num_sessions
|
2893
|
+
|
2894
|
+
# The approximation of the sessions percentile of the player within the last 30
|
2895
|
+
# days, where a session begins when the player is connected to Play Games
|
2896
|
+
# Services and ends when they are disconnected. E.g., 0, 0.25, 0.5, 0.75. Not
|
2897
|
+
# populated if there is not enough information.
|
2898
|
+
# Corresponds to the JSON property `num_sessions_percentile`
|
2899
|
+
# @return [Float]
|
2900
|
+
attr_accessor :num_sessions_percentile
|
2901
|
+
|
2902
|
+
# The approximate spend percentile of the player in this game. E.g., 0, 0.25, 0.
|
2903
|
+
# 5, 0.75. Not populated if there is not enough information.
|
2904
|
+
# Corresponds to the JSON property `spend_percentile`
|
2905
|
+
# @return [Float]
|
2906
|
+
attr_accessor :spend_percentile
|
2907
|
+
|
2908
|
+
# The probability of the player going to spend the game in the next seven days.
|
2909
|
+
# E.g., 0, 0.25, 0.50, 0.75. Not populated if there is not enough information.
|
2910
|
+
# Corresponds to the JSON property `spend_probability`
|
2911
|
+
# @return [Float]
|
2912
|
+
attr_accessor :spend_probability
|
2913
|
+
|
2914
|
+
# The predicted amount of money that the player going to spend in the next 28
|
2915
|
+
# days. E.g., 1, 30, 60, ... . Not populated if there is not enough information.
|
2916
|
+
# Corresponds to the JSON property `total_spend_next_28_days`
|
2917
|
+
# @return [Float]
|
2918
|
+
attr_accessor :total_spend_next_28_days
|
2919
|
+
|
2920
|
+
def initialize(**args)
|
2921
|
+
update!(**args)
|
2922
|
+
end
|
2923
|
+
|
2924
|
+
# Update properties of this object
|
2925
|
+
def update!(**args)
|
2926
|
+
@avg_session_length_minutes = args[:avg_session_length_minutes] if args.key?(:avg_session_length_minutes)
|
2927
|
+
@churn_probability = args[:churn_probability] if args.key?(:churn_probability)
|
2928
|
+
@days_since_last_played = args[:days_since_last_played] if args.key?(:days_since_last_played)
|
2929
|
+
@high_spender_probability = args[:high_spender_probability] if args.key?(:high_spender_probability)
|
2930
|
+
@kind = args[:kind] if args.key?(:kind)
|
2931
|
+
@num_purchases = args[:num_purchases] if args.key?(:num_purchases)
|
2932
|
+
@num_sessions = args[:num_sessions] if args.key?(:num_sessions)
|
2933
|
+
@num_sessions_percentile = args[:num_sessions_percentile] if args.key?(:num_sessions_percentile)
|
2934
|
+
@spend_percentile = args[:spend_percentile] if args.key?(:spend_percentile)
|
2935
|
+
@spend_probability = args[:spend_probability] if args.key?(:spend_probability)
|
2936
|
+
@total_spend_next_28_days = args[:total_spend_next_28_days] if args.key?(:total_spend_next_28_days)
|
2937
|
+
end
|
2938
|
+
end
|
2939
|
+
end
|
2940
|
+
end
|
2941
|
+
end
|