| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis.games.v1; | 3 library googleapis.games.v1; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| 11 | 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
| 13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
| 14 | 14 |
| 15 const core.String USER_AGENT = 'dart-api-client games/v1'; | 15 const core.String USER_AGENT = 'dart-api-client games/v1'; |
| 16 | 16 |
| 17 /** The API for Google Play Game Services. */ | 17 /// The API for Google Play Game Services. |
| 18 class GamesApi { | 18 class GamesApi { |
| 19 /** View and manage its own configuration data in your Google Drive */ | 19 /// View and manage its own configuration data in your Google Drive |
| 20 static const DriveAppdataScope = "https://www.googleapis.com/auth/drive.appdat
a"; | 20 static const DriveAppdataScope = |
| 21 "https://www.googleapis.com/auth/drive.appdata"; |
| 21 | 22 |
| 22 /** | 23 /// Share your Google+ profile information and view and manage your game |
| 23 * Share your Google+ profile information and view and manage your game | 24 /// activity |
| 24 * activity | |
| 25 */ | |
| 26 static const GamesScope = "https://www.googleapis.com/auth/games"; | 25 static const GamesScope = "https://www.googleapis.com/auth/games"; |
| 27 | 26 |
| 28 /** Know the list of people in your circles, your age range, and language */ | 27 /// Know the list of people in your circles, your age range, and language |
| 29 static const PlusLoginScope = "https://www.googleapis.com/auth/plus.login"; | 28 static const PlusLoginScope = "https://www.googleapis.com/auth/plus.login"; |
| 30 | 29 |
| 31 | |
| 32 final commons.ApiRequester _requester; | 30 final commons.ApiRequester _requester; |
| 33 | 31 |
| 34 AchievementDefinitionsResourceApi get achievementDefinitions => new Achievemen
tDefinitionsResourceApi(_requester); | 32 AchievementDefinitionsResourceApi get achievementDefinitions => |
| 35 AchievementsResourceApi get achievements => new AchievementsResourceApi(_reque
ster); | 33 new AchievementDefinitionsResourceApi(_requester); |
| 36 ApplicationsResourceApi get applications => new ApplicationsResourceApi(_reque
ster); | 34 AchievementsResourceApi get achievements => |
| 35 new AchievementsResourceApi(_requester); |
| 36 ApplicationsResourceApi get applications => |
| 37 new ApplicationsResourceApi(_requester); |
| 37 EventsResourceApi get events => new EventsResourceApi(_requester); | 38 EventsResourceApi get events => new EventsResourceApi(_requester); |
| 38 LeaderboardsResourceApi get leaderboards => new LeaderboardsResourceApi(_reque
ster); | 39 LeaderboardsResourceApi get leaderboards => |
| 40 new LeaderboardsResourceApi(_requester); |
| 39 MetagameResourceApi get metagame => new MetagameResourceApi(_requester); | 41 MetagameResourceApi get metagame => new MetagameResourceApi(_requester); |
| 40 PlayersResourceApi get players => new PlayersResourceApi(_requester); | 42 PlayersResourceApi get players => new PlayersResourceApi(_requester); |
| 41 PushtokensResourceApi get pushtokens => new PushtokensResourceApi(_requester); | 43 PushtokensResourceApi get pushtokens => new PushtokensResourceApi(_requester); |
| 42 QuestMilestonesResourceApi get questMilestones => new QuestMilestonesResourceA
pi(_requester); | 44 QuestMilestonesResourceApi get questMilestones => |
| 45 new QuestMilestonesResourceApi(_requester); |
| 43 QuestsResourceApi get quests => new QuestsResourceApi(_requester); | 46 QuestsResourceApi get quests => new QuestsResourceApi(_requester); |
| 44 RevisionsResourceApi get revisions => new RevisionsResourceApi(_requester); | 47 RevisionsResourceApi get revisions => new RevisionsResourceApi(_requester); |
| 45 RoomsResourceApi get rooms => new RoomsResourceApi(_requester); | 48 RoomsResourceApi get rooms => new RoomsResourceApi(_requester); |
| 46 ScoresResourceApi get scores => new ScoresResourceApi(_requester); | 49 ScoresResourceApi get scores => new ScoresResourceApi(_requester); |
| 47 SnapshotsResourceApi get snapshots => new SnapshotsResourceApi(_requester); | 50 SnapshotsResourceApi get snapshots => new SnapshotsResourceApi(_requester); |
| 48 TurnBasedMatchesResourceApi get turnBasedMatches => new TurnBasedMatchesResour
ceApi(_requester); | 51 TurnBasedMatchesResourceApi get turnBasedMatches => |
| 52 new TurnBasedMatchesResourceApi(_requester); |
| 49 | 53 |
| 50 GamesApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com
/", core.String servicePath: "games/v1/"}) : | 54 GamesApi(http.Client client, |
| 51 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 55 {core.String rootUrl: "https://www.googleapis.com/", |
| 56 core.String servicePath: "games/v1/"}) |
| 57 : _requester = |
| 58 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
| 52 } | 59 } |
| 53 | 60 |
| 54 | |
| 55 class AchievementDefinitionsResourceApi { | 61 class AchievementDefinitionsResourceApi { |
| 56 final commons.ApiRequester _requester; | 62 final commons.ApiRequester _requester; |
| 57 | 63 |
| 58 AchievementDefinitionsResourceApi(commons.ApiRequester client) : | 64 AchievementDefinitionsResourceApi(commons.ApiRequester client) |
| 59 _requester = client; | 65 : _requester = client; |
| 60 | 66 |
| 61 /** | 67 /// Lists all the achievement definitions for your application. |
| 62 * Lists all the achievement definitions for your application. | 68 /// |
| 63 * | 69 /// Request parameters: |
| 64 * Request parameters: | 70 /// |
| 65 * | 71 /// [consistencyToken] - The last-seen mutation timestamp. |
| 66 * [consistencyToken] - The last-seen mutation timestamp. | 72 /// |
| 67 * | 73 /// [language] - The preferred language to use for strings returned by this |
| 68 * [language] - The preferred language to use for strings returned by this | 74 /// method. |
| 69 * method. | 75 /// |
| 70 * | 76 /// [maxResults] - The maximum number of achievement resources to return in |
| 71 * [maxResults] - The maximum number of achievement resources to return in the | 77 /// the response, used for paging. For any response, the actual number of |
| 72 * response, used for paging. For any response, the actual number of | 78 /// achievement resources returned may be less than the specified maxResults. |
| 73 * achievement resources returned may be less than the specified maxResults. | 79 /// Value must be between "1" and "200". |
| 74 * Value must be between "1" and "200". | 80 /// |
| 75 * | 81 /// [pageToken] - The token returned by the previous request. |
| 76 * [pageToken] - The token returned by the previous request. | 82 /// |
| 77 * | 83 /// Completes with a [AchievementDefinitionsListResponse]. |
| 78 * Completes with a [AchievementDefinitionsListResponse]. | 84 /// |
| 79 * | 85 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 80 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 86 /// an error. |
| 81 * error. | 87 /// |
| 82 * | 88 /// If the used [http.Client] completes with an error when making a REST |
| 83 * If the used [http.Client] completes with an error when making a REST call, | 89 /// call, this method will complete with the same error. |
| 84 * this method will complete with the same error. | 90 async.Future<AchievementDefinitionsListResponse> list( |
| 85 */ | 91 {core.String consistencyToken, |
| 86 async.Future<AchievementDefinitionsListResponse> list({core.String consistency
Token, core.String language, core.int maxResults, core.String pageToken}) { | 92 core.String language, |
| 93 core.int maxResults, |
| 94 core.String pageToken}) { |
| 87 var _url = null; | 95 var _url = null; |
| 88 var _queryParams = new core.Map(); | 96 var _queryParams = new core.Map(); |
| 89 var _uploadMedia = null; | 97 var _uploadMedia = null; |
| 90 var _uploadOptions = null; | 98 var _uploadOptions = null; |
| 91 var _downloadOptions = commons.DownloadOptions.Metadata; | 99 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 92 var _body = null; | 100 var _body = null; |
| 93 | 101 |
| 94 if (consistencyToken != null) { | 102 if (consistencyToken != null) { |
| 95 _queryParams["consistencyToken"] = [consistencyToken]; | 103 _queryParams["consistencyToken"] = [consistencyToken]; |
| 96 } | 104 } |
| 97 if (language != null) { | 105 if (language != null) { |
| 98 _queryParams["language"] = [language]; | 106 _queryParams["language"] = [language]; |
| 99 } | 107 } |
| 100 if (maxResults != null) { | 108 if (maxResults != null) { |
| 101 _queryParams["maxResults"] = ["${maxResults}"]; | 109 _queryParams["maxResults"] = ["${maxResults}"]; |
| 102 } | 110 } |
| 103 if (pageToken != null) { | 111 if (pageToken != null) { |
| 104 _queryParams["pageToken"] = [pageToken]; | 112 _queryParams["pageToken"] = [pageToken]; |
| 105 } | 113 } |
| 106 | 114 |
| 107 _url = 'achievements'; | 115 _url = 'achievements'; |
| 108 | 116 |
| 109 var _response = _requester.request(_url, | 117 var _response = _requester.request(_url, "GET", |
| 110 "GET", | 118 body: _body, |
| 111 body: _body, | 119 queryParams: _queryParams, |
| 112 queryParams: _queryParams, | 120 uploadOptions: _uploadOptions, |
| 113 uploadOptions: _uploadOptions, | 121 uploadMedia: _uploadMedia, |
| 114 uploadMedia: _uploadMedia, | 122 downloadOptions: _downloadOptions); |
| 115 downloadOptions: _downloadOptions); | 123 return _response |
| 116 return _response.then((data) => new AchievementDefinitionsListResponse.fromJ
son(data)); | 124 .then((data) => new AchievementDefinitionsListResponse.fromJson(data)); |
| 117 } | 125 } |
| 118 | |
| 119 } | 126 } |
| 120 | 127 |
| 121 | |
| 122 class AchievementsResourceApi { | 128 class AchievementsResourceApi { |
| 123 final commons.ApiRequester _requester; | 129 final commons.ApiRequester _requester; |
| 124 | 130 |
| 125 AchievementsResourceApi(commons.ApiRequester client) : | 131 AchievementsResourceApi(commons.ApiRequester client) : _requester = client; |
| 126 _requester = client; | |
| 127 | 132 |
| 128 /** | 133 /// Increments the steps of the achievement with the given ID for the |
| 129 * Increments the steps of the achievement with the given ID for the currently | 134 /// currently authenticated player. |
| 130 * authenticated player. | 135 /// |
| 131 * | 136 /// Request parameters: |
| 132 * Request parameters: | 137 /// |
| 133 * | 138 /// [achievementId] - The ID of the achievement used by this method. |
| 134 * [achievementId] - The ID of the achievement used by this method. | 139 /// |
| 135 * | 140 /// [stepsToIncrement] - The number of steps to increment. |
| 136 * [stepsToIncrement] - The number of steps to increment. | 141 /// |
| 137 * | 142 /// [consistencyToken] - The last-seen mutation timestamp. |
| 138 * [consistencyToken] - The last-seen mutation timestamp. | 143 /// |
| 139 * | 144 /// [requestId] - A randomly generated numeric ID for each request specified |
| 140 * [requestId] - A randomly generated numeric ID for each request specified by | 145 /// by the caller. This number is used at the server to ensure that the |
| 141 * the caller. This number is used at the server to ensure that the request is | 146 /// request is handled correctly across retries. |
| 142 * handled correctly across retries. | 147 /// |
| 143 * | 148 /// Completes with a [AchievementIncrementResponse]. |
| 144 * Completes with a [AchievementIncrementResponse]. | 149 /// |
| 145 * | 150 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 146 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 151 /// an error. |
| 147 * error. | 152 /// |
| 148 * | 153 /// If the used [http.Client] completes with an error when making a REST |
| 149 * If the used [http.Client] completes with an error when making a REST call, | 154 /// call, this method will complete with the same error. |
| 150 * this method will complete with the same error. | 155 async.Future<AchievementIncrementResponse> increment( |
| 151 */ | 156 core.String achievementId, core.int stepsToIncrement, |
| 152 async.Future<AchievementIncrementResponse> increment(core.String achievementId
, core.int stepsToIncrement, {core.String consistencyToken, core.String requestI
d}) { | 157 {core.String consistencyToken, core.String requestId}) { |
| 153 var _url = null; | 158 var _url = null; |
| 154 var _queryParams = new core.Map(); | 159 var _queryParams = new core.Map(); |
| 155 var _uploadMedia = null; | 160 var _uploadMedia = null; |
| 156 var _uploadOptions = null; | 161 var _uploadOptions = null; |
| 157 var _downloadOptions = commons.DownloadOptions.Metadata; | 162 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 158 var _body = null; | 163 var _body = null; |
| 159 | 164 |
| 160 if (achievementId == null) { | 165 if (achievementId == null) { |
| 161 throw new core.ArgumentError("Parameter achievementId is required."); | 166 throw new core.ArgumentError("Parameter achievementId is required."); |
| 162 } | 167 } |
| 163 if (stepsToIncrement == null) { | 168 if (stepsToIncrement == null) { |
| 164 throw new core.ArgumentError("Parameter stepsToIncrement is required."); | 169 throw new core.ArgumentError("Parameter stepsToIncrement is required."); |
| 165 } | 170 } |
| 166 _queryParams["stepsToIncrement"] = ["${stepsToIncrement}"]; | 171 _queryParams["stepsToIncrement"] = ["${stepsToIncrement}"]; |
| 167 if (consistencyToken != null) { | 172 if (consistencyToken != null) { |
| 168 _queryParams["consistencyToken"] = [consistencyToken]; | 173 _queryParams["consistencyToken"] = [consistencyToken]; |
| 169 } | 174 } |
| 170 if (requestId != null) { | 175 if (requestId != null) { |
| 171 _queryParams["requestId"] = [requestId]; | 176 _queryParams["requestId"] = [requestId]; |
| 172 } | 177 } |
| 173 | 178 |
| 174 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + '
/increment'; | 179 _url = 'achievements/' + |
| 180 commons.Escaper.ecapeVariable('$achievementId') + |
| 181 '/increment'; |
| 175 | 182 |
| 176 var _response = _requester.request(_url, | 183 var _response = _requester.request(_url, "POST", |
| 177 "POST", | 184 body: _body, |
| 178 body: _body, | 185 queryParams: _queryParams, |
| 179 queryParams: _queryParams, | 186 uploadOptions: _uploadOptions, |
| 180 uploadOptions: _uploadOptions, | 187 uploadMedia: _uploadMedia, |
| 181 uploadMedia: _uploadMedia, | 188 downloadOptions: _downloadOptions); |
| 182 downloadOptions: _downloadOptions); | 189 return _response |
| 183 return _response.then((data) => new AchievementIncrementResponse.fromJson(da
ta)); | 190 .then((data) => new AchievementIncrementResponse.fromJson(data)); |
| 184 } | 191 } |
| 185 | 192 |
| 186 /** | 193 /// Lists the progress for all your application's achievements for the |
| 187 * Lists the progress for all your application's achievements for the | 194 /// currently authenticated player. |
| 188 * currently authenticated player. | 195 /// |
| 189 * | 196 /// Request parameters: |
| 190 * Request parameters: | 197 /// |
| 191 * | 198 /// [playerId] - A player ID. A value of me may be used in place of the |
| 192 * [playerId] - A player ID. A value of me may be used in place of the | 199 /// authenticated player's ID. |
| 193 * authenticated player's ID. | 200 /// |
| 194 * | 201 /// [consistencyToken] - The last-seen mutation timestamp. |
| 195 * [consistencyToken] - The last-seen mutation timestamp. | 202 /// |
| 196 * | 203 /// [language] - The preferred language to use for strings returned by this |
| 197 * [language] - The preferred language to use for strings returned by this | 204 /// method. |
| 198 * method. | 205 /// |
| 199 * | 206 /// [maxResults] - The maximum number of achievement resources to return in |
| 200 * [maxResults] - The maximum number of achievement resources to return in the | 207 /// the response, used for paging. For any response, the actual number of |
| 201 * response, used for paging. For any response, the actual number of | 208 /// achievement resources returned may be less than the specified maxResults. |
| 202 * achievement resources returned may be less than the specified maxResults. | 209 /// Value must be between "1" and "200". |
| 203 * Value must be between "1" and "200". | 210 /// |
| 204 * | 211 /// [pageToken] - The token returned by the previous request. |
| 205 * [pageToken] - The token returned by the previous request. | 212 /// |
| 206 * | 213 /// [state] - Tells the server to return only achievements with the specified |
| 207 * [state] - Tells the server to return only achievements with the specified | 214 /// state. If this parameter isn't specified, all achievements are returned. |
| 208 * state. If this parameter isn't specified, all achievements are returned. | 215 /// Possible string values are: |
| 209 * Possible string values are: | 216 /// - "ALL" : List all achievements. This is the default. |
| 210 * - "ALL" : List all achievements. This is the default. | 217 /// - "HIDDEN" : List only hidden achievements. |
| 211 * - "HIDDEN" : List only hidden achievements. | 218 /// - "REVEALED" : List only revealed achievements. |
| 212 * - "REVEALED" : List only revealed achievements. | 219 /// - "UNLOCKED" : List only unlocked achievements. |
| 213 * - "UNLOCKED" : List only unlocked achievements. | 220 /// |
| 214 * | 221 /// Completes with a [PlayerAchievementListResponse]. |
| 215 * Completes with a [PlayerAchievementListResponse]. | 222 /// |
| 216 * | 223 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 217 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 224 /// an error. |
| 218 * error. | 225 /// |
| 219 * | 226 /// If the used [http.Client] completes with an error when making a REST |
| 220 * If the used [http.Client] completes with an error when making a REST call, | 227 /// call, this method will complete with the same error. |
| 221 * this method will complete with the same error. | 228 async.Future<PlayerAchievementListResponse> list(core.String playerId, |
| 222 */ | 229 {core.String consistencyToken, |
| 223 async.Future<PlayerAchievementListResponse> list(core.String playerId, {core.S
tring consistencyToken, core.String language, core.int maxResults, core.String p
ageToken, core.String state}) { | 230 core.String language, |
| 231 core.int maxResults, |
| 232 core.String pageToken, |
| 233 core.String state}) { |
| 224 var _url = null; | 234 var _url = null; |
| 225 var _queryParams = new core.Map(); | 235 var _queryParams = new core.Map(); |
| 226 var _uploadMedia = null; | 236 var _uploadMedia = null; |
| 227 var _uploadOptions = null; | 237 var _uploadOptions = null; |
| 228 var _downloadOptions = commons.DownloadOptions.Metadata; | 238 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 229 var _body = null; | 239 var _body = null; |
| 230 | 240 |
| 231 if (playerId == null) { | 241 if (playerId == null) { |
| 232 throw new core.ArgumentError("Parameter playerId is required."); | 242 throw new core.ArgumentError("Parameter playerId is required."); |
| 233 } | 243 } |
| 234 if (consistencyToken != null) { | 244 if (consistencyToken != null) { |
| 235 _queryParams["consistencyToken"] = [consistencyToken]; | 245 _queryParams["consistencyToken"] = [consistencyToken]; |
| 236 } | 246 } |
| 237 if (language != null) { | 247 if (language != null) { |
| 238 _queryParams["language"] = [language]; | 248 _queryParams["language"] = [language]; |
| 239 } | 249 } |
| 240 if (maxResults != null) { | 250 if (maxResults != null) { |
| 241 _queryParams["maxResults"] = ["${maxResults}"]; | 251 _queryParams["maxResults"] = ["${maxResults}"]; |
| 242 } | 252 } |
| 243 if (pageToken != null) { | 253 if (pageToken != null) { |
| 244 _queryParams["pageToken"] = [pageToken]; | 254 _queryParams["pageToken"] = [pageToken]; |
| 245 } | 255 } |
| 246 if (state != null) { | 256 if (state != null) { |
| 247 _queryParams["state"] = [state]; | 257 _queryParams["state"] = [state]; |
| 248 } | 258 } |
| 249 | 259 |
| 250 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId') + '/achieveme
nts'; | 260 _url = 'players/' + |
| 261 commons.Escaper.ecapeVariable('$playerId') + |
| 262 '/achievements'; |
| 251 | 263 |
| 252 var _response = _requester.request(_url, | 264 var _response = _requester.request(_url, "GET", |
| 253 "GET", | 265 body: _body, |
| 254 body: _body, | 266 queryParams: _queryParams, |
| 255 queryParams: _queryParams, | 267 uploadOptions: _uploadOptions, |
| 256 uploadOptions: _uploadOptions, | 268 uploadMedia: _uploadMedia, |
| 257 uploadMedia: _uploadMedia, | 269 downloadOptions: _downloadOptions); |
| 258 downloadOptions: _downloadOptions); | 270 return _response |
| 259 return _response.then((data) => new PlayerAchievementListResponse.fromJson(d
ata)); | 271 .then((data) => new PlayerAchievementListResponse.fromJson(data)); |
| 260 } | 272 } |
| 261 | 273 |
| 262 /** | 274 /// Sets the state of the achievement with the given ID to REVEALED for the |
| 263 * Sets the state of the achievement with the given ID to REVEALED for the | 275 /// currently authenticated player. |
| 264 * currently authenticated player. | 276 /// |
| 265 * | 277 /// Request parameters: |
| 266 * Request parameters: | 278 /// |
| 267 * | 279 /// [achievementId] - The ID of the achievement used by this method. |
| 268 * [achievementId] - The ID of the achievement used by this method. | 280 /// |
| 269 * | 281 /// [consistencyToken] - The last-seen mutation timestamp. |
| 270 * [consistencyToken] - The last-seen mutation timestamp. | 282 /// |
| 271 * | 283 /// Completes with a [AchievementRevealResponse]. |
| 272 * Completes with a [AchievementRevealResponse]. | 284 /// |
| 273 * | 285 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 274 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 286 /// an error. |
| 275 * error. | 287 /// |
| 276 * | 288 /// If the used [http.Client] completes with an error when making a REST |
| 277 * If the used [http.Client] completes with an error when making a REST call, | 289 /// call, this method will complete with the same error. |
| 278 * this method will complete with the same error. | 290 async.Future<AchievementRevealResponse> reveal(core.String achievementId, |
| 279 */ | 291 {core.String consistencyToken}) { |
| 280 async.Future<AchievementRevealResponse> reveal(core.String achievementId, {cor
e.String consistencyToken}) { | |
| 281 var _url = null; | 292 var _url = null; |
| 282 var _queryParams = new core.Map(); | 293 var _queryParams = new core.Map(); |
| 283 var _uploadMedia = null; | 294 var _uploadMedia = null; |
| 284 var _uploadOptions = null; | 295 var _uploadOptions = null; |
| 285 var _downloadOptions = commons.DownloadOptions.Metadata; | 296 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 286 var _body = null; | 297 var _body = null; |
| 287 | 298 |
| 288 if (achievementId == null) { | 299 if (achievementId == null) { |
| 289 throw new core.ArgumentError("Parameter achievementId is required."); | 300 throw new core.ArgumentError("Parameter achievementId is required."); |
| 290 } | 301 } |
| 291 if (consistencyToken != null) { | 302 if (consistencyToken != null) { |
| 292 _queryParams["consistencyToken"] = [consistencyToken]; | 303 _queryParams["consistencyToken"] = [consistencyToken]; |
| 293 } | 304 } |
| 294 | 305 |
| 295 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + '
/reveal'; | 306 _url = 'achievements/' + |
| 307 commons.Escaper.ecapeVariable('$achievementId') + |
| 308 '/reveal'; |
| 296 | 309 |
| 297 var _response = _requester.request(_url, | 310 var _response = _requester.request(_url, "POST", |
| 298 "POST", | 311 body: _body, |
| 299 body: _body, | 312 queryParams: _queryParams, |
| 300 queryParams: _queryParams, | 313 uploadOptions: _uploadOptions, |
| 301 uploadOptions: _uploadOptions, | 314 uploadMedia: _uploadMedia, |
| 302 uploadMedia: _uploadMedia, | 315 downloadOptions: _downloadOptions); |
| 303 downloadOptions: _downloadOptions); | 316 return _response |
| 304 return _response.then((data) => new AchievementRevealResponse.fromJson(data)
); | 317 .then((data) => new AchievementRevealResponse.fromJson(data)); |
| 305 } | 318 } |
| 306 | 319 |
| 307 /** | 320 /// Sets the steps for the currently authenticated player towards unlocking |
| 308 * Sets the steps for the currently authenticated player towards unlocking an | 321 /// an achievement. If the steps parameter is less than the current number of |
| 309 * achievement. If the steps parameter is less than the current number of | 322 /// steps that the player already gained for the achievement, the achievement |
| 310 * steps that the player already gained for the achievement, the achievement | 323 /// is not modified. |
| 311 * is not modified. | 324 /// |
| 312 * | 325 /// Request parameters: |
| 313 * Request parameters: | 326 /// |
| 314 * | 327 /// [achievementId] - The ID of the achievement used by this method. |
| 315 * [achievementId] - The ID of the achievement used by this method. | 328 /// |
| 316 * | 329 /// [steps] - The minimum value to set the steps to. |
| 317 * [steps] - The minimum value to set the steps to. | 330 /// |
| 318 * | 331 /// [consistencyToken] - The last-seen mutation timestamp. |
| 319 * [consistencyToken] - The last-seen mutation timestamp. | 332 /// |
| 320 * | 333 /// Completes with a [AchievementSetStepsAtLeastResponse]. |
| 321 * Completes with a [AchievementSetStepsAtLeastResponse]. | 334 /// |
| 322 * | 335 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 323 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 336 /// an error. |
| 324 * error. | 337 /// |
| 325 * | 338 /// If the used [http.Client] completes with an error when making a REST |
| 326 * If the used [http.Client] completes with an error when making a REST call, | 339 /// call, this method will complete with the same error. |
| 327 * this method will complete with the same error. | 340 async.Future<AchievementSetStepsAtLeastResponse> setStepsAtLeast( |
| 328 */ | 341 core.String achievementId, core.int steps, |
| 329 async.Future<AchievementSetStepsAtLeastResponse> setStepsAtLeast(core.String a
chievementId, core.int steps, {core.String consistencyToken}) { | 342 {core.String consistencyToken}) { |
| 330 var _url = null; | 343 var _url = null; |
| 331 var _queryParams = new core.Map(); | 344 var _queryParams = new core.Map(); |
| 332 var _uploadMedia = null; | 345 var _uploadMedia = null; |
| 333 var _uploadOptions = null; | 346 var _uploadOptions = null; |
| 334 var _downloadOptions = commons.DownloadOptions.Metadata; | 347 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 335 var _body = null; | 348 var _body = null; |
| 336 | 349 |
| 337 if (achievementId == null) { | 350 if (achievementId == null) { |
| 338 throw new core.ArgumentError("Parameter achievementId is required."); | 351 throw new core.ArgumentError("Parameter achievementId is required."); |
| 339 } | 352 } |
| 340 if (steps == null) { | 353 if (steps == null) { |
| 341 throw new core.ArgumentError("Parameter steps is required."); | 354 throw new core.ArgumentError("Parameter steps is required."); |
| 342 } | 355 } |
| 343 _queryParams["steps"] = ["${steps}"]; | 356 _queryParams["steps"] = ["${steps}"]; |
| 344 if (consistencyToken != null) { | 357 if (consistencyToken != null) { |
| 345 _queryParams["consistencyToken"] = [consistencyToken]; | 358 _queryParams["consistencyToken"] = [consistencyToken]; |
| 346 } | 359 } |
| 347 | 360 |
| 348 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + '
/setStepsAtLeast'; | 361 _url = 'achievements/' + |
| 362 commons.Escaper.ecapeVariable('$achievementId') + |
| 363 '/setStepsAtLeast'; |
| 349 | 364 |
| 350 var _response = _requester.request(_url, | 365 var _response = _requester.request(_url, "POST", |
| 351 "POST", | 366 body: _body, |
| 352 body: _body, | 367 queryParams: _queryParams, |
| 353 queryParams: _queryParams, | 368 uploadOptions: _uploadOptions, |
| 354 uploadOptions: _uploadOptions, | 369 uploadMedia: _uploadMedia, |
| 355 uploadMedia: _uploadMedia, | 370 downloadOptions: _downloadOptions); |
| 356 downloadOptions: _downloadOptions); | 371 return _response |
| 357 return _response.then((data) => new AchievementSetStepsAtLeastResponse.fromJ
son(data)); | 372 .then((data) => new AchievementSetStepsAtLeastResponse.fromJson(data)); |
| 358 } | 373 } |
| 359 | 374 |
| 360 /** | 375 /// Unlocks this achievement for the currently authenticated player. |
| 361 * Unlocks this achievement for the currently authenticated player. | 376 /// |
| 362 * | 377 /// Request parameters: |
| 363 * Request parameters: | 378 /// |
| 364 * | 379 /// [achievementId] - The ID of the achievement used by this method. |
| 365 * [achievementId] - The ID of the achievement used by this method. | 380 /// |
| 366 * | 381 /// [consistencyToken] - The last-seen mutation timestamp. |
| 367 * [consistencyToken] - The last-seen mutation timestamp. | 382 /// |
| 368 * | 383 /// Completes with a [AchievementUnlockResponse]. |
| 369 * Completes with a [AchievementUnlockResponse]. | 384 /// |
| 370 * | 385 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 371 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 386 /// an error. |
| 372 * error. | 387 /// |
| 373 * | 388 /// If the used [http.Client] completes with an error when making a REST |
| 374 * If the used [http.Client] completes with an error when making a REST call, | 389 /// call, this method will complete with the same error. |
| 375 * this method will complete with the same error. | 390 async.Future<AchievementUnlockResponse> unlock(core.String achievementId, |
| 376 */ | 391 {core.String consistencyToken}) { |
| 377 async.Future<AchievementUnlockResponse> unlock(core.String achievementId, {cor
e.String consistencyToken}) { | |
| 378 var _url = null; | 392 var _url = null; |
| 379 var _queryParams = new core.Map(); | 393 var _queryParams = new core.Map(); |
| 380 var _uploadMedia = null; | 394 var _uploadMedia = null; |
| 381 var _uploadOptions = null; | 395 var _uploadOptions = null; |
| 382 var _downloadOptions = commons.DownloadOptions.Metadata; | 396 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 383 var _body = null; | 397 var _body = null; |
| 384 | 398 |
| 385 if (achievementId == null) { | 399 if (achievementId == null) { |
| 386 throw new core.ArgumentError("Parameter achievementId is required."); | 400 throw new core.ArgumentError("Parameter achievementId is required."); |
| 387 } | 401 } |
| 388 if (consistencyToken != null) { | 402 if (consistencyToken != null) { |
| 389 _queryParams["consistencyToken"] = [consistencyToken]; | 403 _queryParams["consistencyToken"] = [consistencyToken]; |
| 390 } | 404 } |
| 391 | 405 |
| 392 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + '
/unlock'; | 406 _url = 'achievements/' + |
| 407 commons.Escaper.ecapeVariable('$achievementId') + |
| 408 '/unlock'; |
| 393 | 409 |
| 394 var _response = _requester.request(_url, | 410 var _response = _requester.request(_url, "POST", |
| 395 "POST", | 411 body: _body, |
| 396 body: _body, | 412 queryParams: _queryParams, |
| 397 queryParams: _queryParams, | 413 uploadOptions: _uploadOptions, |
| 398 uploadOptions: _uploadOptions, | 414 uploadMedia: _uploadMedia, |
| 399 uploadMedia: _uploadMedia, | 415 downloadOptions: _downloadOptions); |
| 400 downloadOptions: _downloadOptions); | 416 return _response |
| 401 return _response.then((data) => new AchievementUnlockResponse.fromJson(data)
); | 417 .then((data) => new AchievementUnlockResponse.fromJson(data)); |
| 402 } | 418 } |
| 403 | 419 |
| 404 /** | 420 /// Updates multiple achievements for the currently authenticated player. |
| 405 * Updates multiple achievements for the currently authenticated player. | 421 /// |
| 406 * | 422 /// [request] - The metadata request object. |
| 407 * [request] - The metadata request object. | 423 /// |
| 408 * | 424 /// Request parameters: |
| 409 * Request parameters: | 425 /// |
| 410 * | 426 /// [consistencyToken] - The last-seen mutation timestamp. |
| 411 * [consistencyToken] - The last-seen mutation timestamp. | 427 /// |
| 412 * | 428 /// Completes with a [AchievementUpdateMultipleResponse]. |
| 413 * Completes with a [AchievementUpdateMultipleResponse]. | 429 /// |
| 414 * | 430 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 415 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 431 /// an error. |
| 416 * error. | 432 /// |
| 417 * | 433 /// If the used [http.Client] completes with an error when making a REST |
| 418 * If the used [http.Client] completes with an error when making a REST call, | 434 /// call, this method will complete with the same error. |
| 419 * this method will complete with the same error. | 435 async.Future<AchievementUpdateMultipleResponse> updateMultiple( |
| 420 */ | 436 AchievementUpdateMultipleRequest request, |
| 421 async.Future<AchievementUpdateMultipleResponse> updateMultiple(AchievementUpda
teMultipleRequest request, {core.String consistencyToken}) { | 437 {core.String consistencyToken}) { |
| 422 var _url = null; | 438 var _url = null; |
| 423 var _queryParams = new core.Map(); | 439 var _queryParams = new core.Map(); |
| 424 var _uploadMedia = null; | 440 var _uploadMedia = null; |
| 425 var _uploadOptions = null; | 441 var _uploadOptions = null; |
| 426 var _downloadOptions = commons.DownloadOptions.Metadata; | 442 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 427 var _body = null; | 443 var _body = null; |
| 428 | 444 |
| 429 if (request != null) { | 445 if (request != null) { |
| 430 _body = convert.JSON.encode((request).toJson()); | 446 _body = convert.JSON.encode((request).toJson()); |
| 431 } | 447 } |
| 432 if (consistencyToken != null) { | 448 if (consistencyToken != null) { |
| 433 _queryParams["consistencyToken"] = [consistencyToken]; | 449 _queryParams["consistencyToken"] = [consistencyToken]; |
| 434 } | 450 } |
| 435 | 451 |
| 436 _url = 'achievements/updateMultiple'; | 452 _url = 'achievements/updateMultiple'; |
| 437 | 453 |
| 438 var _response = _requester.request(_url, | 454 var _response = _requester.request(_url, "POST", |
| 439 "POST", | 455 body: _body, |
| 440 body: _body, | 456 queryParams: _queryParams, |
| 441 queryParams: _queryParams, | 457 uploadOptions: _uploadOptions, |
| 442 uploadOptions: _uploadOptions, | 458 uploadMedia: _uploadMedia, |
| 443 uploadMedia: _uploadMedia, | 459 downloadOptions: _downloadOptions); |
| 444 downloadOptions: _downloadOptions); | 460 return _response |
| 445 return _response.then((data) => new AchievementUpdateMultipleResponse.fromJs
on(data)); | 461 .then((data) => new AchievementUpdateMultipleResponse.fromJson(data)); |
| 446 } | 462 } |
| 447 | |
| 448 } | 463 } |
| 449 | 464 |
| 450 | |
| 451 class ApplicationsResourceApi { | 465 class ApplicationsResourceApi { |
| 452 final commons.ApiRequester _requester; | 466 final commons.ApiRequester _requester; |
| 453 | 467 |
| 454 ApplicationsResourceApi(commons.ApiRequester client) : | 468 ApplicationsResourceApi(commons.ApiRequester client) : _requester = client; |
| 455 _requester = client; | |
| 456 | 469 |
| 457 /** | 470 /// Retrieves the metadata of the application with the given ID. If the |
| 458 * Retrieves the metadata of the application with the given ID. If the | 471 /// requested application is not available for the specified platformType, |
| 459 * requested application is not available for the specified platformType, the | 472 /// the returned response will not include any instance data. |
| 460 * returned response will not include any instance data. | 473 /// |
| 461 * | 474 /// Request parameters: |
| 462 * Request parameters: | 475 /// |
| 463 * | 476 /// [applicationId] - The application ID from the Google Play developer |
| 464 * [applicationId] - The application ID from the Google Play developer | 477 /// console. |
| 465 * console. | 478 /// |
| 466 * | 479 /// [consistencyToken] - The last-seen mutation timestamp. |
| 467 * [consistencyToken] - The last-seen mutation timestamp. | 480 /// |
| 468 * | 481 /// [language] - The preferred language to use for strings returned by this |
| 469 * [language] - The preferred language to use for strings returned by this | 482 /// method. |
| 470 * method. | 483 /// |
| 471 * | 484 /// [platformType] - Restrict application details returned to the specific |
| 472 * [platformType] - Restrict application details returned to the specific | 485 /// platform. |
| 473 * platform. | 486 /// Possible string values are: |
| 474 * Possible string values are: | 487 /// - "ANDROID" : Retrieve applications that can be played on Android. |
| 475 * - "ANDROID" : Retrieve applications that can be played on Android. | 488 /// - "IOS" : Retrieve applications that can be played on iOS. |
| 476 * - "IOS" : Retrieve applications that can be played on iOS. | 489 /// - "WEB_APP" : Retrieve applications that can be played on desktop web. |
| 477 * - "WEB_APP" : Retrieve applications that can be played on desktop web. | 490 /// |
| 478 * | 491 /// Completes with a [Application]. |
| 479 * Completes with a [Application]. | 492 /// |
| 480 * | 493 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 481 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 494 /// an error. |
| 482 * error. | 495 /// |
| 483 * | 496 /// If the used [http.Client] completes with an error when making a REST |
| 484 * If the used [http.Client] completes with an error when making a REST call, | 497 /// call, this method will complete with the same error. |
| 485 * this method will complete with the same error. | 498 async.Future<Application> get(core.String applicationId, |
| 486 */ | 499 {core.String consistencyToken, |
| 487 async.Future<Application> get(core.String applicationId, {core.String consiste
ncyToken, core.String language, core.String platformType}) { | 500 core.String language, |
| 501 core.String platformType}) { |
| 488 var _url = null; | 502 var _url = null; |
| 489 var _queryParams = new core.Map(); | 503 var _queryParams = new core.Map(); |
| 490 var _uploadMedia = null; | 504 var _uploadMedia = null; |
| 491 var _uploadOptions = null; | 505 var _uploadOptions = null; |
| 492 var _downloadOptions = commons.DownloadOptions.Metadata; | 506 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 493 var _body = null; | 507 var _body = null; |
| 494 | 508 |
| 495 if (applicationId == null) { | 509 if (applicationId == null) { |
| 496 throw new core.ArgumentError("Parameter applicationId is required."); | 510 throw new core.ArgumentError("Parameter applicationId is required."); |
| 497 } | 511 } |
| 498 if (consistencyToken != null) { | 512 if (consistencyToken != null) { |
| 499 _queryParams["consistencyToken"] = [consistencyToken]; | 513 _queryParams["consistencyToken"] = [consistencyToken]; |
| 500 } | 514 } |
| 501 if (language != null) { | 515 if (language != null) { |
| 502 _queryParams["language"] = [language]; | 516 _queryParams["language"] = [language]; |
| 503 } | 517 } |
| 504 if (platformType != null) { | 518 if (platformType != null) { |
| 505 _queryParams["platformType"] = [platformType]; | 519 _queryParams["platformType"] = [platformType]; |
| 506 } | 520 } |
| 507 | 521 |
| 508 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId'); | 522 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId'); |
| 509 | 523 |
| 510 var _response = _requester.request(_url, | 524 var _response = _requester.request(_url, "GET", |
| 511 "GET", | 525 body: _body, |
| 512 body: _body, | 526 queryParams: _queryParams, |
| 513 queryParams: _queryParams, | 527 uploadOptions: _uploadOptions, |
| 514 uploadOptions: _uploadOptions, | 528 uploadMedia: _uploadMedia, |
| 515 uploadMedia: _uploadMedia, | 529 downloadOptions: _downloadOptions); |
| 516 downloadOptions: _downloadOptions); | |
| 517 return _response.then((data) => new Application.fromJson(data)); | 530 return _response.then((data) => new Application.fromJson(data)); |
| 518 } | 531 } |
| 519 | 532 |
| 520 /** | 533 /// Indicate that the the currently authenticated user is playing your |
| 521 * Indicate that the the currently authenticated user is playing your | 534 /// application. |
| 522 * application. | 535 /// |
| 523 * | 536 /// Request parameters: |
| 524 * Request parameters: | 537 /// |
| 525 * | 538 /// [consistencyToken] - The last-seen mutation timestamp. |
| 526 * [consistencyToken] - The last-seen mutation timestamp. | 539 /// |
| 527 * | 540 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 528 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 541 /// an error. |
| 529 * error. | 542 /// |
| 530 * | 543 /// If the used [http.Client] completes with an error when making a REST |
| 531 * If the used [http.Client] completes with an error when making a REST call, | 544 /// call, this method will complete with the same error. |
| 532 * this method will complete with the same error. | |
| 533 */ | |
| 534 async.Future played({core.String consistencyToken}) { | 545 async.Future played({core.String consistencyToken}) { |
| 535 var _url = null; | 546 var _url = null; |
| 536 var _queryParams = new core.Map(); | 547 var _queryParams = new core.Map(); |
| 537 var _uploadMedia = null; | 548 var _uploadMedia = null; |
| 538 var _uploadOptions = null; | 549 var _uploadOptions = null; |
| 539 var _downloadOptions = commons.DownloadOptions.Metadata; | 550 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 540 var _body = null; | 551 var _body = null; |
| 541 | 552 |
| 542 if (consistencyToken != null) { | 553 if (consistencyToken != null) { |
| 543 _queryParams["consistencyToken"] = [consistencyToken]; | 554 _queryParams["consistencyToken"] = [consistencyToken]; |
| 544 } | 555 } |
| 545 | 556 |
| 546 _downloadOptions = null; | 557 _downloadOptions = null; |
| 547 | 558 |
| 548 _url = 'applications/played'; | 559 _url = 'applications/played'; |
| 549 | 560 |
| 550 var _response = _requester.request(_url, | 561 var _response = _requester.request(_url, "POST", |
| 551 "POST", | 562 body: _body, |
| 552 body: _body, | 563 queryParams: _queryParams, |
| 553 queryParams: _queryParams, | 564 uploadOptions: _uploadOptions, |
| 554 uploadOptions: _uploadOptions, | 565 uploadMedia: _uploadMedia, |
| 555 uploadMedia: _uploadMedia, | 566 downloadOptions: _downloadOptions); |
| 556 downloadOptions: _downloadOptions); | |
| 557 return _response.then((data) => null); | 567 return _response.then((data) => null); |
| 558 } | 568 } |
| 559 | 569 |
| 560 /** | 570 /// Verifies the auth token provided with this request is for the application |
| 561 * Verifies the auth token provided with this request is for the application | 571 /// with the specified ID, and returns the ID of the player it was granted |
| 562 * with the specified ID, and returns the ID of the player it was granted for. | 572 /// for. |
| 563 * | 573 /// |
| 564 * Request parameters: | 574 /// Request parameters: |
| 565 * | 575 /// |
| 566 * [applicationId] - The application ID from the Google Play developer | 576 /// [applicationId] - The application ID from the Google Play developer |
| 567 * console. | 577 /// console. |
| 568 * | 578 /// |
| 569 * [consistencyToken] - The last-seen mutation timestamp. | 579 /// [consistencyToken] - The last-seen mutation timestamp. |
| 570 * | 580 /// |
| 571 * Completes with a [ApplicationVerifyResponse]. | 581 /// Completes with a [ApplicationVerifyResponse]. |
| 572 * | 582 /// |
| 573 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 583 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 574 * error. | 584 /// an error. |
| 575 * | 585 /// |
| 576 * If the used [http.Client] completes with an error when making a REST call, | 586 /// If the used [http.Client] completes with an error when making a REST |
| 577 * this method will complete with the same error. | 587 /// call, this method will complete with the same error. |
| 578 */ | 588 async.Future<ApplicationVerifyResponse> verify(core.String applicationId, |
| 579 async.Future<ApplicationVerifyResponse> verify(core.String applicationId, {cor
e.String consistencyToken}) { | 589 {core.String consistencyToken}) { |
| 580 var _url = null; | 590 var _url = null; |
| 581 var _queryParams = new core.Map(); | 591 var _queryParams = new core.Map(); |
| 582 var _uploadMedia = null; | 592 var _uploadMedia = null; |
| 583 var _uploadOptions = null; | 593 var _uploadOptions = null; |
| 584 var _downloadOptions = commons.DownloadOptions.Metadata; | 594 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 585 var _body = null; | 595 var _body = null; |
| 586 | 596 |
| 587 if (applicationId == null) { | 597 if (applicationId == null) { |
| 588 throw new core.ArgumentError("Parameter applicationId is required."); | 598 throw new core.ArgumentError("Parameter applicationId is required."); |
| 589 } | 599 } |
| 590 if (consistencyToken != null) { | 600 if (consistencyToken != null) { |
| 591 _queryParams["consistencyToken"] = [consistencyToken]; | 601 _queryParams["consistencyToken"] = [consistencyToken]; |
| 592 } | 602 } |
| 593 | 603 |
| 594 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId') + '
/verify'; | 604 _url = 'applications/' + |
| 605 commons.Escaper.ecapeVariable('$applicationId') + |
| 606 '/verify'; |
| 595 | 607 |
| 596 var _response = _requester.request(_url, | 608 var _response = _requester.request(_url, "GET", |
| 597 "GET", | 609 body: _body, |
| 598 body: _body, | 610 queryParams: _queryParams, |
| 599 queryParams: _queryParams, | 611 uploadOptions: _uploadOptions, |
| 600 uploadOptions: _uploadOptions, | 612 uploadMedia: _uploadMedia, |
| 601 uploadMedia: _uploadMedia, | 613 downloadOptions: _downloadOptions); |
| 602 downloadOptions: _downloadOptions); | 614 return _response |
| 603 return _response.then((data) => new ApplicationVerifyResponse.fromJson(data)
); | 615 .then((data) => new ApplicationVerifyResponse.fromJson(data)); |
| 604 } | 616 } |
| 605 | |
| 606 } | 617 } |
| 607 | 618 |
| 608 | |
| 609 class EventsResourceApi { | 619 class EventsResourceApi { |
| 610 final commons.ApiRequester _requester; | 620 final commons.ApiRequester _requester; |
| 611 | 621 |
| 612 EventsResourceApi(commons.ApiRequester client) : | 622 EventsResourceApi(commons.ApiRequester client) : _requester = client; |
| 613 _requester = client; | |
| 614 | 623 |
| 615 /** | 624 /// Returns a list showing the current progress on events in this application |
| 616 * Returns a list showing the current progress on events in this application | 625 /// for the currently authenticated user. |
| 617 * for the currently authenticated user. | 626 /// |
| 618 * | 627 /// Request parameters: |
| 619 * Request parameters: | 628 /// |
| 620 * | 629 /// [consistencyToken] - The last-seen mutation timestamp. |
| 621 * [consistencyToken] - The last-seen mutation timestamp. | 630 /// |
| 622 * | 631 /// [language] - The preferred language to use for strings returned by this |
| 623 * [language] - The preferred language to use for strings returned by this | 632 /// method. |
| 624 * method. | 633 /// |
| 625 * | 634 /// [maxResults] - The maximum number of events to return in the response, |
| 626 * [maxResults] - The maximum number of events to return in the response, used | 635 /// used for paging. For any response, the actual number of events to return |
| 627 * for paging. For any response, the actual number of events to return may be | 636 /// may be less than the specified maxResults. |
| 628 * less than the specified maxResults. | 637 /// Value must be between "1" and "100". |
| 629 * Value must be between "1" and "100". | 638 /// |
| 630 * | 639 /// [pageToken] - The token returned by the previous request. |
| 631 * [pageToken] - The token returned by the previous request. | 640 /// |
| 632 * | 641 /// Completes with a [PlayerEventListResponse]. |
| 633 * Completes with a [PlayerEventListResponse]. | 642 /// |
| 634 * | 643 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 635 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 644 /// an error. |
| 636 * error. | 645 /// |
| 637 * | 646 /// If the used [http.Client] completes with an error when making a REST |
| 638 * If the used [http.Client] completes with an error when making a REST call, | 647 /// call, this method will complete with the same error. |
| 639 * this method will complete with the same error. | 648 async.Future<PlayerEventListResponse> listByPlayer( |
| 640 */ | 649 {core.String consistencyToken, |
| 641 async.Future<PlayerEventListResponse> listByPlayer({core.String consistencyTok
en, core.String language, core.int maxResults, core.String pageToken}) { | 650 core.String language, |
| 651 core.int maxResults, |
| 652 core.String pageToken}) { |
| 642 var _url = null; | 653 var _url = null; |
| 643 var _queryParams = new core.Map(); | 654 var _queryParams = new core.Map(); |
| 644 var _uploadMedia = null; | 655 var _uploadMedia = null; |
| 645 var _uploadOptions = null; | 656 var _uploadOptions = null; |
| 646 var _downloadOptions = commons.DownloadOptions.Metadata; | 657 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 647 var _body = null; | 658 var _body = null; |
| 648 | 659 |
| 649 if (consistencyToken != null) { | 660 if (consistencyToken != null) { |
| 650 _queryParams["consistencyToken"] = [consistencyToken]; | 661 _queryParams["consistencyToken"] = [consistencyToken]; |
| 651 } | 662 } |
| 652 if (language != null) { | 663 if (language != null) { |
| 653 _queryParams["language"] = [language]; | 664 _queryParams["language"] = [language]; |
| 654 } | 665 } |
| 655 if (maxResults != null) { | 666 if (maxResults != null) { |
| 656 _queryParams["maxResults"] = ["${maxResults}"]; | 667 _queryParams["maxResults"] = ["${maxResults}"]; |
| 657 } | 668 } |
| 658 if (pageToken != null) { | 669 if (pageToken != null) { |
| 659 _queryParams["pageToken"] = [pageToken]; | 670 _queryParams["pageToken"] = [pageToken]; |
| 660 } | 671 } |
| 661 | 672 |
| 662 _url = 'events'; | 673 _url = 'events'; |
| 663 | 674 |
| 664 var _response = _requester.request(_url, | 675 var _response = _requester.request(_url, "GET", |
| 665 "GET", | 676 body: _body, |
| 666 body: _body, | 677 queryParams: _queryParams, |
| 667 queryParams: _queryParams, | 678 uploadOptions: _uploadOptions, |
| 668 uploadOptions: _uploadOptions, | 679 uploadMedia: _uploadMedia, |
| 669 uploadMedia: _uploadMedia, | 680 downloadOptions: _downloadOptions); |
| 670 downloadOptions: _downloadOptions); | |
| 671 return _response.then((data) => new PlayerEventListResponse.fromJson(data)); | 681 return _response.then((data) => new PlayerEventListResponse.fromJson(data)); |
| 672 } | 682 } |
| 673 | 683 |
| 674 /** | 684 /// Returns a list of the event definitions in this application. |
| 675 * Returns a list of the event definitions in this application. | 685 /// |
| 676 * | 686 /// Request parameters: |
| 677 * Request parameters: | 687 /// |
| 678 * | 688 /// [consistencyToken] - The last-seen mutation timestamp. |
| 679 * [consistencyToken] - The last-seen mutation timestamp. | 689 /// |
| 680 * | 690 /// [language] - The preferred language to use for strings returned by this |
| 681 * [language] - The preferred language to use for strings returned by this | 691 /// method. |
| 682 * method. | 692 /// |
| 683 * | 693 /// [maxResults] - The maximum number of event definitions to return in the |
| 684 * [maxResults] - The maximum number of event definitions to return in the | 694 /// response, used for paging. For any response, the actual number of event |
| 685 * response, used for paging. For any response, the actual number of event | 695 /// definitions to return may be less than the specified maxResults. |
| 686 * definitions to return may be less than the specified maxResults. | 696 /// Value must be between "1" and "100". |
| 687 * Value must be between "1" and "100". | 697 /// |
| 688 * | 698 /// [pageToken] - The token returned by the previous request. |
| 689 * [pageToken] - The token returned by the previous request. | 699 /// |
| 690 * | 700 /// Completes with a [EventDefinitionListResponse]. |
| 691 * Completes with a [EventDefinitionListResponse]. | 701 /// |
| 692 * | 702 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 693 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 703 /// an error. |
| 694 * error. | 704 /// |
| 695 * | 705 /// If the used [http.Client] completes with an error when making a REST |
| 696 * If the used [http.Client] completes with an error when making a REST call, | 706 /// call, this method will complete with the same error. |
| 697 * this method will complete with the same error. | 707 async.Future<EventDefinitionListResponse> listDefinitions( |
| 698 */ | 708 {core.String consistencyToken, |
| 699 async.Future<EventDefinitionListResponse> listDefinitions({core.String consist
encyToken, core.String language, core.int maxResults, core.String pageToken}) { | 709 core.String language, |
| 710 core.int maxResults, |
| 711 core.String pageToken}) { |
| 700 var _url = null; | 712 var _url = null; |
| 701 var _queryParams = new core.Map(); | 713 var _queryParams = new core.Map(); |
| 702 var _uploadMedia = null; | 714 var _uploadMedia = null; |
| 703 var _uploadOptions = null; | 715 var _uploadOptions = null; |
| 704 var _downloadOptions = commons.DownloadOptions.Metadata; | 716 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 705 var _body = null; | 717 var _body = null; |
| 706 | 718 |
| 707 if (consistencyToken != null) { | 719 if (consistencyToken != null) { |
| 708 _queryParams["consistencyToken"] = [consistencyToken]; | 720 _queryParams["consistencyToken"] = [consistencyToken]; |
| 709 } | 721 } |
| 710 if (language != null) { | 722 if (language != null) { |
| 711 _queryParams["language"] = [language]; | 723 _queryParams["language"] = [language]; |
| 712 } | 724 } |
| 713 if (maxResults != null) { | 725 if (maxResults != null) { |
| 714 _queryParams["maxResults"] = ["${maxResults}"]; | 726 _queryParams["maxResults"] = ["${maxResults}"]; |
| 715 } | 727 } |
| 716 if (pageToken != null) { | 728 if (pageToken != null) { |
| 717 _queryParams["pageToken"] = [pageToken]; | 729 _queryParams["pageToken"] = [pageToken]; |
| 718 } | 730 } |
| 719 | 731 |
| 720 _url = 'eventDefinitions'; | 732 _url = 'eventDefinitions'; |
| 721 | 733 |
| 722 var _response = _requester.request(_url, | 734 var _response = _requester.request(_url, "GET", |
| 723 "GET", | 735 body: _body, |
| 724 body: _body, | 736 queryParams: _queryParams, |
| 725 queryParams: _queryParams, | 737 uploadOptions: _uploadOptions, |
| 726 uploadOptions: _uploadOptions, | 738 uploadMedia: _uploadMedia, |
| 727 uploadMedia: _uploadMedia, | 739 downloadOptions: _downloadOptions); |
| 728 downloadOptions: _downloadOptions); | 740 return _response |
| 729 return _response.then((data) => new EventDefinitionListResponse.fromJson(dat
a)); | 741 .then((data) => new EventDefinitionListResponse.fromJson(data)); |
| 730 } | 742 } |
| 731 | 743 |
| 732 /** | 744 /// Records a batch of changes to the number of times events have occurred |
| 733 * Records a batch of changes to the number of times events have occurred for | 745 /// for the currently authenticated user of this application. |
| 734 * the currently authenticated user of this application. | 746 /// |
| 735 * | 747 /// [request] - The metadata request object. |
| 736 * [request] - The metadata request object. | 748 /// |
| 737 * | 749 /// Request parameters: |
| 738 * Request parameters: | 750 /// |
| 739 * | 751 /// [consistencyToken] - The last-seen mutation timestamp. |
| 740 * [consistencyToken] - The last-seen mutation timestamp. | 752 /// |
| 741 * | 753 /// [language] - The preferred language to use for strings returned by this |
| 742 * [language] - The preferred language to use for strings returned by this | 754 /// method. |
| 743 * method. | 755 /// |
| 744 * | 756 /// Completes with a [EventUpdateResponse]. |
| 745 * Completes with a [EventUpdateResponse]. | 757 /// |
| 746 * | 758 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 747 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 759 /// an error. |
| 748 * error. | 760 /// |
| 749 * | 761 /// If the used [http.Client] completes with an error when making a REST |
| 750 * If the used [http.Client] completes with an error when making a REST call, | 762 /// call, this method will complete with the same error. |
| 751 * this method will complete with the same error. | 763 async.Future<EventUpdateResponse> record(EventRecordRequest request, |
| 752 */ | 764 {core.String consistencyToken, core.String language}) { |
| 753 async.Future<EventUpdateResponse> record(EventRecordRequest request, {core.Str
ing consistencyToken, core.String language}) { | |
| 754 var _url = null; | 765 var _url = null; |
| 755 var _queryParams = new core.Map(); | 766 var _queryParams = new core.Map(); |
| 756 var _uploadMedia = null; | 767 var _uploadMedia = null; |
| 757 var _uploadOptions = null; | 768 var _uploadOptions = null; |
| 758 var _downloadOptions = commons.DownloadOptions.Metadata; | 769 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 759 var _body = null; | 770 var _body = null; |
| 760 | 771 |
| 761 if (request != null) { | 772 if (request != null) { |
| 762 _body = convert.JSON.encode((request).toJson()); | 773 _body = convert.JSON.encode((request).toJson()); |
| 763 } | 774 } |
| 764 if (consistencyToken != null) { | 775 if (consistencyToken != null) { |
| 765 _queryParams["consistencyToken"] = [consistencyToken]; | 776 _queryParams["consistencyToken"] = [consistencyToken]; |
| 766 } | 777 } |
| 767 if (language != null) { | 778 if (language != null) { |
| 768 _queryParams["language"] = [language]; | 779 _queryParams["language"] = [language]; |
| 769 } | 780 } |
| 770 | 781 |
| 771 _url = 'events'; | 782 _url = 'events'; |
| 772 | 783 |
| 773 var _response = _requester.request(_url, | 784 var _response = _requester.request(_url, "POST", |
| 774 "POST", | 785 body: _body, |
| 775 body: _body, | 786 queryParams: _queryParams, |
| 776 queryParams: _queryParams, | 787 uploadOptions: _uploadOptions, |
| 777 uploadOptions: _uploadOptions, | 788 uploadMedia: _uploadMedia, |
| 778 uploadMedia: _uploadMedia, | 789 downloadOptions: _downloadOptions); |
| 779 downloadOptions: _downloadOptions); | |
| 780 return _response.then((data) => new EventUpdateResponse.fromJson(data)); | 790 return _response.then((data) => new EventUpdateResponse.fromJson(data)); |
| 781 } | 791 } |
| 782 | |
| 783 } | 792 } |
| 784 | 793 |
| 785 | |
| 786 class LeaderboardsResourceApi { | 794 class LeaderboardsResourceApi { |
| 787 final commons.ApiRequester _requester; | 795 final commons.ApiRequester _requester; |
| 788 | 796 |
| 789 LeaderboardsResourceApi(commons.ApiRequester client) : | 797 LeaderboardsResourceApi(commons.ApiRequester client) : _requester = client; |
| 790 _requester = client; | |
| 791 | 798 |
| 792 /** | 799 /// Retrieves the metadata of the leaderboard with the given ID. |
| 793 * Retrieves the metadata of the leaderboard with the given ID. | 800 /// |
| 794 * | 801 /// Request parameters: |
| 795 * Request parameters: | 802 /// |
| 796 * | 803 /// [leaderboardId] - The ID of the leaderboard. |
| 797 * [leaderboardId] - The ID of the leaderboard. | 804 /// |
| 798 * | 805 /// [consistencyToken] - The last-seen mutation timestamp. |
| 799 * [consistencyToken] - The last-seen mutation timestamp. | 806 /// |
| 800 * | 807 /// [language] - The preferred language to use for strings returned by this |
| 801 * [language] - The preferred language to use for strings returned by this | 808 /// method. |
| 802 * method. | 809 /// |
| 803 * | 810 /// Completes with a [Leaderboard]. |
| 804 * Completes with a [Leaderboard]. | 811 /// |
| 805 * | 812 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 806 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 813 /// an error. |
| 807 * error. | 814 /// |
| 808 * | 815 /// If the used [http.Client] completes with an error when making a REST |
| 809 * If the used [http.Client] completes with an error when making a REST call, | 816 /// call, this method will complete with the same error. |
| 810 * this method will complete with the same error. | 817 async.Future<Leaderboard> get(core.String leaderboardId, |
| 811 */ | 818 {core.String consistencyToken, core.String language}) { |
| 812 async.Future<Leaderboard> get(core.String leaderboardId, {core.String consiste
ncyToken, core.String language}) { | |
| 813 var _url = null; | 819 var _url = null; |
| 814 var _queryParams = new core.Map(); | 820 var _queryParams = new core.Map(); |
| 815 var _uploadMedia = null; | 821 var _uploadMedia = null; |
| 816 var _uploadOptions = null; | 822 var _uploadOptions = null; |
| 817 var _downloadOptions = commons.DownloadOptions.Metadata; | 823 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 818 var _body = null; | 824 var _body = null; |
| 819 | 825 |
| 820 if (leaderboardId == null) { | 826 if (leaderboardId == null) { |
| 821 throw new core.ArgumentError("Parameter leaderboardId is required."); | 827 throw new core.ArgumentError("Parameter leaderboardId is required."); |
| 822 } | 828 } |
| 823 if (consistencyToken != null) { | 829 if (consistencyToken != null) { |
| 824 _queryParams["consistencyToken"] = [consistencyToken]; | 830 _queryParams["consistencyToken"] = [consistencyToken]; |
| 825 } | 831 } |
| 826 if (language != null) { | 832 if (language != null) { |
| 827 _queryParams["language"] = [language]; | 833 _queryParams["language"] = [language]; |
| 828 } | 834 } |
| 829 | 835 |
| 830 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId'); | 836 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId'); |
| 831 | 837 |
| 832 var _response = _requester.request(_url, | 838 var _response = _requester.request(_url, "GET", |
| 833 "GET", | 839 body: _body, |
| 834 body: _body, | 840 queryParams: _queryParams, |
| 835 queryParams: _queryParams, | 841 uploadOptions: _uploadOptions, |
| 836 uploadOptions: _uploadOptions, | 842 uploadMedia: _uploadMedia, |
| 837 uploadMedia: _uploadMedia, | 843 downloadOptions: _downloadOptions); |
| 838 downloadOptions: _downloadOptions); | |
| 839 return _response.then((data) => new Leaderboard.fromJson(data)); | 844 return _response.then((data) => new Leaderboard.fromJson(data)); |
| 840 } | 845 } |
| 841 | 846 |
| 842 /** | 847 /// Lists all the leaderboard metadata for your application. |
| 843 * Lists all the leaderboard metadata for your application. | 848 /// |
| 844 * | 849 /// Request parameters: |
| 845 * Request parameters: | 850 /// |
| 846 * | 851 /// [consistencyToken] - The last-seen mutation timestamp. |
| 847 * [consistencyToken] - The last-seen mutation timestamp. | 852 /// |
| 848 * | 853 /// [language] - The preferred language to use for strings returned by this |
| 849 * [language] - The preferred language to use for strings returned by this | 854 /// method. |
| 850 * method. | 855 /// |
| 851 * | 856 /// [maxResults] - The maximum number of leaderboards to return in the |
| 852 * [maxResults] - The maximum number of leaderboards to return in the | 857 /// response. For any response, the actual number of leaderboards returned |
| 853 * response. For any response, the actual number of leaderboards returned may | 858 /// may be less than the specified maxResults. |
| 854 * be less than the specified maxResults. | 859 /// Value must be between "1" and "200". |
| 855 * Value must be between "1" and "200". | 860 /// |
| 856 * | 861 /// [pageToken] - The token returned by the previous request. |
| 857 * [pageToken] - The token returned by the previous request. | 862 /// |
| 858 * | 863 /// Completes with a [LeaderboardListResponse]. |
| 859 * Completes with a [LeaderboardListResponse]. | 864 /// |
| 860 * | 865 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 861 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 866 /// an error. |
| 862 * error. | 867 /// |
| 863 * | 868 /// If the used [http.Client] completes with an error when making a REST |
| 864 * If the used [http.Client] completes with an error when making a REST call, | 869 /// call, this method will complete with the same error. |
| 865 * this method will complete with the same error. | 870 async.Future<LeaderboardListResponse> list( |
| 866 */ | 871 {core.String consistencyToken, |
| 867 async.Future<LeaderboardListResponse> list({core.String consistencyToken, core
.String language, core.int maxResults, core.String pageToken}) { | 872 core.String language, |
| 873 core.int maxResults, |
| 874 core.String pageToken}) { |
| 868 var _url = null; | 875 var _url = null; |
| 869 var _queryParams = new core.Map(); | 876 var _queryParams = new core.Map(); |
| 870 var _uploadMedia = null; | 877 var _uploadMedia = null; |
| 871 var _uploadOptions = null; | 878 var _uploadOptions = null; |
| 872 var _downloadOptions = commons.DownloadOptions.Metadata; | 879 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 873 var _body = null; | 880 var _body = null; |
| 874 | 881 |
| 875 if (consistencyToken != null) { | 882 if (consistencyToken != null) { |
| 876 _queryParams["consistencyToken"] = [consistencyToken]; | 883 _queryParams["consistencyToken"] = [consistencyToken]; |
| 877 } | 884 } |
| 878 if (language != null) { | 885 if (language != null) { |
| 879 _queryParams["language"] = [language]; | 886 _queryParams["language"] = [language]; |
| 880 } | 887 } |
| 881 if (maxResults != null) { | 888 if (maxResults != null) { |
| 882 _queryParams["maxResults"] = ["${maxResults}"]; | 889 _queryParams["maxResults"] = ["${maxResults}"]; |
| 883 } | 890 } |
| 884 if (pageToken != null) { | 891 if (pageToken != null) { |
| 885 _queryParams["pageToken"] = [pageToken]; | 892 _queryParams["pageToken"] = [pageToken]; |
| 886 } | 893 } |
| 887 | 894 |
| 888 _url = 'leaderboards'; | 895 _url = 'leaderboards'; |
| 889 | 896 |
| 890 var _response = _requester.request(_url, | 897 var _response = _requester.request(_url, "GET", |
| 891 "GET", | 898 body: _body, |
| 892 body: _body, | 899 queryParams: _queryParams, |
| 893 queryParams: _queryParams, | 900 uploadOptions: _uploadOptions, |
| 894 uploadOptions: _uploadOptions, | 901 uploadMedia: _uploadMedia, |
| 895 uploadMedia: _uploadMedia, | 902 downloadOptions: _downloadOptions); |
| 896 downloadOptions: _downloadOptions); | |
| 897 return _response.then((data) => new LeaderboardListResponse.fromJson(data)); | 903 return _response.then((data) => new LeaderboardListResponse.fromJson(data)); |
| 898 } | 904 } |
| 899 | |
| 900 } | 905 } |
| 901 | 906 |
| 902 | |
| 903 class MetagameResourceApi { | 907 class MetagameResourceApi { |
| 904 final commons.ApiRequester _requester; | 908 final commons.ApiRequester _requester; |
| 905 | 909 |
| 906 MetagameResourceApi(commons.ApiRequester client) : | 910 MetagameResourceApi(commons.ApiRequester client) : _requester = client; |
| 907 _requester = client; | |
| 908 | 911 |
| 909 /** | 912 /// Return the metagame configuration data for the calling application. |
| 910 * Return the metagame configuration data for the calling application. | 913 /// |
| 911 * | 914 /// Request parameters: |
| 912 * Request parameters: | 915 /// |
| 913 * | 916 /// [consistencyToken] - The last-seen mutation timestamp. |
| 914 * [consistencyToken] - The last-seen mutation timestamp. | 917 /// |
| 915 * | 918 /// Completes with a [MetagameConfig]. |
| 916 * Completes with a [MetagameConfig]. | 919 /// |
| 917 * | 920 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 918 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 921 /// an error. |
| 919 * error. | 922 /// |
| 920 * | 923 /// If the used [http.Client] completes with an error when making a REST |
| 921 * If the used [http.Client] completes with an error when making a REST call, | 924 /// call, this method will complete with the same error. |
| 922 * this method will complete with the same error. | 925 async.Future<MetagameConfig> getMetagameConfig( |
| 923 */ | 926 {core.String consistencyToken}) { |
| 924 async.Future<MetagameConfig> getMetagameConfig({core.String consistencyToken})
{ | |
| 925 var _url = null; | 927 var _url = null; |
| 926 var _queryParams = new core.Map(); | 928 var _queryParams = new core.Map(); |
| 927 var _uploadMedia = null; | 929 var _uploadMedia = null; |
| 928 var _uploadOptions = null; | 930 var _uploadOptions = null; |
| 929 var _downloadOptions = commons.DownloadOptions.Metadata; | 931 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 930 var _body = null; | 932 var _body = null; |
| 931 | 933 |
| 932 if (consistencyToken != null) { | 934 if (consistencyToken != null) { |
| 933 _queryParams["consistencyToken"] = [consistencyToken]; | 935 _queryParams["consistencyToken"] = [consistencyToken]; |
| 934 } | 936 } |
| 935 | 937 |
| 936 _url = 'metagameConfig'; | 938 _url = 'metagameConfig'; |
| 937 | 939 |
| 938 var _response = _requester.request(_url, | 940 var _response = _requester.request(_url, "GET", |
| 939 "GET", | 941 body: _body, |
| 940 body: _body, | 942 queryParams: _queryParams, |
| 941 queryParams: _queryParams, | 943 uploadOptions: _uploadOptions, |
| 942 uploadOptions: _uploadOptions, | 944 uploadMedia: _uploadMedia, |
| 943 uploadMedia: _uploadMedia, | 945 downloadOptions: _downloadOptions); |
| 944 downloadOptions: _downloadOptions); | |
| 945 return _response.then((data) => new MetagameConfig.fromJson(data)); | 946 return _response.then((data) => new MetagameConfig.fromJson(data)); |
| 946 } | 947 } |
| 947 | 948 |
| 948 /** | 949 /// List play data aggregated per category for the player corresponding to |
| 949 * List play data aggregated per category for the player corresponding to | 950 /// playerId. |
| 950 * playerId. | 951 /// |
| 951 * | 952 /// Request parameters: |
| 952 * Request parameters: | 953 /// |
| 953 * | 954 /// [playerId] - A player ID. A value of me may be used in place of the |
| 954 * [playerId] - A player ID. A value of me may be used in place of the | 955 /// authenticated player's ID. |
| 955 * authenticated player's ID. | 956 /// |
| 956 * | 957 /// [collection] - The collection of categories for which data will be |
| 957 * [collection] - The collection of categories for which data will be | 958 /// returned. |
| 958 * returned. | 959 /// Possible string values are: |
| 959 * Possible string values are: | 960 /// - "all" : Retrieve data for all categories. This is the default. |
| 960 * - "all" : Retrieve data for all categories. This is the default. | 961 /// |
| 961 * | 962 /// [consistencyToken] - The last-seen mutation timestamp. |
| 962 * [consistencyToken] - The last-seen mutation timestamp. | 963 /// |
| 963 * | 964 /// [language] - The preferred language to use for strings returned by this |
| 964 * [language] - The preferred language to use for strings returned by this | 965 /// method. |
| 965 * method. | 966 /// |
| 966 * | 967 /// [maxResults] - The maximum number of category resources to return in the |
| 967 * [maxResults] - The maximum number of category resources to return in the | 968 /// response, used for paging. For any response, the actual number of |
| 968 * response, used for paging. For any response, the actual number of category | 969 /// category resources returned may be less than the specified maxResults. |
| 969 * resources returned may be less than the specified maxResults. | 970 /// Value must be between "1" and "100". |
| 970 * Value must be between "1" and "100". | 971 /// |
| 971 * | 972 /// [pageToken] - The token returned by the previous request. |
| 972 * [pageToken] - The token returned by the previous request. | 973 /// |
| 973 * | 974 /// Completes with a [CategoryListResponse]. |
| 974 * Completes with a [CategoryListResponse]. | 975 /// |
| 975 * | 976 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 976 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 977 /// an error. |
| 977 * error. | 978 /// |
| 978 * | 979 /// If the used [http.Client] completes with an error when making a REST |
| 979 * If the used [http.Client] completes with an error when making a REST call, | 980 /// call, this method will complete with the same error. |
| 980 * this method will complete with the same error. | 981 async.Future<CategoryListResponse> listCategoriesByPlayer( |
| 981 */ | 982 core.String playerId, core.String collection, |
| 982 async.Future<CategoryListResponse> listCategoriesByPlayer(core.String playerId
, core.String collection, {core.String consistencyToken, core.String language, c
ore.int maxResults, core.String pageToken}) { | 983 {core.String consistencyToken, |
| 984 core.String language, |
| 985 core.int maxResults, |
| 986 core.String pageToken}) { |
| 983 var _url = null; | 987 var _url = null; |
| 984 var _queryParams = new core.Map(); | 988 var _queryParams = new core.Map(); |
| 985 var _uploadMedia = null; | 989 var _uploadMedia = null; |
| 986 var _uploadOptions = null; | 990 var _uploadOptions = null; |
| 987 var _downloadOptions = commons.DownloadOptions.Metadata; | 991 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 988 var _body = null; | 992 var _body = null; |
| 989 | 993 |
| 990 if (playerId == null) { | 994 if (playerId == null) { |
| 991 throw new core.ArgumentError("Parameter playerId is required."); | 995 throw new core.ArgumentError("Parameter playerId is required."); |
| 992 } | 996 } |
| 993 if (collection == null) { | 997 if (collection == null) { |
| 994 throw new core.ArgumentError("Parameter collection is required."); | 998 throw new core.ArgumentError("Parameter collection is required."); |
| 995 } | 999 } |
| 996 if (consistencyToken != null) { | 1000 if (consistencyToken != null) { |
| 997 _queryParams["consistencyToken"] = [consistencyToken]; | 1001 _queryParams["consistencyToken"] = [consistencyToken]; |
| 998 } | 1002 } |
| 999 if (language != null) { | 1003 if (language != null) { |
| 1000 _queryParams["language"] = [language]; | 1004 _queryParams["language"] = [language]; |
| 1001 } | 1005 } |
| 1002 if (maxResults != null) { | 1006 if (maxResults != null) { |
| 1003 _queryParams["maxResults"] = ["${maxResults}"]; | 1007 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1004 } | 1008 } |
| 1005 if (pageToken != null) { | 1009 if (pageToken != null) { |
| 1006 _queryParams["pageToken"] = [pageToken]; | 1010 _queryParams["pageToken"] = [pageToken]; |
| 1007 } | 1011 } |
| 1008 | 1012 |
| 1009 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId') + '/categorie
s/' + commons.Escaper.ecapeVariable('$collection'); | 1013 _url = 'players/' + |
| 1014 commons.Escaper.ecapeVariable('$playerId') + |
| 1015 '/categories/' + |
| 1016 commons.Escaper.ecapeVariable('$collection'); |
| 1010 | 1017 |
| 1011 var _response = _requester.request(_url, | 1018 var _response = _requester.request(_url, "GET", |
| 1012 "GET", | 1019 body: _body, |
| 1013 body: _body, | 1020 queryParams: _queryParams, |
| 1014 queryParams: _queryParams, | 1021 uploadOptions: _uploadOptions, |
| 1015 uploadOptions: _uploadOptions, | 1022 uploadMedia: _uploadMedia, |
| 1016 uploadMedia: _uploadMedia, | 1023 downloadOptions: _downloadOptions); |
| 1017 downloadOptions: _downloadOptions); | |
| 1018 return _response.then((data) => new CategoryListResponse.fromJson(data)); | 1024 return _response.then((data) => new CategoryListResponse.fromJson(data)); |
| 1019 } | 1025 } |
| 1020 | |
| 1021 } | 1026 } |
| 1022 | 1027 |
| 1023 | |
| 1024 class PlayersResourceApi { | 1028 class PlayersResourceApi { |
| 1025 final commons.ApiRequester _requester; | 1029 final commons.ApiRequester _requester; |
| 1026 | 1030 |
| 1027 PlayersResourceApi(commons.ApiRequester client) : | 1031 PlayersResourceApi(commons.ApiRequester client) : _requester = client; |
| 1028 _requester = client; | |
| 1029 | 1032 |
| 1030 /** | 1033 /// Retrieves the Player resource with the given ID. To retrieve the player |
| 1031 * Retrieves the Player resource with the given ID. To retrieve the player for | 1034 /// for the currently authenticated user, set playerId to me. |
| 1032 * the currently authenticated user, set playerId to me. | 1035 /// |
| 1033 * | 1036 /// Request parameters: |
| 1034 * Request parameters: | 1037 /// |
| 1035 * | 1038 /// [playerId] - A player ID. A value of me may be used in place of the |
| 1036 * [playerId] - A player ID. A value of me may be used in place of the | 1039 /// authenticated player's ID. |
| 1037 * authenticated player's ID. | 1040 /// |
| 1038 * | 1041 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1039 * [consistencyToken] - The last-seen mutation timestamp. | 1042 /// |
| 1040 * | 1043 /// [language] - The preferred language to use for strings returned by this |
| 1041 * [language] - The preferred language to use for strings returned by this | 1044 /// method. |
| 1042 * method. | 1045 /// |
| 1043 * | 1046 /// Completes with a [Player]. |
| 1044 * Completes with a [Player]. | 1047 /// |
| 1045 * | 1048 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1046 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1049 /// an error. |
| 1047 * error. | 1050 /// |
| 1048 * | 1051 /// If the used [http.Client] completes with an error when making a REST |
| 1049 * If the used [http.Client] completes with an error when making a REST call, | 1052 /// call, this method will complete with the same error. |
| 1050 * this method will complete with the same error. | 1053 async.Future<Player> get(core.String playerId, |
| 1051 */ | 1054 {core.String consistencyToken, core.String language}) { |
| 1052 async.Future<Player> get(core.String playerId, {core.String consistencyToken,
core.String language}) { | |
| 1053 var _url = null; | 1055 var _url = null; |
| 1054 var _queryParams = new core.Map(); | 1056 var _queryParams = new core.Map(); |
| 1055 var _uploadMedia = null; | 1057 var _uploadMedia = null; |
| 1056 var _uploadOptions = null; | 1058 var _uploadOptions = null; |
| 1057 var _downloadOptions = commons.DownloadOptions.Metadata; | 1059 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1058 var _body = null; | 1060 var _body = null; |
| 1059 | 1061 |
| 1060 if (playerId == null) { | 1062 if (playerId == null) { |
| 1061 throw new core.ArgumentError("Parameter playerId is required."); | 1063 throw new core.ArgumentError("Parameter playerId is required."); |
| 1062 } | 1064 } |
| 1063 if (consistencyToken != null) { | 1065 if (consistencyToken != null) { |
| 1064 _queryParams["consistencyToken"] = [consistencyToken]; | 1066 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1065 } | 1067 } |
| 1066 if (language != null) { | 1068 if (language != null) { |
| 1067 _queryParams["language"] = [language]; | 1069 _queryParams["language"] = [language]; |
| 1068 } | 1070 } |
| 1069 | 1071 |
| 1070 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId'); | 1072 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId'); |
| 1071 | 1073 |
| 1072 var _response = _requester.request(_url, | 1074 var _response = _requester.request(_url, "GET", |
| 1073 "GET", | 1075 body: _body, |
| 1074 body: _body, | 1076 queryParams: _queryParams, |
| 1075 queryParams: _queryParams, | 1077 uploadOptions: _uploadOptions, |
| 1076 uploadOptions: _uploadOptions, | 1078 uploadMedia: _uploadMedia, |
| 1077 uploadMedia: _uploadMedia, | 1079 downloadOptions: _downloadOptions); |
| 1078 downloadOptions: _downloadOptions); | |
| 1079 return _response.then((data) => new Player.fromJson(data)); | 1080 return _response.then((data) => new Player.fromJson(data)); |
| 1080 } | 1081 } |
| 1081 | 1082 |
| 1082 /** | 1083 /// Get the collection of players for the currently authenticated user. |
| 1083 * Get the collection of players for the currently authenticated user. | 1084 /// |
| 1084 * | 1085 /// Request parameters: |
| 1085 * Request parameters: | 1086 /// |
| 1086 * | 1087 /// [collection] - Collection of players being retrieved |
| 1087 * [collection] - Collection of players being retrieved | 1088 /// Possible string values are: |
| 1088 * Possible string values are: | 1089 /// - "connected" : Retrieve a list of players that are also playing this |
| 1089 * - "connected" : Retrieve a list of players that are also playing this game | 1090 /// game in reverse chronological order. |
| 1090 * in reverse chronological order. | 1091 /// - "playedWith" : (DEPRECATED: please use played_with!) Retrieve a list of |
| 1091 * - "playedWith" : (DEPRECATED: please use played_with!) Retrieve a list of | 1092 /// players you have played a multiplayer game (realtime or turn-based) with |
| 1092 * players you have played a multiplayer game (realtime or turn-based) with | 1093 /// recently. |
| 1093 * recently. | 1094 /// - "played_with" : Retrieve a list of players you have played a |
| 1094 * - "played_with" : Retrieve a list of players you have played a multiplayer | 1095 /// multiplayer game (realtime or turn-based) with recently. |
| 1095 * game (realtime or turn-based) with recently. | 1096 /// - "visible" : Retrieve a list of players in the user's social graph that |
| 1096 * - "visible" : Retrieve a list of players in the user's social graph that | 1097 /// are visible to this game. |
| 1097 * are visible to this game. | 1098 /// |
| 1098 * | 1099 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1099 * [consistencyToken] - The last-seen mutation timestamp. | 1100 /// |
| 1100 * | 1101 /// [language] - The preferred language to use for strings returned by this |
| 1101 * [language] - The preferred language to use for strings returned by this | 1102 /// method. |
| 1102 * method. | 1103 /// |
| 1103 * | 1104 /// [maxResults] - The maximum number of player resources to return in the |
| 1104 * [maxResults] - The maximum number of player resources to return in the | 1105 /// response, used for paging. For any response, the actual number of player |
| 1105 * response, used for paging. For any response, the actual number of player | 1106 /// resources returned may be less than the specified maxResults. |
| 1106 * resources returned may be less than the specified maxResults. | 1107 /// Value must be between "1" and "50". |
| 1107 * Value must be between "1" and "50". | 1108 /// |
| 1108 * | 1109 /// [pageToken] - The token returned by the previous request. |
| 1109 * [pageToken] - The token returned by the previous request. | 1110 /// |
| 1110 * | 1111 /// Completes with a [PlayerListResponse]. |
| 1111 * Completes with a [PlayerListResponse]. | 1112 /// |
| 1112 * | 1113 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1113 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1114 /// an error. |
| 1114 * error. | 1115 /// |
| 1115 * | 1116 /// If the used [http.Client] completes with an error when making a REST |
| 1116 * If the used [http.Client] completes with an error when making a REST call, | 1117 /// call, this method will complete with the same error. |
| 1117 * this method will complete with the same error. | 1118 async.Future<PlayerListResponse> list(core.String collection, |
| 1118 */ | 1119 {core.String consistencyToken, |
| 1119 async.Future<PlayerListResponse> list(core.String collection, {core.String con
sistencyToken, core.String language, core.int maxResults, core.String pageToken}
) { | 1120 core.String language, |
| 1121 core.int maxResults, |
| 1122 core.String pageToken}) { |
| 1120 var _url = null; | 1123 var _url = null; |
| 1121 var _queryParams = new core.Map(); | 1124 var _queryParams = new core.Map(); |
| 1122 var _uploadMedia = null; | 1125 var _uploadMedia = null; |
| 1123 var _uploadOptions = null; | 1126 var _uploadOptions = null; |
| 1124 var _downloadOptions = commons.DownloadOptions.Metadata; | 1127 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1125 var _body = null; | 1128 var _body = null; |
| 1126 | 1129 |
| 1127 if (collection == null) { | 1130 if (collection == null) { |
| 1128 throw new core.ArgumentError("Parameter collection is required."); | 1131 throw new core.ArgumentError("Parameter collection is required."); |
| 1129 } | 1132 } |
| 1130 if (consistencyToken != null) { | 1133 if (consistencyToken != null) { |
| 1131 _queryParams["consistencyToken"] = [consistencyToken]; | 1134 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1132 } | 1135 } |
| 1133 if (language != null) { | 1136 if (language != null) { |
| 1134 _queryParams["language"] = [language]; | 1137 _queryParams["language"] = [language]; |
| 1135 } | 1138 } |
| 1136 if (maxResults != null) { | 1139 if (maxResults != null) { |
| 1137 _queryParams["maxResults"] = ["${maxResults}"]; | 1140 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1138 } | 1141 } |
| 1139 if (pageToken != null) { | 1142 if (pageToken != null) { |
| 1140 _queryParams["pageToken"] = [pageToken]; | 1143 _queryParams["pageToken"] = [pageToken]; |
| 1141 } | 1144 } |
| 1142 | 1145 |
| 1143 _url = 'players/me/players/' + commons.Escaper.ecapeVariable('$collection'); | 1146 _url = 'players/me/players/' + commons.Escaper.ecapeVariable('$collection'); |
| 1144 | 1147 |
| 1145 var _response = _requester.request(_url, | 1148 var _response = _requester.request(_url, "GET", |
| 1146 "GET", | 1149 body: _body, |
| 1147 body: _body, | 1150 queryParams: _queryParams, |
| 1148 queryParams: _queryParams, | 1151 uploadOptions: _uploadOptions, |
| 1149 uploadOptions: _uploadOptions, | 1152 uploadMedia: _uploadMedia, |
| 1150 uploadMedia: _uploadMedia, | 1153 downloadOptions: _downloadOptions); |
| 1151 downloadOptions: _downloadOptions); | |
| 1152 return _response.then((data) => new PlayerListResponse.fromJson(data)); | 1154 return _response.then((data) => new PlayerListResponse.fromJson(data)); |
| 1153 } | 1155 } |
| 1154 | |
| 1155 } | 1156 } |
| 1156 | 1157 |
| 1157 | |
| 1158 class PushtokensResourceApi { | 1158 class PushtokensResourceApi { |
| 1159 final commons.ApiRequester _requester; | 1159 final commons.ApiRequester _requester; |
| 1160 | 1160 |
| 1161 PushtokensResourceApi(commons.ApiRequester client) : | 1161 PushtokensResourceApi(commons.ApiRequester client) : _requester = client; |
| 1162 _requester = client; | |
| 1163 | 1162 |
| 1164 /** | 1163 /// Removes a push token for the current user and application. Removing a |
| 1165 * Removes a push token for the current user and application. Removing a | 1164 /// non-existent push token will report success. |
| 1166 * non-existent push token will report success. | 1165 /// |
| 1167 * | 1166 /// [request] - The metadata request object. |
| 1168 * [request] - The metadata request object. | 1167 /// |
| 1169 * | 1168 /// Request parameters: |
| 1170 * Request parameters: | 1169 /// |
| 1171 * | 1170 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1172 * [consistencyToken] - The last-seen mutation timestamp. | 1171 /// |
| 1173 * | 1172 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1174 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1173 /// an error. |
| 1175 * error. | 1174 /// |
| 1176 * | 1175 /// If the used [http.Client] completes with an error when making a REST |
| 1177 * If the used [http.Client] completes with an error when making a REST call, | 1176 /// call, this method will complete with the same error. |
| 1178 * this method will complete with the same error. | |
| 1179 */ | |
| 1180 async.Future remove(PushTokenId request, {core.String consistencyToken}) { | 1177 async.Future remove(PushTokenId request, {core.String consistencyToken}) { |
| 1181 var _url = null; | 1178 var _url = null; |
| 1182 var _queryParams = new core.Map(); | 1179 var _queryParams = new core.Map(); |
| 1183 var _uploadMedia = null; | 1180 var _uploadMedia = null; |
| 1184 var _uploadOptions = null; | 1181 var _uploadOptions = null; |
| 1185 var _downloadOptions = commons.DownloadOptions.Metadata; | 1182 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1186 var _body = null; | 1183 var _body = null; |
| 1187 | 1184 |
| 1188 if (request != null) { | 1185 if (request != null) { |
| 1189 _body = convert.JSON.encode((request).toJson()); | 1186 _body = convert.JSON.encode((request).toJson()); |
| 1190 } | 1187 } |
| 1191 if (consistencyToken != null) { | 1188 if (consistencyToken != null) { |
| 1192 _queryParams["consistencyToken"] = [consistencyToken]; | 1189 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1193 } | 1190 } |
| 1194 | 1191 |
| 1195 _downloadOptions = null; | 1192 _downloadOptions = null; |
| 1196 | 1193 |
| 1197 _url = 'pushtokens/remove'; | 1194 _url = 'pushtokens/remove'; |
| 1198 | 1195 |
| 1199 var _response = _requester.request(_url, | 1196 var _response = _requester.request(_url, "POST", |
| 1200 "POST", | 1197 body: _body, |
| 1201 body: _body, | 1198 queryParams: _queryParams, |
| 1202 queryParams: _queryParams, | 1199 uploadOptions: _uploadOptions, |
| 1203 uploadOptions: _uploadOptions, | 1200 uploadMedia: _uploadMedia, |
| 1204 uploadMedia: _uploadMedia, | 1201 downloadOptions: _downloadOptions); |
| 1205 downloadOptions: _downloadOptions); | |
| 1206 return _response.then((data) => null); | 1202 return _response.then((data) => null); |
| 1207 } | 1203 } |
| 1208 | 1204 |
| 1209 /** | 1205 /// Registers a push token for the current user and application. |
| 1210 * Registers a push token for the current user and application. | 1206 /// |
| 1211 * | 1207 /// [request] - The metadata request object. |
| 1212 * [request] - The metadata request object. | 1208 /// |
| 1213 * | 1209 /// Request parameters: |
| 1214 * Request parameters: | 1210 /// |
| 1215 * | 1211 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1216 * [consistencyToken] - The last-seen mutation timestamp. | 1212 /// |
| 1217 * | 1213 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1218 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1214 /// an error. |
| 1219 * error. | 1215 /// |
| 1220 * | 1216 /// If the used [http.Client] completes with an error when making a REST |
| 1221 * If the used [http.Client] completes with an error when making a REST call, | 1217 /// call, this method will complete with the same error. |
| 1222 * this method will complete with the same error. | |
| 1223 */ | |
| 1224 async.Future update(PushToken request, {core.String consistencyToken}) { | 1218 async.Future update(PushToken request, {core.String consistencyToken}) { |
| 1225 var _url = null; | 1219 var _url = null; |
| 1226 var _queryParams = new core.Map(); | 1220 var _queryParams = new core.Map(); |
| 1227 var _uploadMedia = null; | 1221 var _uploadMedia = null; |
| 1228 var _uploadOptions = null; | 1222 var _uploadOptions = null; |
| 1229 var _downloadOptions = commons.DownloadOptions.Metadata; | 1223 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1230 var _body = null; | 1224 var _body = null; |
| 1231 | 1225 |
| 1232 if (request != null) { | 1226 if (request != null) { |
| 1233 _body = convert.JSON.encode((request).toJson()); | 1227 _body = convert.JSON.encode((request).toJson()); |
| 1234 } | 1228 } |
| 1235 if (consistencyToken != null) { | 1229 if (consistencyToken != null) { |
| 1236 _queryParams["consistencyToken"] = [consistencyToken]; | 1230 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1237 } | 1231 } |
| 1238 | 1232 |
| 1239 _downloadOptions = null; | 1233 _downloadOptions = null; |
| 1240 | 1234 |
| 1241 _url = 'pushtokens'; | 1235 _url = 'pushtokens'; |
| 1242 | 1236 |
| 1243 var _response = _requester.request(_url, | 1237 var _response = _requester.request(_url, "PUT", |
| 1244 "PUT", | 1238 body: _body, |
| 1245 body: _body, | 1239 queryParams: _queryParams, |
| 1246 queryParams: _queryParams, | 1240 uploadOptions: _uploadOptions, |
| 1247 uploadOptions: _uploadOptions, | 1241 uploadMedia: _uploadMedia, |
| 1248 uploadMedia: _uploadMedia, | 1242 downloadOptions: _downloadOptions); |
| 1249 downloadOptions: _downloadOptions); | |
| 1250 return _response.then((data) => null); | 1243 return _response.then((data) => null); |
| 1251 } | 1244 } |
| 1252 | |
| 1253 } | 1245 } |
| 1254 | 1246 |
| 1255 | |
| 1256 class QuestMilestonesResourceApi { | 1247 class QuestMilestonesResourceApi { |
| 1257 final commons.ApiRequester _requester; | 1248 final commons.ApiRequester _requester; |
| 1258 | 1249 |
| 1259 QuestMilestonesResourceApi(commons.ApiRequester client) : | 1250 QuestMilestonesResourceApi(commons.ApiRequester client) : _requester = client; |
| 1260 _requester = client; | |
| 1261 | 1251 |
| 1262 /** | 1252 /// Report that a reward for the milestone corresponding to milestoneId for |
| 1263 * Report that a reward for the milestone corresponding to milestoneId for the | 1253 /// the quest corresponding to questId has been claimed by the currently |
| 1264 * quest corresponding to questId has been claimed by the currently authorized | 1254 /// authorized user. |
| 1265 * user. | 1255 /// |
| 1266 * | 1256 /// Request parameters: |
| 1267 * Request parameters: | 1257 /// |
| 1268 * | 1258 /// [questId] - The ID of the quest. |
| 1269 * [questId] - The ID of the quest. | 1259 /// |
| 1270 * | 1260 /// [milestoneId] - The ID of the milestone. |
| 1271 * [milestoneId] - The ID of the milestone. | 1261 /// |
| 1272 * | 1262 /// [requestId] - A numeric ID to ensure that the request is handled |
| 1273 * [requestId] - A numeric ID to ensure that the request is handled correctly | 1263 /// correctly across retries. Your client application must generate this ID |
| 1274 * across retries. Your client application must generate this ID randomly. | 1264 /// randomly. |
| 1275 * | 1265 /// |
| 1276 * [consistencyToken] - The last-seen mutation timestamp. | 1266 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1277 * | 1267 /// |
| 1278 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1268 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1279 * error. | 1269 /// an error. |
| 1280 * | 1270 /// |
| 1281 * If the used [http.Client] completes with an error when making a REST call, | 1271 /// If the used [http.Client] completes with an error when making a REST |
| 1282 * this method will complete with the same error. | 1272 /// call, this method will complete with the same error. |
| 1283 */ | 1273 async.Future claim( |
| 1284 async.Future claim(core.String questId, core.String milestoneId, core.String r
equestId, {core.String consistencyToken}) { | 1274 core.String questId, core.String milestoneId, core.String requestId, |
| 1275 {core.String consistencyToken}) { |
| 1285 var _url = null; | 1276 var _url = null; |
| 1286 var _queryParams = new core.Map(); | 1277 var _queryParams = new core.Map(); |
| 1287 var _uploadMedia = null; | 1278 var _uploadMedia = null; |
| 1288 var _uploadOptions = null; | 1279 var _uploadOptions = null; |
| 1289 var _downloadOptions = commons.DownloadOptions.Metadata; | 1280 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1290 var _body = null; | 1281 var _body = null; |
| 1291 | 1282 |
| 1292 if (questId == null) { | 1283 if (questId == null) { |
| 1293 throw new core.ArgumentError("Parameter questId is required."); | 1284 throw new core.ArgumentError("Parameter questId is required."); |
| 1294 } | 1285 } |
| 1295 if (milestoneId == null) { | 1286 if (milestoneId == null) { |
| 1296 throw new core.ArgumentError("Parameter milestoneId is required."); | 1287 throw new core.ArgumentError("Parameter milestoneId is required."); |
| 1297 } | 1288 } |
| 1298 if (requestId == null) { | 1289 if (requestId == null) { |
| 1299 throw new core.ArgumentError("Parameter requestId is required."); | 1290 throw new core.ArgumentError("Parameter requestId is required."); |
| 1300 } | 1291 } |
| 1301 _queryParams["requestId"] = [requestId]; | 1292 _queryParams["requestId"] = [requestId]; |
| 1302 if (consistencyToken != null) { | 1293 if (consistencyToken != null) { |
| 1303 _queryParams["consistencyToken"] = [consistencyToken]; | 1294 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1304 } | 1295 } |
| 1305 | 1296 |
| 1306 _downloadOptions = null; | 1297 _downloadOptions = null; |
| 1307 | 1298 |
| 1308 _url = 'quests/' + commons.Escaper.ecapeVariable('$questId') + '/milestones/
' + commons.Escaper.ecapeVariable('$milestoneId') + '/claim'; | 1299 _url = 'quests/' + |
| 1300 commons.Escaper.ecapeVariable('$questId') + |
| 1301 '/milestones/' + |
| 1302 commons.Escaper.ecapeVariable('$milestoneId') + |
| 1303 '/claim'; |
| 1309 | 1304 |
| 1310 var _response = _requester.request(_url, | 1305 var _response = _requester.request(_url, "PUT", |
| 1311 "PUT", | 1306 body: _body, |
| 1312 body: _body, | 1307 queryParams: _queryParams, |
| 1313 queryParams: _queryParams, | 1308 uploadOptions: _uploadOptions, |
| 1314 uploadOptions: _uploadOptions, | 1309 uploadMedia: _uploadMedia, |
| 1315 uploadMedia: _uploadMedia, | 1310 downloadOptions: _downloadOptions); |
| 1316 downloadOptions: _downloadOptions); | |
| 1317 return _response.then((data) => null); | 1311 return _response.then((data) => null); |
| 1318 } | 1312 } |
| 1319 | |
| 1320 } | 1313 } |
| 1321 | 1314 |
| 1322 | |
| 1323 class QuestsResourceApi { | 1315 class QuestsResourceApi { |
| 1324 final commons.ApiRequester _requester; | 1316 final commons.ApiRequester _requester; |
| 1325 | 1317 |
| 1326 QuestsResourceApi(commons.ApiRequester client) : | 1318 QuestsResourceApi(commons.ApiRequester client) : _requester = client; |
| 1327 _requester = client; | |
| 1328 | 1319 |
| 1329 /** | 1320 /// Indicates that the currently authorized user will participate in the |
| 1330 * Indicates that the currently authorized user will participate in the quest. | 1321 /// quest. |
| 1331 * | 1322 /// |
| 1332 * Request parameters: | 1323 /// Request parameters: |
| 1333 * | 1324 /// |
| 1334 * [questId] - The ID of the quest. | 1325 /// [questId] - The ID of the quest. |
| 1335 * | 1326 /// |
| 1336 * [consistencyToken] - The last-seen mutation timestamp. | 1327 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1337 * | 1328 /// |
| 1338 * [language] - The preferred language to use for strings returned by this | 1329 /// [language] - The preferred language to use for strings returned by this |
| 1339 * method. | 1330 /// method. |
| 1340 * | 1331 /// |
| 1341 * Completes with a [Quest]. | 1332 /// Completes with a [Quest]. |
| 1342 * | 1333 /// |
| 1343 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1334 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1344 * error. | 1335 /// an error. |
| 1345 * | 1336 /// |
| 1346 * If the used [http.Client] completes with an error when making a REST call, | 1337 /// If the used [http.Client] completes with an error when making a REST |
| 1347 * this method will complete with the same error. | 1338 /// call, this method will complete with the same error. |
| 1348 */ | 1339 async.Future<Quest> accept(core.String questId, |
| 1349 async.Future<Quest> accept(core.String questId, {core.String consistencyToken,
core.String language}) { | 1340 {core.String consistencyToken, core.String language}) { |
| 1350 var _url = null; | 1341 var _url = null; |
| 1351 var _queryParams = new core.Map(); | 1342 var _queryParams = new core.Map(); |
| 1352 var _uploadMedia = null; | 1343 var _uploadMedia = null; |
| 1353 var _uploadOptions = null; | 1344 var _uploadOptions = null; |
| 1354 var _downloadOptions = commons.DownloadOptions.Metadata; | 1345 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1355 var _body = null; | 1346 var _body = null; |
| 1356 | 1347 |
| 1357 if (questId == null) { | 1348 if (questId == null) { |
| 1358 throw new core.ArgumentError("Parameter questId is required."); | 1349 throw new core.ArgumentError("Parameter questId is required."); |
| 1359 } | 1350 } |
| 1360 if (consistencyToken != null) { | 1351 if (consistencyToken != null) { |
| 1361 _queryParams["consistencyToken"] = [consistencyToken]; | 1352 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1362 } | 1353 } |
| 1363 if (language != null) { | 1354 if (language != null) { |
| 1364 _queryParams["language"] = [language]; | 1355 _queryParams["language"] = [language]; |
| 1365 } | 1356 } |
| 1366 | 1357 |
| 1367 _url = 'quests/' + commons.Escaper.ecapeVariable('$questId') + '/accept'; | 1358 _url = 'quests/' + commons.Escaper.ecapeVariable('$questId') + '/accept'; |
| 1368 | 1359 |
| 1369 var _response = _requester.request(_url, | 1360 var _response = _requester.request(_url, "POST", |
| 1370 "POST", | 1361 body: _body, |
| 1371 body: _body, | 1362 queryParams: _queryParams, |
| 1372 queryParams: _queryParams, | 1363 uploadOptions: _uploadOptions, |
| 1373 uploadOptions: _uploadOptions, | 1364 uploadMedia: _uploadMedia, |
| 1374 uploadMedia: _uploadMedia, | 1365 downloadOptions: _downloadOptions); |
| 1375 downloadOptions: _downloadOptions); | |
| 1376 return _response.then((data) => new Quest.fromJson(data)); | 1366 return _response.then((data) => new Quest.fromJson(data)); |
| 1377 } | 1367 } |
| 1378 | 1368 |
| 1379 /** | 1369 /// Get a list of quests for your application and the currently authenticated |
| 1380 * Get a list of quests for your application and the currently authenticated | 1370 /// player. |
| 1381 * player. | 1371 /// |
| 1382 * | 1372 /// Request parameters: |
| 1383 * Request parameters: | 1373 /// |
| 1384 * | 1374 /// [playerId] - A player ID. A value of me may be used in place of the |
| 1385 * [playerId] - A player ID. A value of me may be used in place of the | 1375 /// authenticated player's ID. |
| 1386 * authenticated player's ID. | 1376 /// |
| 1387 * | 1377 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1388 * [consistencyToken] - The last-seen mutation timestamp. | 1378 /// |
| 1389 * | 1379 /// [language] - The preferred language to use for strings returned by this |
| 1390 * [language] - The preferred language to use for strings returned by this | 1380 /// method. |
| 1391 * method. | 1381 /// |
| 1392 * | 1382 /// [maxResults] - The maximum number of quest resources to return in the |
| 1393 * [maxResults] - The maximum number of quest resources to return in the | 1383 /// response, used for paging. For any response, the actual number of quest |
| 1394 * response, used for paging. For any response, the actual number of quest | 1384 /// resources returned may be less than the specified maxResults. Acceptable |
| 1395 * resources returned may be less than the specified maxResults. Acceptable | 1385 /// values are 1 to 50, inclusive. (Default: 50). |
| 1396 * values are 1 to 50, inclusive. (Default: 50). | 1386 /// Value must be between "1" and "50". |
| 1397 * Value must be between "1" and "50". | 1387 /// |
| 1398 * | 1388 /// [pageToken] - The token returned by the previous request. |
| 1399 * [pageToken] - The token returned by the previous request. | 1389 /// |
| 1400 * | 1390 /// Completes with a [QuestListResponse]. |
| 1401 * Completes with a [QuestListResponse]. | 1391 /// |
| 1402 * | 1392 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1403 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1393 /// an error. |
| 1404 * error. | 1394 /// |
| 1405 * | 1395 /// If the used [http.Client] completes with an error when making a REST |
| 1406 * If the used [http.Client] completes with an error when making a REST call, | 1396 /// call, this method will complete with the same error. |
| 1407 * this method will complete with the same error. | 1397 async.Future<QuestListResponse> list(core.String playerId, |
| 1408 */ | 1398 {core.String consistencyToken, |
| 1409 async.Future<QuestListResponse> list(core.String playerId, {core.String consis
tencyToken, core.String language, core.int maxResults, core.String pageToken}) { | 1399 core.String language, |
| 1400 core.int maxResults, |
| 1401 core.String pageToken}) { |
| 1410 var _url = null; | 1402 var _url = null; |
| 1411 var _queryParams = new core.Map(); | 1403 var _queryParams = new core.Map(); |
| 1412 var _uploadMedia = null; | 1404 var _uploadMedia = null; |
| 1413 var _uploadOptions = null; | 1405 var _uploadOptions = null; |
| 1414 var _downloadOptions = commons.DownloadOptions.Metadata; | 1406 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1415 var _body = null; | 1407 var _body = null; |
| 1416 | 1408 |
| 1417 if (playerId == null) { | 1409 if (playerId == null) { |
| 1418 throw new core.ArgumentError("Parameter playerId is required."); | 1410 throw new core.ArgumentError("Parameter playerId is required."); |
| 1419 } | 1411 } |
| 1420 if (consistencyToken != null) { | 1412 if (consistencyToken != null) { |
| 1421 _queryParams["consistencyToken"] = [consistencyToken]; | 1413 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1422 } | 1414 } |
| 1423 if (language != null) { | 1415 if (language != null) { |
| 1424 _queryParams["language"] = [language]; | 1416 _queryParams["language"] = [language]; |
| 1425 } | 1417 } |
| 1426 if (maxResults != null) { | 1418 if (maxResults != null) { |
| 1427 _queryParams["maxResults"] = ["${maxResults}"]; | 1419 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1428 } | 1420 } |
| 1429 if (pageToken != null) { | 1421 if (pageToken != null) { |
| 1430 _queryParams["pageToken"] = [pageToken]; | 1422 _queryParams["pageToken"] = [pageToken]; |
| 1431 } | 1423 } |
| 1432 | 1424 |
| 1433 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId') + '/quests'; | 1425 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId') + '/quests'; |
| 1434 | 1426 |
| 1435 var _response = _requester.request(_url, | 1427 var _response = _requester.request(_url, "GET", |
| 1436 "GET", | 1428 body: _body, |
| 1437 body: _body, | 1429 queryParams: _queryParams, |
| 1438 queryParams: _queryParams, | 1430 uploadOptions: _uploadOptions, |
| 1439 uploadOptions: _uploadOptions, | 1431 uploadMedia: _uploadMedia, |
| 1440 uploadMedia: _uploadMedia, | 1432 downloadOptions: _downloadOptions); |
| 1441 downloadOptions: _downloadOptions); | |
| 1442 return _response.then((data) => new QuestListResponse.fromJson(data)); | 1433 return _response.then((data) => new QuestListResponse.fromJson(data)); |
| 1443 } | 1434 } |
| 1444 | |
| 1445 } | 1435 } |
| 1446 | 1436 |
| 1447 | |
| 1448 class RevisionsResourceApi { | 1437 class RevisionsResourceApi { |
| 1449 final commons.ApiRequester _requester; | 1438 final commons.ApiRequester _requester; |
| 1450 | 1439 |
| 1451 RevisionsResourceApi(commons.ApiRequester client) : | 1440 RevisionsResourceApi(commons.ApiRequester client) : _requester = client; |
| 1452 _requester = client; | |
| 1453 | 1441 |
| 1454 /** | 1442 /// Checks whether the games client is out of date. |
| 1455 * Checks whether the games client is out of date. | 1443 /// |
| 1456 * | 1444 /// Request parameters: |
| 1457 * Request parameters: | 1445 /// |
| 1458 * | 1446 /// [clientRevision] - The revision of the client SDK used by your |
| 1459 * [clientRevision] - The revision of the client SDK used by your application. | 1447 /// application. Format: |
| 1460 * Format: | 1448 /// [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are: |
| 1461 * [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are: | 1449 /// |
| 1462 * | 1450 /// - "ANDROID" - Client is running the Android SDK. |
| 1463 * - "ANDROID" - Client is running the Android SDK. | 1451 /// - "IOS" - Client is running the iOS SDK. |
| 1464 * - "IOS" - Client is running the iOS SDK. | 1452 /// - "WEB_APP" - Client is running as a Web App. |
| 1465 * - "WEB_APP" - Client is running as a Web App. | 1453 /// |
| 1466 * | 1454 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1467 * [consistencyToken] - The last-seen mutation timestamp. | 1455 /// |
| 1468 * | 1456 /// Completes with a [RevisionCheckResponse]. |
| 1469 * Completes with a [RevisionCheckResponse]. | 1457 /// |
| 1470 * | 1458 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1471 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1459 /// an error. |
| 1472 * error. | 1460 /// |
| 1473 * | 1461 /// If the used [http.Client] completes with an error when making a REST |
| 1474 * If the used [http.Client] completes with an error when making a REST call, | 1462 /// call, this method will complete with the same error. |
| 1475 * this method will complete with the same error. | 1463 async.Future<RevisionCheckResponse> check(core.String clientRevision, |
| 1476 */ | 1464 {core.String consistencyToken}) { |
| 1477 async.Future<RevisionCheckResponse> check(core.String clientRevision, {core.St
ring consistencyToken}) { | |
| 1478 var _url = null; | 1465 var _url = null; |
| 1479 var _queryParams = new core.Map(); | 1466 var _queryParams = new core.Map(); |
| 1480 var _uploadMedia = null; | 1467 var _uploadMedia = null; |
| 1481 var _uploadOptions = null; | 1468 var _uploadOptions = null; |
| 1482 var _downloadOptions = commons.DownloadOptions.Metadata; | 1469 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1483 var _body = null; | 1470 var _body = null; |
| 1484 | 1471 |
| 1485 if (clientRevision == null) { | 1472 if (clientRevision == null) { |
| 1486 throw new core.ArgumentError("Parameter clientRevision is required."); | 1473 throw new core.ArgumentError("Parameter clientRevision is required."); |
| 1487 } | 1474 } |
| 1488 _queryParams["clientRevision"] = [clientRevision]; | 1475 _queryParams["clientRevision"] = [clientRevision]; |
| 1489 if (consistencyToken != null) { | 1476 if (consistencyToken != null) { |
| 1490 _queryParams["consistencyToken"] = [consistencyToken]; | 1477 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1491 } | 1478 } |
| 1492 | 1479 |
| 1493 _url = 'revisions/check'; | 1480 _url = 'revisions/check'; |
| 1494 | 1481 |
| 1495 var _response = _requester.request(_url, | 1482 var _response = _requester.request(_url, "GET", |
| 1496 "GET", | 1483 body: _body, |
| 1497 body: _body, | 1484 queryParams: _queryParams, |
| 1498 queryParams: _queryParams, | 1485 uploadOptions: _uploadOptions, |
| 1499 uploadOptions: _uploadOptions, | 1486 uploadMedia: _uploadMedia, |
| 1500 uploadMedia: _uploadMedia, | 1487 downloadOptions: _downloadOptions); |
| 1501 downloadOptions: _downloadOptions); | |
| 1502 return _response.then((data) => new RevisionCheckResponse.fromJson(data)); | 1488 return _response.then((data) => new RevisionCheckResponse.fromJson(data)); |
| 1503 } | 1489 } |
| 1504 | |
| 1505 } | 1490 } |
| 1506 | 1491 |
| 1507 | |
| 1508 class RoomsResourceApi { | 1492 class RoomsResourceApi { |
| 1509 final commons.ApiRequester _requester; | 1493 final commons.ApiRequester _requester; |
| 1510 | 1494 |
| 1511 RoomsResourceApi(commons.ApiRequester client) : | 1495 RoomsResourceApi(commons.ApiRequester client) : _requester = client; |
| 1512 _requester = client; | |
| 1513 | 1496 |
| 1514 /** | 1497 /// Create a room. For internal use by the Games SDK only. Calling this |
| 1515 * Create a room. For internal use by the Games SDK only. Calling this method | 1498 /// method directly is unsupported. |
| 1516 * directly is unsupported. | 1499 /// |
| 1517 * | 1500 /// [request] - The metadata request object. |
| 1518 * [request] - The metadata request object. | 1501 /// |
| 1519 * | 1502 /// Request parameters: |
| 1520 * Request parameters: | 1503 /// |
| 1521 * | 1504 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1522 * [consistencyToken] - The last-seen mutation timestamp. | 1505 /// |
| 1523 * | 1506 /// [language] - The preferred language to use for strings returned by this |
| 1524 * [language] - The preferred language to use for strings returned by this | 1507 /// method. |
| 1525 * method. | 1508 /// |
| 1526 * | 1509 /// Completes with a [Room]. |
| 1527 * Completes with a [Room]. | 1510 /// |
| 1528 * | 1511 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1529 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1512 /// an error. |
| 1530 * error. | 1513 /// |
| 1531 * | 1514 /// If the used [http.Client] completes with an error when making a REST |
| 1532 * If the used [http.Client] completes with an error when making a REST call, | 1515 /// call, this method will complete with the same error. |
| 1533 * this method will complete with the same error. | 1516 async.Future<Room> create(RoomCreateRequest request, |
| 1534 */ | 1517 {core.String consistencyToken, core.String language}) { |
| 1535 async.Future<Room> create(RoomCreateRequest request, {core.String consistencyT
oken, core.String language}) { | |
| 1536 var _url = null; | 1518 var _url = null; |
| 1537 var _queryParams = new core.Map(); | 1519 var _queryParams = new core.Map(); |
| 1538 var _uploadMedia = null; | 1520 var _uploadMedia = null; |
| 1539 var _uploadOptions = null; | 1521 var _uploadOptions = null; |
| 1540 var _downloadOptions = commons.DownloadOptions.Metadata; | 1522 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1541 var _body = null; | 1523 var _body = null; |
| 1542 | 1524 |
| 1543 if (request != null) { | 1525 if (request != null) { |
| 1544 _body = convert.JSON.encode((request).toJson()); | 1526 _body = convert.JSON.encode((request).toJson()); |
| 1545 } | 1527 } |
| 1546 if (consistencyToken != null) { | 1528 if (consistencyToken != null) { |
| 1547 _queryParams["consistencyToken"] = [consistencyToken]; | 1529 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1548 } | 1530 } |
| 1549 if (language != null) { | 1531 if (language != null) { |
| 1550 _queryParams["language"] = [language]; | 1532 _queryParams["language"] = [language]; |
| 1551 } | 1533 } |
| 1552 | 1534 |
| 1553 _url = 'rooms/create'; | 1535 _url = 'rooms/create'; |
| 1554 | 1536 |
| 1555 var _response = _requester.request(_url, | 1537 var _response = _requester.request(_url, "POST", |
| 1556 "POST", | 1538 body: _body, |
| 1557 body: _body, | 1539 queryParams: _queryParams, |
| 1558 queryParams: _queryParams, | 1540 uploadOptions: _uploadOptions, |
| 1559 uploadOptions: _uploadOptions, | 1541 uploadMedia: _uploadMedia, |
| 1560 uploadMedia: _uploadMedia, | 1542 downloadOptions: _downloadOptions); |
| 1561 downloadOptions: _downloadOptions); | |
| 1562 return _response.then((data) => new Room.fromJson(data)); | 1543 return _response.then((data) => new Room.fromJson(data)); |
| 1563 } | 1544 } |
| 1564 | 1545 |
| 1565 /** | 1546 /// Decline an invitation to join a room. For internal use by the Games SDK |
| 1566 * Decline an invitation to join a room. For internal use by the Games SDK | 1547 /// only. Calling this method directly is unsupported. |
| 1567 * only. Calling this method directly is unsupported. | 1548 /// |
| 1568 * | 1549 /// Request parameters: |
| 1569 * Request parameters: | 1550 /// |
| 1570 * | 1551 /// [roomId] - The ID of the room. |
| 1571 * [roomId] - The ID of the room. | 1552 /// |
| 1572 * | 1553 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1573 * [consistencyToken] - The last-seen mutation timestamp. | 1554 /// |
| 1574 * | 1555 /// [language] - The preferred language to use for strings returned by this |
| 1575 * [language] - The preferred language to use for strings returned by this | 1556 /// method. |
| 1576 * method. | 1557 /// |
| 1577 * | 1558 /// Completes with a [Room]. |
| 1578 * Completes with a [Room]. | 1559 /// |
| 1579 * | 1560 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1580 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1561 /// an error. |
| 1581 * error. | 1562 /// |
| 1582 * | 1563 /// If the used [http.Client] completes with an error when making a REST |
| 1583 * If the used [http.Client] completes with an error when making a REST call, | 1564 /// call, this method will complete with the same error. |
| 1584 * this method will complete with the same error. | 1565 async.Future<Room> decline(core.String roomId, |
| 1585 */ | 1566 {core.String consistencyToken, core.String language}) { |
| 1586 async.Future<Room> decline(core.String roomId, {core.String consistencyToken,
core.String language}) { | |
| 1587 var _url = null; | 1567 var _url = null; |
| 1588 var _queryParams = new core.Map(); | 1568 var _queryParams = new core.Map(); |
| 1589 var _uploadMedia = null; | 1569 var _uploadMedia = null; |
| 1590 var _uploadOptions = null; | 1570 var _uploadOptions = null; |
| 1591 var _downloadOptions = commons.DownloadOptions.Metadata; | 1571 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1592 var _body = null; | 1572 var _body = null; |
| 1593 | 1573 |
| 1594 if (roomId == null) { | 1574 if (roomId == null) { |
| 1595 throw new core.ArgumentError("Parameter roomId is required."); | 1575 throw new core.ArgumentError("Parameter roomId is required."); |
| 1596 } | 1576 } |
| 1597 if (consistencyToken != null) { | 1577 if (consistencyToken != null) { |
| 1598 _queryParams["consistencyToken"] = [consistencyToken]; | 1578 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1599 } | 1579 } |
| 1600 if (language != null) { | 1580 if (language != null) { |
| 1601 _queryParams["language"] = [language]; | 1581 _queryParams["language"] = [language]; |
| 1602 } | 1582 } |
| 1603 | 1583 |
| 1604 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/decline'; | 1584 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/decline'; |
| 1605 | 1585 |
| 1606 var _response = _requester.request(_url, | 1586 var _response = _requester.request(_url, "POST", |
| 1607 "POST", | 1587 body: _body, |
| 1608 body: _body, | 1588 queryParams: _queryParams, |
| 1609 queryParams: _queryParams, | 1589 uploadOptions: _uploadOptions, |
| 1610 uploadOptions: _uploadOptions, | 1590 uploadMedia: _uploadMedia, |
| 1611 uploadMedia: _uploadMedia, | 1591 downloadOptions: _downloadOptions); |
| 1612 downloadOptions: _downloadOptions); | |
| 1613 return _response.then((data) => new Room.fromJson(data)); | 1592 return _response.then((data) => new Room.fromJson(data)); |
| 1614 } | 1593 } |
| 1615 | 1594 |
| 1616 /** | 1595 /// Dismiss an invitation to join a room. For internal use by the Games SDK |
| 1617 * Dismiss an invitation to join a room. For internal use by the Games SDK | 1596 /// only. Calling this method directly is unsupported. |
| 1618 * only. Calling this method directly is unsupported. | 1597 /// |
| 1619 * | 1598 /// Request parameters: |
| 1620 * Request parameters: | 1599 /// |
| 1621 * | 1600 /// [roomId] - The ID of the room. |
| 1622 * [roomId] - The ID of the room. | 1601 /// |
| 1623 * | 1602 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1624 * [consistencyToken] - The last-seen mutation timestamp. | 1603 /// |
| 1625 * | 1604 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1626 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1605 /// an error. |
| 1627 * error. | 1606 /// |
| 1628 * | 1607 /// If the used [http.Client] completes with an error when making a REST |
| 1629 * If the used [http.Client] completes with an error when making a REST call, | 1608 /// call, this method will complete with the same error. |
| 1630 * this method will complete with the same error. | |
| 1631 */ | |
| 1632 async.Future dismiss(core.String roomId, {core.String consistencyToken}) { | 1609 async.Future dismiss(core.String roomId, {core.String consistencyToken}) { |
| 1633 var _url = null; | 1610 var _url = null; |
| 1634 var _queryParams = new core.Map(); | 1611 var _queryParams = new core.Map(); |
| 1635 var _uploadMedia = null; | 1612 var _uploadMedia = null; |
| 1636 var _uploadOptions = null; | 1613 var _uploadOptions = null; |
| 1637 var _downloadOptions = commons.DownloadOptions.Metadata; | 1614 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1638 var _body = null; | 1615 var _body = null; |
| 1639 | 1616 |
| 1640 if (roomId == null) { | 1617 if (roomId == null) { |
| 1641 throw new core.ArgumentError("Parameter roomId is required."); | 1618 throw new core.ArgumentError("Parameter roomId is required."); |
| 1642 } | 1619 } |
| 1643 if (consistencyToken != null) { | 1620 if (consistencyToken != null) { |
| 1644 _queryParams["consistencyToken"] = [consistencyToken]; | 1621 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1645 } | 1622 } |
| 1646 | 1623 |
| 1647 _downloadOptions = null; | 1624 _downloadOptions = null; |
| 1648 | 1625 |
| 1649 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/dismiss'; | 1626 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/dismiss'; |
| 1650 | 1627 |
| 1651 var _response = _requester.request(_url, | 1628 var _response = _requester.request(_url, "POST", |
| 1652 "POST", | 1629 body: _body, |
| 1653 body: _body, | 1630 queryParams: _queryParams, |
| 1654 queryParams: _queryParams, | 1631 uploadOptions: _uploadOptions, |
| 1655 uploadOptions: _uploadOptions, | 1632 uploadMedia: _uploadMedia, |
| 1656 uploadMedia: _uploadMedia, | 1633 downloadOptions: _downloadOptions); |
| 1657 downloadOptions: _downloadOptions); | |
| 1658 return _response.then((data) => null); | 1634 return _response.then((data) => null); |
| 1659 } | 1635 } |
| 1660 | 1636 |
| 1661 /** | 1637 /// Get the data for a room. |
| 1662 * Get the data for a room. | 1638 /// |
| 1663 * | 1639 /// Request parameters: |
| 1664 * Request parameters: | 1640 /// |
| 1665 * | 1641 /// [roomId] - The ID of the room. |
| 1666 * [roomId] - The ID of the room. | 1642 /// |
| 1667 * | 1643 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1668 * [consistencyToken] - The last-seen mutation timestamp. | 1644 /// |
| 1669 * | 1645 /// [language] - The preferred language to use for strings returned by this |
| 1670 * [language] - The preferred language to use for strings returned by this | 1646 /// method. |
| 1671 * method. | 1647 /// |
| 1672 * | 1648 /// Completes with a [Room]. |
| 1673 * Completes with a [Room]. | 1649 /// |
| 1674 * | 1650 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1675 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1651 /// an error. |
| 1676 * error. | 1652 /// |
| 1677 * | 1653 /// If the used [http.Client] completes with an error when making a REST |
| 1678 * If the used [http.Client] completes with an error when making a REST call, | 1654 /// call, this method will complete with the same error. |
| 1679 * this method will complete with the same error. | 1655 async.Future<Room> get(core.String roomId, |
| 1680 */ | 1656 {core.String consistencyToken, core.String language}) { |
| 1681 async.Future<Room> get(core.String roomId, {core.String consistencyToken, core
.String language}) { | |
| 1682 var _url = null; | 1657 var _url = null; |
| 1683 var _queryParams = new core.Map(); | 1658 var _queryParams = new core.Map(); |
| 1684 var _uploadMedia = null; | 1659 var _uploadMedia = null; |
| 1685 var _uploadOptions = null; | 1660 var _uploadOptions = null; |
| 1686 var _downloadOptions = commons.DownloadOptions.Metadata; | 1661 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1687 var _body = null; | 1662 var _body = null; |
| 1688 | 1663 |
| 1689 if (roomId == null) { | 1664 if (roomId == null) { |
| 1690 throw new core.ArgumentError("Parameter roomId is required."); | 1665 throw new core.ArgumentError("Parameter roomId is required."); |
| 1691 } | 1666 } |
| 1692 if (consistencyToken != null) { | 1667 if (consistencyToken != null) { |
| 1693 _queryParams["consistencyToken"] = [consistencyToken]; | 1668 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1694 } | 1669 } |
| 1695 if (language != null) { | 1670 if (language != null) { |
| 1696 _queryParams["language"] = [language]; | 1671 _queryParams["language"] = [language]; |
| 1697 } | 1672 } |
| 1698 | 1673 |
| 1699 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId'); | 1674 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId'); |
| 1700 | 1675 |
| 1701 var _response = _requester.request(_url, | 1676 var _response = _requester.request(_url, "GET", |
| 1702 "GET", | 1677 body: _body, |
| 1703 body: _body, | 1678 queryParams: _queryParams, |
| 1704 queryParams: _queryParams, | 1679 uploadOptions: _uploadOptions, |
| 1705 uploadOptions: _uploadOptions, | 1680 uploadMedia: _uploadMedia, |
| 1706 uploadMedia: _uploadMedia, | 1681 downloadOptions: _downloadOptions); |
| 1707 downloadOptions: _downloadOptions); | |
| 1708 return _response.then((data) => new Room.fromJson(data)); | 1682 return _response.then((data) => new Room.fromJson(data)); |
| 1709 } | 1683 } |
| 1710 | 1684 |
| 1711 /** | 1685 /// Join a room. For internal use by the Games SDK only. Calling this method |
| 1712 * Join a room. For internal use by the Games SDK only. Calling this method | 1686 /// directly is unsupported. |
| 1713 * directly is unsupported. | 1687 /// |
| 1714 * | 1688 /// [request] - The metadata request object. |
| 1715 * [request] - The metadata request object. | 1689 /// |
| 1716 * | 1690 /// Request parameters: |
| 1717 * Request parameters: | 1691 /// |
| 1718 * | 1692 /// [roomId] - The ID of the room. |
| 1719 * [roomId] - The ID of the room. | 1693 /// |
| 1720 * | 1694 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1721 * [consistencyToken] - The last-seen mutation timestamp. | 1695 /// |
| 1722 * | 1696 /// [language] - The preferred language to use for strings returned by this |
| 1723 * [language] - The preferred language to use for strings returned by this | 1697 /// method. |
| 1724 * method. | 1698 /// |
| 1725 * | 1699 /// Completes with a [Room]. |
| 1726 * Completes with a [Room]. | 1700 /// |
| 1727 * | 1701 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1728 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1702 /// an error. |
| 1729 * error. | 1703 /// |
| 1730 * | 1704 /// If the used [http.Client] completes with an error when making a REST |
| 1731 * If the used [http.Client] completes with an error when making a REST call, | 1705 /// call, this method will complete with the same error. |
| 1732 * this method will complete with the same error. | 1706 async.Future<Room> join(RoomJoinRequest request, core.String roomId, |
| 1733 */ | 1707 {core.String consistencyToken, core.String language}) { |
| 1734 async.Future<Room> join(RoomJoinRequest request, core.String roomId, {core.Str
ing consistencyToken, core.String language}) { | |
| 1735 var _url = null; | 1708 var _url = null; |
| 1736 var _queryParams = new core.Map(); | 1709 var _queryParams = new core.Map(); |
| 1737 var _uploadMedia = null; | 1710 var _uploadMedia = null; |
| 1738 var _uploadOptions = null; | 1711 var _uploadOptions = null; |
| 1739 var _downloadOptions = commons.DownloadOptions.Metadata; | 1712 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1740 var _body = null; | 1713 var _body = null; |
| 1741 | 1714 |
| 1742 if (request != null) { | 1715 if (request != null) { |
| 1743 _body = convert.JSON.encode((request).toJson()); | 1716 _body = convert.JSON.encode((request).toJson()); |
| 1744 } | 1717 } |
| 1745 if (roomId == null) { | 1718 if (roomId == null) { |
| 1746 throw new core.ArgumentError("Parameter roomId is required."); | 1719 throw new core.ArgumentError("Parameter roomId is required."); |
| 1747 } | 1720 } |
| 1748 if (consistencyToken != null) { | 1721 if (consistencyToken != null) { |
| 1749 _queryParams["consistencyToken"] = [consistencyToken]; | 1722 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1750 } | 1723 } |
| 1751 if (language != null) { | 1724 if (language != null) { |
| 1752 _queryParams["language"] = [language]; | 1725 _queryParams["language"] = [language]; |
| 1753 } | 1726 } |
| 1754 | 1727 |
| 1755 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/join'; | 1728 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/join'; |
| 1756 | 1729 |
| 1757 var _response = _requester.request(_url, | 1730 var _response = _requester.request(_url, "POST", |
| 1758 "POST", | 1731 body: _body, |
| 1759 body: _body, | 1732 queryParams: _queryParams, |
| 1760 queryParams: _queryParams, | 1733 uploadOptions: _uploadOptions, |
| 1761 uploadOptions: _uploadOptions, | 1734 uploadMedia: _uploadMedia, |
| 1762 uploadMedia: _uploadMedia, | 1735 downloadOptions: _downloadOptions); |
| 1763 downloadOptions: _downloadOptions); | |
| 1764 return _response.then((data) => new Room.fromJson(data)); | 1736 return _response.then((data) => new Room.fromJson(data)); |
| 1765 } | 1737 } |
| 1766 | 1738 |
| 1767 /** | 1739 /// Leave a room. For internal use by the Games SDK only. Calling this method |
| 1768 * Leave a room. For internal use by the Games SDK only. Calling this method | 1740 /// directly is unsupported. |
| 1769 * directly is unsupported. | 1741 /// |
| 1770 * | 1742 /// [request] - The metadata request object. |
| 1771 * [request] - The metadata request object. | 1743 /// |
| 1772 * | 1744 /// Request parameters: |
| 1773 * Request parameters: | 1745 /// |
| 1774 * | 1746 /// [roomId] - The ID of the room. |
| 1775 * [roomId] - The ID of the room. | 1747 /// |
| 1776 * | 1748 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1777 * [consistencyToken] - The last-seen mutation timestamp. | 1749 /// |
| 1778 * | 1750 /// [language] - The preferred language to use for strings returned by this |
| 1779 * [language] - The preferred language to use for strings returned by this | 1751 /// method. |
| 1780 * method. | 1752 /// |
| 1781 * | 1753 /// Completes with a [Room]. |
| 1782 * Completes with a [Room]. | 1754 /// |
| 1783 * | 1755 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1784 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1756 /// an error. |
| 1785 * error. | 1757 /// |
| 1786 * | 1758 /// If the used [http.Client] completes with an error when making a REST |
| 1787 * If the used [http.Client] completes with an error when making a REST call, | 1759 /// call, this method will complete with the same error. |
| 1788 * this method will complete with the same error. | 1760 async.Future<Room> leave(RoomLeaveRequest request, core.String roomId, |
| 1789 */ | 1761 {core.String consistencyToken, core.String language}) { |
| 1790 async.Future<Room> leave(RoomLeaveRequest request, core.String roomId, {core.S
tring consistencyToken, core.String language}) { | |
| 1791 var _url = null; | 1762 var _url = null; |
| 1792 var _queryParams = new core.Map(); | 1763 var _queryParams = new core.Map(); |
| 1793 var _uploadMedia = null; | 1764 var _uploadMedia = null; |
| 1794 var _uploadOptions = null; | 1765 var _uploadOptions = null; |
| 1795 var _downloadOptions = commons.DownloadOptions.Metadata; | 1766 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1796 var _body = null; | 1767 var _body = null; |
| 1797 | 1768 |
| 1798 if (request != null) { | 1769 if (request != null) { |
| 1799 _body = convert.JSON.encode((request).toJson()); | 1770 _body = convert.JSON.encode((request).toJson()); |
| 1800 } | 1771 } |
| 1801 if (roomId == null) { | 1772 if (roomId == null) { |
| 1802 throw new core.ArgumentError("Parameter roomId is required."); | 1773 throw new core.ArgumentError("Parameter roomId is required."); |
| 1803 } | 1774 } |
| 1804 if (consistencyToken != null) { | 1775 if (consistencyToken != null) { |
| 1805 _queryParams["consistencyToken"] = [consistencyToken]; | 1776 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1806 } | 1777 } |
| 1807 if (language != null) { | 1778 if (language != null) { |
| 1808 _queryParams["language"] = [language]; | 1779 _queryParams["language"] = [language]; |
| 1809 } | 1780 } |
| 1810 | 1781 |
| 1811 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/leave'; | 1782 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/leave'; |
| 1812 | 1783 |
| 1813 var _response = _requester.request(_url, | 1784 var _response = _requester.request(_url, "POST", |
| 1814 "POST", | 1785 body: _body, |
| 1815 body: _body, | 1786 queryParams: _queryParams, |
| 1816 queryParams: _queryParams, | 1787 uploadOptions: _uploadOptions, |
| 1817 uploadOptions: _uploadOptions, | 1788 uploadMedia: _uploadMedia, |
| 1818 uploadMedia: _uploadMedia, | 1789 downloadOptions: _downloadOptions); |
| 1819 downloadOptions: _downloadOptions); | |
| 1820 return _response.then((data) => new Room.fromJson(data)); | 1790 return _response.then((data) => new Room.fromJson(data)); |
| 1821 } | 1791 } |
| 1822 | 1792 |
| 1823 /** | 1793 /// Returns invitations to join rooms. |
| 1824 * Returns invitations to join rooms. | 1794 /// |
| 1825 * | 1795 /// Request parameters: |
| 1826 * Request parameters: | 1796 /// |
| 1827 * | 1797 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1828 * [consistencyToken] - The last-seen mutation timestamp. | 1798 /// |
| 1829 * | 1799 /// [language] - The preferred language to use for strings returned by this |
| 1830 * [language] - The preferred language to use for strings returned by this | 1800 /// method. |
| 1831 * method. | 1801 /// |
| 1832 * | 1802 /// [maxResults] - The maximum number of rooms to return in the response, |
| 1833 * [maxResults] - The maximum number of rooms to return in the response, used | 1803 /// used for paging. For any response, the actual number of rooms to return |
| 1834 * for paging. For any response, the actual number of rooms to return may be | 1804 /// may be less than the specified maxResults. |
| 1835 * less than the specified maxResults. | 1805 /// Value must be between "1" and "500". |
| 1836 * Value must be between "1" and "500". | 1806 /// |
| 1837 * | 1807 /// [pageToken] - The token returned by the previous request. |
| 1838 * [pageToken] - The token returned by the previous request. | 1808 /// |
| 1839 * | 1809 /// Completes with a [RoomList]. |
| 1840 * Completes with a [RoomList]. | 1810 /// |
| 1841 * | 1811 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1842 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1812 /// an error. |
| 1843 * error. | 1813 /// |
| 1844 * | 1814 /// If the used [http.Client] completes with an error when making a REST |
| 1845 * If the used [http.Client] completes with an error when making a REST call, | 1815 /// call, this method will complete with the same error. |
| 1846 * this method will complete with the same error. | 1816 async.Future<RoomList> list( |
| 1847 */ | 1817 {core.String consistencyToken, |
| 1848 async.Future<RoomList> list({core.String consistencyToken, core.String languag
e, core.int maxResults, core.String pageToken}) { | 1818 core.String language, |
| 1819 core.int maxResults, |
| 1820 core.String pageToken}) { |
| 1849 var _url = null; | 1821 var _url = null; |
| 1850 var _queryParams = new core.Map(); | 1822 var _queryParams = new core.Map(); |
| 1851 var _uploadMedia = null; | 1823 var _uploadMedia = null; |
| 1852 var _uploadOptions = null; | 1824 var _uploadOptions = null; |
| 1853 var _downloadOptions = commons.DownloadOptions.Metadata; | 1825 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1854 var _body = null; | 1826 var _body = null; |
| 1855 | 1827 |
| 1856 if (consistencyToken != null) { | 1828 if (consistencyToken != null) { |
| 1857 _queryParams["consistencyToken"] = [consistencyToken]; | 1829 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1858 } | 1830 } |
| 1859 if (language != null) { | 1831 if (language != null) { |
| 1860 _queryParams["language"] = [language]; | 1832 _queryParams["language"] = [language]; |
| 1861 } | 1833 } |
| 1862 if (maxResults != null) { | 1834 if (maxResults != null) { |
| 1863 _queryParams["maxResults"] = ["${maxResults}"]; | 1835 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1864 } | 1836 } |
| 1865 if (pageToken != null) { | 1837 if (pageToken != null) { |
| 1866 _queryParams["pageToken"] = [pageToken]; | 1838 _queryParams["pageToken"] = [pageToken]; |
| 1867 } | 1839 } |
| 1868 | 1840 |
| 1869 _url = 'rooms'; | 1841 _url = 'rooms'; |
| 1870 | 1842 |
| 1871 var _response = _requester.request(_url, | 1843 var _response = _requester.request(_url, "GET", |
| 1872 "GET", | 1844 body: _body, |
| 1873 body: _body, | 1845 queryParams: _queryParams, |
| 1874 queryParams: _queryParams, | 1846 uploadOptions: _uploadOptions, |
| 1875 uploadOptions: _uploadOptions, | 1847 uploadMedia: _uploadMedia, |
| 1876 uploadMedia: _uploadMedia, | 1848 downloadOptions: _downloadOptions); |
| 1877 downloadOptions: _downloadOptions); | |
| 1878 return _response.then((data) => new RoomList.fromJson(data)); | 1849 return _response.then((data) => new RoomList.fromJson(data)); |
| 1879 } | 1850 } |
| 1880 | 1851 |
| 1881 /** | 1852 /// Updates sent by a client reporting the status of peers in a room. For |
| 1882 * Updates sent by a client reporting the status of peers in a room. For | 1853 /// internal use by the Games SDK only. Calling this method directly is |
| 1883 * internal use by the Games SDK only. Calling this method directly is | 1854 /// unsupported. |
| 1884 * unsupported. | 1855 /// |
| 1885 * | 1856 /// [request] - The metadata request object. |
| 1886 * [request] - The metadata request object. | 1857 /// |
| 1887 * | 1858 /// Request parameters: |
| 1888 * Request parameters: | 1859 /// |
| 1889 * | 1860 /// [roomId] - The ID of the room. |
| 1890 * [roomId] - The ID of the room. | 1861 /// |
| 1891 * | 1862 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1892 * [consistencyToken] - The last-seen mutation timestamp. | 1863 /// |
| 1893 * | 1864 /// [language] - The preferred language to use for strings returned by this |
| 1894 * [language] - The preferred language to use for strings returned by this | 1865 /// method. |
| 1895 * method. | 1866 /// |
| 1896 * | 1867 /// Completes with a [RoomStatus]. |
| 1897 * Completes with a [RoomStatus]. | 1868 /// |
| 1898 * | 1869 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1899 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1870 /// an error. |
| 1900 * error. | 1871 /// |
| 1901 * | 1872 /// If the used [http.Client] completes with an error when making a REST |
| 1902 * If the used [http.Client] completes with an error when making a REST call, | 1873 /// call, this method will complete with the same error. |
| 1903 * this method will complete with the same error. | 1874 async.Future<RoomStatus> reportStatus( |
| 1904 */ | 1875 RoomP2PStatuses request, core.String roomId, |
| 1905 async.Future<RoomStatus> reportStatus(RoomP2PStatuses request, core.String roo
mId, {core.String consistencyToken, core.String language}) { | 1876 {core.String consistencyToken, core.String language}) { |
| 1906 var _url = null; | 1877 var _url = null; |
| 1907 var _queryParams = new core.Map(); | 1878 var _queryParams = new core.Map(); |
| 1908 var _uploadMedia = null; | 1879 var _uploadMedia = null; |
| 1909 var _uploadOptions = null; | 1880 var _uploadOptions = null; |
| 1910 var _downloadOptions = commons.DownloadOptions.Metadata; | 1881 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1911 var _body = null; | 1882 var _body = null; |
| 1912 | 1883 |
| 1913 if (request != null) { | 1884 if (request != null) { |
| 1914 _body = convert.JSON.encode((request).toJson()); | 1885 _body = convert.JSON.encode((request).toJson()); |
| 1915 } | 1886 } |
| 1916 if (roomId == null) { | 1887 if (roomId == null) { |
| 1917 throw new core.ArgumentError("Parameter roomId is required."); | 1888 throw new core.ArgumentError("Parameter roomId is required."); |
| 1918 } | 1889 } |
| 1919 if (consistencyToken != null) { | 1890 if (consistencyToken != null) { |
| 1920 _queryParams["consistencyToken"] = [consistencyToken]; | 1891 _queryParams["consistencyToken"] = [consistencyToken]; |
| 1921 } | 1892 } |
| 1922 if (language != null) { | 1893 if (language != null) { |
| 1923 _queryParams["language"] = [language]; | 1894 _queryParams["language"] = [language]; |
| 1924 } | 1895 } |
| 1925 | 1896 |
| 1926 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/reportstatus'
; | 1897 _url = |
| 1898 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/reportstatus'; |
| 1927 | 1899 |
| 1928 var _response = _requester.request(_url, | 1900 var _response = _requester.request(_url, "POST", |
| 1929 "POST", | 1901 body: _body, |
| 1930 body: _body, | 1902 queryParams: _queryParams, |
| 1931 queryParams: _queryParams, | 1903 uploadOptions: _uploadOptions, |
| 1932 uploadOptions: _uploadOptions, | 1904 uploadMedia: _uploadMedia, |
| 1933 uploadMedia: _uploadMedia, | 1905 downloadOptions: _downloadOptions); |
| 1934 downloadOptions: _downloadOptions); | |
| 1935 return _response.then((data) => new RoomStatus.fromJson(data)); | 1906 return _response.then((data) => new RoomStatus.fromJson(data)); |
| 1936 } | 1907 } |
| 1937 | |
| 1938 } | 1908 } |
| 1939 | 1909 |
| 1940 | |
| 1941 class ScoresResourceApi { | 1910 class ScoresResourceApi { |
| 1942 final commons.ApiRequester _requester; | 1911 final commons.ApiRequester _requester; |
| 1943 | 1912 |
| 1944 ScoresResourceApi(commons.ApiRequester client) : | 1913 ScoresResourceApi(commons.ApiRequester client) : _requester = client; |
| 1945 _requester = client; | |
| 1946 | 1914 |
| 1947 /** | 1915 /// Get high scores, and optionally ranks, in leaderboards for the currently |
| 1948 * Get high scores, and optionally ranks, in leaderboards for the currently | 1916 /// authenticated player. For a specific time span, leaderboardId can be set |
| 1949 * authenticated player. For a specific time span, leaderboardId can be set to | 1917 /// to ALL to retrieve data for all leaderboards in a given time span. |
| 1950 * ALL to retrieve data for all leaderboards in a given time span. | 1918 /// NOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the |
| 1951 * NOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the same | 1919 /// same request; only one parameter may be set to 'ALL'. |
| 1952 * request; only one parameter may be set to 'ALL'. | 1920 /// |
| 1953 * | 1921 /// Request parameters: |
| 1954 * Request parameters: | 1922 /// |
| 1955 * | 1923 /// [playerId] - A player ID. A value of me may be used in place of the |
| 1956 * [playerId] - A player ID. A value of me may be used in place of the | 1924 /// authenticated player's ID. |
| 1957 * authenticated player's ID. | 1925 /// |
| 1958 * | 1926 /// [leaderboardId] - The ID of the leaderboard. Can be set to 'ALL' to |
| 1959 * [leaderboardId] - The ID of the leaderboard. Can be set to 'ALL' to | 1927 /// retrieve data for all leaderboards for this application. |
| 1960 * retrieve data for all leaderboards for this application. | 1928 /// |
| 1961 * | 1929 /// [timeSpan] - The time span for the scores and ranks you're requesting. |
| 1962 * [timeSpan] - The time span for the scores and ranks you're requesting. | 1930 /// Possible string values are: |
| 1963 * Possible string values are: | 1931 /// - "ALL" : Get the high scores for all time spans. If this is used, |
| 1964 * - "ALL" : Get the high scores for all time spans. If this is used, | 1932 /// maxResults values will be ignored. |
| 1965 * maxResults values will be ignored. | 1933 /// - "ALL_TIME" : Get the all time high score. |
| 1966 * - "ALL_TIME" : Get the all time high score. | 1934 /// - "DAILY" : List the top scores for the current day. |
| 1967 * - "DAILY" : List the top scores for the current day. | 1935 /// - "WEEKLY" : List the top scores for the current week. |
| 1968 * - "WEEKLY" : List the top scores for the current week. | 1936 /// |
| 1969 * | 1937 /// [consistencyToken] - The last-seen mutation timestamp. |
| 1970 * [consistencyToken] - The last-seen mutation timestamp. | 1938 /// |
| 1971 * | 1939 /// [includeRankType] - The types of ranks to return. If the parameter is |
| 1972 * [includeRankType] - The types of ranks to return. If the parameter is | 1940 /// omitted, no ranks will be returned. |
| 1973 * omitted, no ranks will be returned. | 1941 /// Possible string values are: |
| 1974 * Possible string values are: | 1942 /// - "ALL" : Retrieve public and social ranks. |
| 1975 * - "ALL" : Retrieve public and social ranks. | 1943 /// - "PUBLIC" : Retrieve public ranks, if the player is sharing their |
| 1976 * - "PUBLIC" : Retrieve public ranks, if the player is sharing their gameplay | 1944 /// gameplay activity publicly. |
| 1977 * activity publicly. | 1945 /// - "SOCIAL" : Retrieve the social rank. |
| 1978 * - "SOCIAL" : Retrieve the social rank. | 1946 /// |
| 1979 * | 1947 /// [language] - The preferred language to use for strings returned by this |
| 1980 * [language] - The preferred language to use for strings returned by this | 1948 /// method. |
| 1981 * method. | 1949 /// |
| 1982 * | 1950 /// [maxResults] - The maximum number of leaderboard scores to return in the |
| 1983 * [maxResults] - The maximum number of leaderboard scores to return in the | 1951 /// response. For any response, the actual number of leaderboard scores |
| 1984 * response. For any response, the actual number of leaderboard scores | 1952 /// returned may be less than the specified maxResults. |
| 1985 * returned may be less than the specified maxResults. | 1953 /// Value must be between "1" and "30". |
| 1986 * Value must be between "1" and "30". | 1954 /// |
| 1987 * | 1955 /// [pageToken] - The token returned by the previous request. |
| 1988 * [pageToken] - The token returned by the previous request. | 1956 /// |
| 1989 * | 1957 /// Completes with a [PlayerLeaderboardScoreListResponse]. |
| 1990 * Completes with a [PlayerLeaderboardScoreListResponse]. | 1958 /// |
| 1991 * | 1959 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 1992 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1960 /// an error. |
| 1993 * error. | 1961 /// |
| 1994 * | 1962 /// If the used [http.Client] completes with an error when making a REST |
| 1995 * If the used [http.Client] completes with an error when making a REST call, | 1963 /// call, this method will complete with the same error. |
| 1996 * this method will complete with the same error. | 1964 async.Future<PlayerLeaderboardScoreListResponse> get( |
| 1997 */ | 1965 core.String playerId, core.String leaderboardId, core.String timeSpan, |
| 1998 async.Future<PlayerLeaderboardScoreListResponse> get(core.String playerId, cor
e.String leaderboardId, core.String timeSpan, {core.String consistencyToken, cor
e.String includeRankType, core.String language, core.int maxResults, core.String
pageToken}) { | 1966 {core.String consistencyToken, |
| 1967 core.String includeRankType, |
| 1968 core.String language, |
| 1969 core.int maxResults, |
| 1970 core.String pageToken}) { |
| 1999 var _url = null; | 1971 var _url = null; |
| 2000 var _queryParams = new core.Map(); | 1972 var _queryParams = new core.Map(); |
| 2001 var _uploadMedia = null; | 1973 var _uploadMedia = null; |
| 2002 var _uploadOptions = null; | 1974 var _uploadOptions = null; |
| 2003 var _downloadOptions = commons.DownloadOptions.Metadata; | 1975 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2004 var _body = null; | 1976 var _body = null; |
| 2005 | 1977 |
| 2006 if (playerId == null) { | 1978 if (playerId == null) { |
| 2007 throw new core.ArgumentError("Parameter playerId is required."); | 1979 throw new core.ArgumentError("Parameter playerId is required."); |
| 2008 } | 1980 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2021 if (language != null) { | 1993 if (language != null) { |
| 2022 _queryParams["language"] = [language]; | 1994 _queryParams["language"] = [language]; |
| 2023 } | 1995 } |
| 2024 if (maxResults != null) { | 1996 if (maxResults != null) { |
| 2025 _queryParams["maxResults"] = ["${maxResults}"]; | 1997 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2026 } | 1998 } |
| 2027 if (pageToken != null) { | 1999 if (pageToken != null) { |
| 2028 _queryParams["pageToken"] = [pageToken]; | 2000 _queryParams["pageToken"] = [pageToken]; |
| 2029 } | 2001 } |
| 2030 | 2002 |
| 2031 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId') + '/leaderboa
rds/' + commons.Escaper.ecapeVariable('$leaderboardId') + '/scores/' + commons.E
scaper.ecapeVariable('$timeSpan'); | 2003 _url = 'players/' + |
| 2004 commons.Escaper.ecapeVariable('$playerId') + |
| 2005 '/leaderboards/' + |
| 2006 commons.Escaper.ecapeVariable('$leaderboardId') + |
| 2007 '/scores/' + |
| 2008 commons.Escaper.ecapeVariable('$timeSpan'); |
| 2032 | 2009 |
| 2033 var _response = _requester.request(_url, | 2010 var _response = _requester.request(_url, "GET", |
| 2034 "GET", | 2011 body: _body, |
| 2035 body: _body, | 2012 queryParams: _queryParams, |
| 2036 queryParams: _queryParams, | 2013 uploadOptions: _uploadOptions, |
| 2037 uploadOptions: _uploadOptions, | 2014 uploadMedia: _uploadMedia, |
| 2038 uploadMedia: _uploadMedia, | 2015 downloadOptions: _downloadOptions); |
| 2039 downloadOptions: _downloadOptions); | 2016 return _response |
| 2040 return _response.then((data) => new PlayerLeaderboardScoreListResponse.fromJ
son(data)); | 2017 .then((data) => new PlayerLeaderboardScoreListResponse.fromJson(data)); |
| 2041 } | 2018 } |
| 2042 | 2019 |
| 2043 /** | 2020 /// Lists the scores in a leaderboard, starting from the top. |
| 2044 * Lists the scores in a leaderboard, starting from the top. | 2021 /// |
| 2045 * | 2022 /// Request parameters: |
| 2046 * Request parameters: | 2023 /// |
| 2047 * | 2024 /// [leaderboardId] - The ID of the leaderboard. |
| 2048 * [leaderboardId] - The ID of the leaderboard. | 2025 /// |
| 2049 * | 2026 /// [collection] - The collection of scores you're requesting. |
| 2050 * [collection] - The collection of scores you're requesting. | 2027 /// Possible string values are: |
| 2051 * Possible string values are: | 2028 /// - "PUBLIC" : List all scores in the public leaderboard. |
| 2052 * - "PUBLIC" : List all scores in the public leaderboard. | 2029 /// - "SOCIAL" : List only social scores. |
| 2053 * - "SOCIAL" : List only social scores. | 2030 /// - "SOCIAL_1P" : List only social scores, not respecting the fACL. |
| 2054 * - "SOCIAL_1P" : List only social scores, not respecting the fACL. | 2031 /// |
| 2055 * | 2032 /// [timeSpan] - The time span for the scores and ranks you're requesting. |
| 2056 * [timeSpan] - The time span for the scores and ranks you're requesting. | 2033 /// Possible string values are: |
| 2057 * Possible string values are: | 2034 /// - "ALL_TIME" : List the all-time top scores. |
| 2058 * - "ALL_TIME" : List the all-time top scores. | 2035 /// - "DAILY" : List the top scores for the current day. |
| 2059 * - "DAILY" : List the top scores for the current day. | 2036 /// - "WEEKLY" : List the top scores for the current week. |
| 2060 * - "WEEKLY" : List the top scores for the current week. | 2037 /// |
| 2061 * | 2038 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2062 * [consistencyToken] - The last-seen mutation timestamp. | 2039 /// |
| 2063 * | 2040 /// [language] - The preferred language to use for strings returned by this |
| 2064 * [language] - The preferred language to use for strings returned by this | 2041 /// method. |
| 2065 * method. | 2042 /// |
| 2066 * | 2043 /// [maxResults] - The maximum number of leaderboard scores to return in the |
| 2067 * [maxResults] - The maximum number of leaderboard scores to return in the | 2044 /// response. For any response, the actual number of leaderboard scores |
| 2068 * response. For any response, the actual number of leaderboard scores | 2045 /// returned may be less than the specified maxResults. |
| 2069 * returned may be less than the specified maxResults. | 2046 /// Value must be between "1" and "30". |
| 2070 * Value must be between "1" and "30". | 2047 /// |
| 2071 * | 2048 /// [pageToken] - The token returned by the previous request. |
| 2072 * [pageToken] - The token returned by the previous request. | 2049 /// |
| 2073 * | 2050 /// Completes with a [LeaderboardScores]. |
| 2074 * Completes with a [LeaderboardScores]. | 2051 /// |
| 2075 * | 2052 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2076 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2053 /// an error. |
| 2077 * error. | 2054 /// |
| 2078 * | 2055 /// If the used [http.Client] completes with an error when making a REST |
| 2079 * If the used [http.Client] completes with an error when making a REST call, | 2056 /// call, this method will complete with the same error. |
| 2080 * this method will complete with the same error. | 2057 async.Future<LeaderboardScores> list( |
| 2081 */ | 2058 core.String leaderboardId, core.String collection, core.String timeSpan, |
| 2082 async.Future<LeaderboardScores> list(core.String leaderboardId, core.String co
llection, core.String timeSpan, {core.String consistencyToken, core.String langu
age, core.int maxResults, core.String pageToken}) { | 2059 {core.String consistencyToken, |
| 2060 core.String language, |
| 2061 core.int maxResults, |
| 2062 core.String pageToken}) { |
| 2083 var _url = null; | 2063 var _url = null; |
| 2084 var _queryParams = new core.Map(); | 2064 var _queryParams = new core.Map(); |
| 2085 var _uploadMedia = null; | 2065 var _uploadMedia = null; |
| 2086 var _uploadOptions = null; | 2066 var _uploadOptions = null; |
| 2087 var _downloadOptions = commons.DownloadOptions.Metadata; | 2067 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2088 var _body = null; | 2068 var _body = null; |
| 2089 | 2069 |
| 2090 if (leaderboardId == null) { | 2070 if (leaderboardId == null) { |
| 2091 throw new core.ArgumentError("Parameter leaderboardId is required."); | 2071 throw new core.ArgumentError("Parameter leaderboardId is required."); |
| 2092 } | 2072 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2103 if (language != null) { | 2083 if (language != null) { |
| 2104 _queryParams["language"] = [language]; | 2084 _queryParams["language"] = [language]; |
| 2105 } | 2085 } |
| 2106 if (maxResults != null) { | 2086 if (maxResults != null) { |
| 2107 _queryParams["maxResults"] = ["${maxResults}"]; | 2087 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2108 } | 2088 } |
| 2109 if (pageToken != null) { | 2089 if (pageToken != null) { |
| 2110 _queryParams["pageToken"] = [pageToken]; | 2090 _queryParams["pageToken"] = [pageToken]; |
| 2111 } | 2091 } |
| 2112 | 2092 |
| 2113 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId') + '
/scores/' + commons.Escaper.ecapeVariable('$collection'); | 2093 _url = 'leaderboards/' + |
| 2094 commons.Escaper.ecapeVariable('$leaderboardId') + |
| 2095 '/scores/' + |
| 2096 commons.Escaper.ecapeVariable('$collection'); |
| 2114 | 2097 |
| 2115 var _response = _requester.request(_url, | 2098 var _response = _requester.request(_url, "GET", |
| 2116 "GET", | 2099 body: _body, |
| 2117 body: _body, | 2100 queryParams: _queryParams, |
| 2118 queryParams: _queryParams, | 2101 uploadOptions: _uploadOptions, |
| 2119 uploadOptions: _uploadOptions, | 2102 uploadMedia: _uploadMedia, |
| 2120 uploadMedia: _uploadMedia, | 2103 downloadOptions: _downloadOptions); |
| 2121 downloadOptions: _downloadOptions); | |
| 2122 return _response.then((data) => new LeaderboardScores.fromJson(data)); | 2104 return _response.then((data) => new LeaderboardScores.fromJson(data)); |
| 2123 } | 2105 } |
| 2124 | 2106 |
| 2125 /** | 2107 /// Lists the scores in a leaderboard around (and including) a player's |
| 2126 * Lists the scores in a leaderboard around (and including) a player's score. | 2108 /// score. |
| 2127 * | 2109 /// |
| 2128 * Request parameters: | 2110 /// Request parameters: |
| 2129 * | 2111 /// |
| 2130 * [leaderboardId] - The ID of the leaderboard. | 2112 /// [leaderboardId] - The ID of the leaderboard. |
| 2131 * | 2113 /// |
| 2132 * [collection] - The collection of scores you're requesting. | 2114 /// [collection] - The collection of scores you're requesting. |
| 2133 * Possible string values are: | 2115 /// Possible string values are: |
| 2134 * - "PUBLIC" : List all scores in the public leaderboard. | 2116 /// - "PUBLIC" : List all scores in the public leaderboard. |
| 2135 * - "SOCIAL" : List only social scores. | 2117 /// - "SOCIAL" : List only social scores. |
| 2136 * - "SOCIAL_1P" : List only social scores, not respecting the fACL. | 2118 /// - "SOCIAL_1P" : List only social scores, not respecting the fACL. |
| 2137 * | 2119 /// |
| 2138 * [timeSpan] - The time span for the scores and ranks you're requesting. | 2120 /// [timeSpan] - The time span for the scores and ranks you're requesting. |
| 2139 * Possible string values are: | 2121 /// Possible string values are: |
| 2140 * - "ALL_TIME" : List the all-time top scores. | 2122 /// - "ALL_TIME" : List the all-time top scores. |
| 2141 * - "DAILY" : List the top scores for the current day. | 2123 /// - "DAILY" : List the top scores for the current day. |
| 2142 * - "WEEKLY" : List the top scores for the current week. | 2124 /// - "WEEKLY" : List the top scores for the current week. |
| 2143 * | 2125 /// |
| 2144 * [consistencyToken] - The last-seen mutation timestamp. | 2126 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2145 * | 2127 /// |
| 2146 * [language] - The preferred language to use for strings returned by this | 2128 /// [language] - The preferred language to use for strings returned by this |
| 2147 * method. | 2129 /// method. |
| 2148 * | 2130 /// |
| 2149 * [maxResults] - The maximum number of leaderboard scores to return in the | 2131 /// [maxResults] - The maximum number of leaderboard scores to return in the |
| 2150 * response. For any response, the actual number of leaderboard scores | 2132 /// response. For any response, the actual number of leaderboard scores |
| 2151 * returned may be less than the specified maxResults. | 2133 /// returned may be less than the specified maxResults. |
| 2152 * Value must be between "1" and "30". | 2134 /// Value must be between "1" and "30". |
| 2153 * | 2135 /// |
| 2154 * [pageToken] - The token returned by the previous request. | 2136 /// [pageToken] - The token returned by the previous request. |
| 2155 * | 2137 /// |
| 2156 * [resultsAbove] - The preferred number of scores to return above the | 2138 /// [resultsAbove] - The preferred number of scores to return above the |
| 2157 * player's score. More scores may be returned if the player is at the bottom | 2139 /// player's score. More scores may be returned if the player is at the |
| 2158 * of the leaderboard; fewer may be returned if the player is at the top. Must | 2140 /// bottom of the leaderboard; fewer may be returned if the player is at the |
| 2159 * be less than or equal to maxResults. | 2141 /// top. Must be less than or equal to maxResults. |
| 2160 * | 2142 /// |
| 2161 * [returnTopIfAbsent] - True if the top scores should be returned when the | 2143 /// [returnTopIfAbsent] - True if the top scores should be returned when the |
| 2162 * player is not in the leaderboard. Defaults to true. | 2144 /// player is not in the leaderboard. Defaults to true. |
| 2163 * | 2145 /// |
| 2164 * Completes with a [LeaderboardScores]. | 2146 /// Completes with a [LeaderboardScores]. |
| 2165 * | 2147 /// |
| 2166 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2148 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2167 * error. | 2149 /// an error. |
| 2168 * | 2150 /// |
| 2169 * If the used [http.Client] completes with an error when making a REST call, | 2151 /// If the used [http.Client] completes with an error when making a REST |
| 2170 * this method will complete with the same error. | 2152 /// call, this method will complete with the same error. |
| 2171 */ | 2153 async.Future<LeaderboardScores> listWindow( |
| 2172 async.Future<LeaderboardScores> listWindow(core.String leaderboardId, core.Str
ing collection, core.String timeSpan, {core.String consistencyToken, core.String
language, core.int maxResults, core.String pageToken, core.int resultsAbove, co
re.bool returnTopIfAbsent}) { | 2154 core.String leaderboardId, core.String collection, core.String timeSpan, |
| 2155 {core.String consistencyToken, |
| 2156 core.String language, |
| 2157 core.int maxResults, |
| 2158 core.String pageToken, |
| 2159 core.int resultsAbove, |
| 2160 core.bool returnTopIfAbsent}) { |
| 2173 var _url = null; | 2161 var _url = null; |
| 2174 var _queryParams = new core.Map(); | 2162 var _queryParams = new core.Map(); |
| 2175 var _uploadMedia = null; | 2163 var _uploadMedia = null; |
| 2176 var _uploadOptions = null; | 2164 var _uploadOptions = null; |
| 2177 var _downloadOptions = commons.DownloadOptions.Metadata; | 2165 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2178 var _body = null; | 2166 var _body = null; |
| 2179 | 2167 |
| 2180 if (leaderboardId == null) { | 2168 if (leaderboardId == null) { |
| 2181 throw new core.ArgumentError("Parameter leaderboardId is required."); | 2169 throw new core.ArgumentError("Parameter leaderboardId is required."); |
| 2182 } | 2170 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2199 if (pageToken != null) { | 2187 if (pageToken != null) { |
| 2200 _queryParams["pageToken"] = [pageToken]; | 2188 _queryParams["pageToken"] = [pageToken]; |
| 2201 } | 2189 } |
| 2202 if (resultsAbove != null) { | 2190 if (resultsAbove != null) { |
| 2203 _queryParams["resultsAbove"] = ["${resultsAbove}"]; | 2191 _queryParams["resultsAbove"] = ["${resultsAbove}"]; |
| 2204 } | 2192 } |
| 2205 if (returnTopIfAbsent != null) { | 2193 if (returnTopIfAbsent != null) { |
| 2206 _queryParams["returnTopIfAbsent"] = ["${returnTopIfAbsent}"]; | 2194 _queryParams["returnTopIfAbsent"] = ["${returnTopIfAbsent}"]; |
| 2207 } | 2195 } |
| 2208 | 2196 |
| 2209 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId') + '
/window/' + commons.Escaper.ecapeVariable('$collection'); | 2197 _url = 'leaderboards/' + |
| 2198 commons.Escaper.ecapeVariable('$leaderboardId') + |
| 2199 '/window/' + |
| 2200 commons.Escaper.ecapeVariable('$collection'); |
| 2210 | 2201 |
| 2211 var _response = _requester.request(_url, | 2202 var _response = _requester.request(_url, "GET", |
| 2212 "GET", | 2203 body: _body, |
| 2213 body: _body, | 2204 queryParams: _queryParams, |
| 2214 queryParams: _queryParams, | 2205 uploadOptions: _uploadOptions, |
| 2215 uploadOptions: _uploadOptions, | 2206 uploadMedia: _uploadMedia, |
| 2216 uploadMedia: _uploadMedia, | 2207 downloadOptions: _downloadOptions); |
| 2217 downloadOptions: _downloadOptions); | |
| 2218 return _response.then((data) => new LeaderboardScores.fromJson(data)); | 2208 return _response.then((data) => new LeaderboardScores.fromJson(data)); |
| 2219 } | 2209 } |
| 2220 | 2210 |
| 2221 /** | 2211 /// Submits a score to the specified leaderboard. |
| 2222 * Submits a score to the specified leaderboard. | 2212 /// |
| 2223 * | 2213 /// Request parameters: |
| 2224 * Request parameters: | 2214 /// |
| 2225 * | 2215 /// [leaderboardId] - The ID of the leaderboard. |
| 2226 * [leaderboardId] - The ID of the leaderboard. | 2216 /// |
| 2227 * | 2217 /// [score] - The score you're submitting. The submitted score is ignored if |
| 2228 * [score] - The score you're submitting. The submitted score is ignored if it | 2218 /// it is worse than a previously submitted score, where worse depends on the |
| 2229 * is worse than a previously submitted score, where worse depends on the | 2219 /// leaderboard sort order. The meaning of the score value depends on the |
| 2230 * leaderboard sort order. The meaning of the score value depends on the | 2220 /// leaderboard format type. For fixed-point, the score represents the raw |
| 2231 * leaderboard format type. For fixed-point, the score represents the raw | 2221 /// value. For time, the score represents elapsed time in milliseconds. For |
| 2232 * value. For time, the score represents elapsed time in milliseconds. For | 2222 /// currency, the score represents a value in micro units. |
| 2233 * currency, the score represents a value in micro units. | 2223 /// |
| 2234 * | 2224 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2235 * [consistencyToken] - The last-seen mutation timestamp. | 2225 /// |
| 2236 * | 2226 /// [language] - The preferred language to use for strings returned by this |
| 2237 * [language] - The preferred language to use for strings returned by this | 2227 /// method. |
| 2238 * method. | 2228 /// |
| 2239 * | 2229 /// [scoreTag] - Additional information about the score you're submitting. |
| 2240 * [scoreTag] - Additional information about the score you're submitting. | 2230 /// Values must contain no more than 64 URI-safe characters as defined by |
| 2241 * Values must contain no more than 64 URI-safe characters as defined by | 2231 /// section 2.3 of RFC 3986. |
| 2242 * section 2.3 of RFC 3986. | 2232 /// Value must have pattern "[a-zA-Z0-9-._~]{0,64}". |
| 2243 * Value must have pattern "[a-zA-Z0-9-._~]{0,64}". | 2233 /// |
| 2244 * | 2234 /// Completes with a [PlayerScoreResponse]. |
| 2245 * Completes with a [PlayerScoreResponse]. | 2235 /// |
| 2246 * | 2236 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2247 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2237 /// an error. |
| 2248 * error. | 2238 /// |
| 2249 * | 2239 /// If the used [http.Client] completes with an error when making a REST |
| 2250 * If the used [http.Client] completes with an error when making a REST call, | 2240 /// call, this method will complete with the same error. |
| 2251 * this method will complete with the same error. | 2241 async.Future<PlayerScoreResponse> submit( |
| 2252 */ | 2242 core.String leaderboardId, core.String score, |
| 2253 async.Future<PlayerScoreResponse> submit(core.String leaderboardId, core.Strin
g score, {core.String consistencyToken, core.String language, core.String scoreT
ag}) { | 2243 {core.String consistencyToken, |
| 2244 core.String language, |
| 2245 core.String scoreTag}) { |
| 2254 var _url = null; | 2246 var _url = null; |
| 2255 var _queryParams = new core.Map(); | 2247 var _queryParams = new core.Map(); |
| 2256 var _uploadMedia = null; | 2248 var _uploadMedia = null; |
| 2257 var _uploadOptions = null; | 2249 var _uploadOptions = null; |
| 2258 var _downloadOptions = commons.DownloadOptions.Metadata; | 2250 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2259 var _body = null; | 2251 var _body = null; |
| 2260 | 2252 |
| 2261 if (leaderboardId == null) { | 2253 if (leaderboardId == null) { |
| 2262 throw new core.ArgumentError("Parameter leaderboardId is required."); | 2254 throw new core.ArgumentError("Parameter leaderboardId is required."); |
| 2263 } | 2255 } |
| 2264 if (score == null) { | 2256 if (score == null) { |
| 2265 throw new core.ArgumentError("Parameter score is required."); | 2257 throw new core.ArgumentError("Parameter score is required."); |
| 2266 } | 2258 } |
| 2267 _queryParams["score"] = [score]; | 2259 _queryParams["score"] = [score]; |
| 2268 if (consistencyToken != null) { | 2260 if (consistencyToken != null) { |
| 2269 _queryParams["consistencyToken"] = [consistencyToken]; | 2261 _queryParams["consistencyToken"] = [consistencyToken]; |
| 2270 } | 2262 } |
| 2271 if (language != null) { | 2263 if (language != null) { |
| 2272 _queryParams["language"] = [language]; | 2264 _queryParams["language"] = [language]; |
| 2273 } | 2265 } |
| 2274 if (scoreTag != null) { | 2266 if (scoreTag != null) { |
| 2275 _queryParams["scoreTag"] = [scoreTag]; | 2267 _queryParams["scoreTag"] = [scoreTag]; |
| 2276 } | 2268 } |
| 2277 | 2269 |
| 2278 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId') + '
/scores'; | 2270 _url = 'leaderboards/' + |
| 2271 commons.Escaper.ecapeVariable('$leaderboardId') + |
| 2272 '/scores'; |
| 2279 | 2273 |
| 2280 var _response = _requester.request(_url, | 2274 var _response = _requester.request(_url, "POST", |
| 2281 "POST", | 2275 body: _body, |
| 2282 body: _body, | 2276 queryParams: _queryParams, |
| 2283 queryParams: _queryParams, | 2277 uploadOptions: _uploadOptions, |
| 2284 uploadOptions: _uploadOptions, | 2278 uploadMedia: _uploadMedia, |
| 2285 uploadMedia: _uploadMedia, | 2279 downloadOptions: _downloadOptions); |
| 2286 downloadOptions: _downloadOptions); | |
| 2287 return _response.then((data) => new PlayerScoreResponse.fromJson(data)); | 2280 return _response.then((data) => new PlayerScoreResponse.fromJson(data)); |
| 2288 } | 2281 } |
| 2289 | 2282 |
| 2290 /** | 2283 /// Submits multiple scores to leaderboards. |
| 2291 * Submits multiple scores to leaderboards. | 2284 /// |
| 2292 * | 2285 /// [request] - The metadata request object. |
| 2293 * [request] - The metadata request object. | 2286 /// |
| 2294 * | 2287 /// Request parameters: |
| 2295 * Request parameters: | 2288 /// |
| 2296 * | 2289 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2297 * [consistencyToken] - The last-seen mutation timestamp. | 2290 /// |
| 2298 * | 2291 /// [language] - The preferred language to use for strings returned by this |
| 2299 * [language] - The preferred language to use for strings returned by this | 2292 /// method. |
| 2300 * method. | 2293 /// |
| 2301 * | 2294 /// Completes with a [PlayerScoreListResponse]. |
| 2302 * Completes with a [PlayerScoreListResponse]. | 2295 /// |
| 2303 * | 2296 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2304 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2297 /// an error. |
| 2305 * error. | 2298 /// |
| 2306 * | 2299 /// If the used [http.Client] completes with an error when making a REST |
| 2307 * If the used [http.Client] completes with an error when making a REST call, | 2300 /// call, this method will complete with the same error. |
| 2308 * this method will complete with the same error. | 2301 async.Future<PlayerScoreListResponse> submitMultiple( |
| 2309 */ | 2302 PlayerScoreSubmissionList request, |
| 2310 async.Future<PlayerScoreListResponse> submitMultiple(PlayerScoreSubmissionList
request, {core.String consistencyToken, core.String language}) { | 2303 {core.String consistencyToken, |
| 2304 core.String language}) { |
| 2311 var _url = null; | 2305 var _url = null; |
| 2312 var _queryParams = new core.Map(); | 2306 var _queryParams = new core.Map(); |
| 2313 var _uploadMedia = null; | 2307 var _uploadMedia = null; |
| 2314 var _uploadOptions = null; | 2308 var _uploadOptions = null; |
| 2315 var _downloadOptions = commons.DownloadOptions.Metadata; | 2309 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2316 var _body = null; | 2310 var _body = null; |
| 2317 | 2311 |
| 2318 if (request != null) { | 2312 if (request != null) { |
| 2319 _body = convert.JSON.encode((request).toJson()); | 2313 _body = convert.JSON.encode((request).toJson()); |
| 2320 } | 2314 } |
| 2321 if (consistencyToken != null) { | 2315 if (consistencyToken != null) { |
| 2322 _queryParams["consistencyToken"] = [consistencyToken]; | 2316 _queryParams["consistencyToken"] = [consistencyToken]; |
| 2323 } | 2317 } |
| 2324 if (language != null) { | 2318 if (language != null) { |
| 2325 _queryParams["language"] = [language]; | 2319 _queryParams["language"] = [language]; |
| 2326 } | 2320 } |
| 2327 | 2321 |
| 2328 _url = 'leaderboards/scores'; | 2322 _url = 'leaderboards/scores'; |
| 2329 | 2323 |
| 2330 var _response = _requester.request(_url, | 2324 var _response = _requester.request(_url, "POST", |
| 2331 "POST", | 2325 body: _body, |
| 2332 body: _body, | 2326 queryParams: _queryParams, |
| 2333 queryParams: _queryParams, | 2327 uploadOptions: _uploadOptions, |
| 2334 uploadOptions: _uploadOptions, | 2328 uploadMedia: _uploadMedia, |
| 2335 uploadMedia: _uploadMedia, | 2329 downloadOptions: _downloadOptions); |
| 2336 downloadOptions: _downloadOptions); | |
| 2337 return _response.then((data) => new PlayerScoreListResponse.fromJson(data)); | 2330 return _response.then((data) => new PlayerScoreListResponse.fromJson(data)); |
| 2338 } | 2331 } |
| 2339 | |
| 2340 } | 2332 } |
| 2341 | 2333 |
| 2342 | |
| 2343 class SnapshotsResourceApi { | 2334 class SnapshotsResourceApi { |
| 2344 final commons.ApiRequester _requester; | 2335 final commons.ApiRequester _requester; |
| 2345 | 2336 |
| 2346 SnapshotsResourceApi(commons.ApiRequester client) : | 2337 SnapshotsResourceApi(commons.ApiRequester client) : _requester = client; |
| 2347 _requester = client; | |
| 2348 | 2338 |
| 2349 /** | 2339 /// Retrieves the metadata for a given snapshot ID. |
| 2350 * Retrieves the metadata for a given snapshot ID. | 2340 /// |
| 2351 * | 2341 /// Request parameters: |
| 2352 * Request parameters: | 2342 /// |
| 2353 * | 2343 /// [snapshotId] - The ID of the snapshot. |
| 2354 * [snapshotId] - The ID of the snapshot. | 2344 /// |
| 2355 * | 2345 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2356 * [consistencyToken] - The last-seen mutation timestamp. | 2346 /// |
| 2357 * | 2347 /// [language] - The preferred language to use for strings returned by this |
| 2358 * [language] - The preferred language to use for strings returned by this | 2348 /// method. |
| 2359 * method. | 2349 /// |
| 2360 * | 2350 /// Completes with a [Snapshot]. |
| 2361 * Completes with a [Snapshot]. | 2351 /// |
| 2362 * | 2352 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2363 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2353 /// an error. |
| 2364 * error. | 2354 /// |
| 2365 * | 2355 /// If the used [http.Client] completes with an error when making a REST |
| 2366 * If the used [http.Client] completes with an error when making a REST call, | 2356 /// call, this method will complete with the same error. |
| 2367 * this method will complete with the same error. | 2357 async.Future<Snapshot> get(core.String snapshotId, |
| 2368 */ | 2358 {core.String consistencyToken, core.String language}) { |
| 2369 async.Future<Snapshot> get(core.String snapshotId, {core.String consistencyTok
en, core.String language}) { | |
| 2370 var _url = null; | 2359 var _url = null; |
| 2371 var _queryParams = new core.Map(); | 2360 var _queryParams = new core.Map(); |
| 2372 var _uploadMedia = null; | 2361 var _uploadMedia = null; |
| 2373 var _uploadOptions = null; | 2362 var _uploadOptions = null; |
| 2374 var _downloadOptions = commons.DownloadOptions.Metadata; | 2363 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2375 var _body = null; | 2364 var _body = null; |
| 2376 | 2365 |
| 2377 if (snapshotId == null) { | 2366 if (snapshotId == null) { |
| 2378 throw new core.ArgumentError("Parameter snapshotId is required."); | 2367 throw new core.ArgumentError("Parameter snapshotId is required."); |
| 2379 } | 2368 } |
| 2380 if (consistencyToken != null) { | 2369 if (consistencyToken != null) { |
| 2381 _queryParams["consistencyToken"] = [consistencyToken]; | 2370 _queryParams["consistencyToken"] = [consistencyToken]; |
| 2382 } | 2371 } |
| 2383 if (language != null) { | 2372 if (language != null) { |
| 2384 _queryParams["language"] = [language]; | 2373 _queryParams["language"] = [language]; |
| 2385 } | 2374 } |
| 2386 | 2375 |
| 2387 _url = 'snapshots/' + commons.Escaper.ecapeVariable('$snapshotId'); | 2376 _url = 'snapshots/' + commons.Escaper.ecapeVariable('$snapshotId'); |
| 2388 | 2377 |
| 2389 var _response = _requester.request(_url, | 2378 var _response = _requester.request(_url, "GET", |
| 2390 "GET", | 2379 body: _body, |
| 2391 body: _body, | 2380 queryParams: _queryParams, |
| 2392 queryParams: _queryParams, | 2381 uploadOptions: _uploadOptions, |
| 2393 uploadOptions: _uploadOptions, | 2382 uploadMedia: _uploadMedia, |
| 2394 uploadMedia: _uploadMedia, | 2383 downloadOptions: _downloadOptions); |
| 2395 downloadOptions: _downloadOptions); | |
| 2396 return _response.then((data) => new Snapshot.fromJson(data)); | 2384 return _response.then((data) => new Snapshot.fromJson(data)); |
| 2397 } | 2385 } |
| 2398 | 2386 |
| 2399 /** | 2387 /// Retrieves a list of snapshots created by your application for the player |
| 2400 * Retrieves a list of snapshots created by your application for the player | 2388 /// corresponding to the player ID. |
| 2401 * corresponding to the player ID. | 2389 /// |
| 2402 * | 2390 /// Request parameters: |
| 2403 * Request parameters: | 2391 /// |
| 2404 * | 2392 /// [playerId] - A player ID. A value of me may be used in place of the |
| 2405 * [playerId] - A player ID. A value of me may be used in place of the | 2393 /// authenticated player's ID. |
| 2406 * authenticated player's ID. | 2394 /// |
| 2407 * | 2395 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2408 * [consistencyToken] - The last-seen mutation timestamp. | 2396 /// |
| 2409 * | 2397 /// [language] - The preferred language to use for strings returned by this |
| 2410 * [language] - The preferred language to use for strings returned by this | 2398 /// method. |
| 2411 * method. | 2399 /// |
| 2412 * | 2400 /// [maxResults] - The maximum number of snapshot resources to return in the |
| 2413 * [maxResults] - The maximum number of snapshot resources to return in the | 2401 /// response, used for paging. For any response, the actual number of |
| 2414 * response, used for paging. For any response, the actual number of snapshot | 2402 /// snapshot resources returned may be less than the specified maxResults. |
| 2415 * resources returned may be less than the specified maxResults. | 2403 /// Value must be between "1" and "25". |
| 2416 * Value must be between "1" and "25". | 2404 /// |
| 2417 * | 2405 /// [pageToken] - The token returned by the previous request. |
| 2418 * [pageToken] - The token returned by the previous request. | 2406 /// |
| 2419 * | 2407 /// Completes with a [SnapshotListResponse]. |
| 2420 * Completes with a [SnapshotListResponse]. | 2408 /// |
| 2421 * | 2409 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2422 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2410 /// an error. |
| 2423 * error. | 2411 /// |
| 2424 * | 2412 /// If the used [http.Client] completes with an error when making a REST |
| 2425 * If the used [http.Client] completes with an error when making a REST call, | 2413 /// call, this method will complete with the same error. |
| 2426 * this method will complete with the same error. | 2414 async.Future<SnapshotListResponse> list(core.String playerId, |
| 2427 */ | 2415 {core.String consistencyToken, |
| 2428 async.Future<SnapshotListResponse> list(core.String playerId, {core.String con
sistencyToken, core.String language, core.int maxResults, core.String pageToken}
) { | 2416 core.String language, |
| 2417 core.int maxResults, |
| 2418 core.String pageToken}) { |
| 2429 var _url = null; | 2419 var _url = null; |
| 2430 var _queryParams = new core.Map(); | 2420 var _queryParams = new core.Map(); |
| 2431 var _uploadMedia = null; | 2421 var _uploadMedia = null; |
| 2432 var _uploadOptions = null; | 2422 var _uploadOptions = null; |
| 2433 var _downloadOptions = commons.DownloadOptions.Metadata; | 2423 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2434 var _body = null; | 2424 var _body = null; |
| 2435 | 2425 |
| 2436 if (playerId == null) { | 2426 if (playerId == null) { |
| 2437 throw new core.ArgumentError("Parameter playerId is required."); | 2427 throw new core.ArgumentError("Parameter playerId is required."); |
| 2438 } | 2428 } |
| 2439 if (consistencyToken != null) { | 2429 if (consistencyToken != null) { |
| 2440 _queryParams["consistencyToken"] = [consistencyToken]; | 2430 _queryParams["consistencyToken"] = [consistencyToken]; |
| 2441 } | 2431 } |
| 2442 if (language != null) { | 2432 if (language != null) { |
| 2443 _queryParams["language"] = [language]; | 2433 _queryParams["language"] = [language]; |
| 2444 } | 2434 } |
| 2445 if (maxResults != null) { | 2435 if (maxResults != null) { |
| 2446 _queryParams["maxResults"] = ["${maxResults}"]; | 2436 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2447 } | 2437 } |
| 2448 if (pageToken != null) { | 2438 if (pageToken != null) { |
| 2449 _queryParams["pageToken"] = [pageToken]; | 2439 _queryParams["pageToken"] = [pageToken]; |
| 2450 } | 2440 } |
| 2451 | 2441 |
| 2452 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId') + '/snapshots
'; | 2442 _url = |
| 2443 'players/' + commons.Escaper.ecapeVariable('$playerId') + '/snapshots'; |
| 2453 | 2444 |
| 2454 var _response = _requester.request(_url, | 2445 var _response = _requester.request(_url, "GET", |
| 2455 "GET", | 2446 body: _body, |
| 2456 body: _body, | 2447 queryParams: _queryParams, |
| 2457 queryParams: _queryParams, | 2448 uploadOptions: _uploadOptions, |
| 2458 uploadOptions: _uploadOptions, | 2449 uploadMedia: _uploadMedia, |
| 2459 uploadMedia: _uploadMedia, | 2450 downloadOptions: _downloadOptions); |
| 2460 downloadOptions: _downloadOptions); | |
| 2461 return _response.then((data) => new SnapshotListResponse.fromJson(data)); | 2451 return _response.then((data) => new SnapshotListResponse.fromJson(data)); |
| 2462 } | 2452 } |
| 2463 | |
| 2464 } | 2453 } |
| 2465 | 2454 |
| 2466 | |
| 2467 class TurnBasedMatchesResourceApi { | 2455 class TurnBasedMatchesResourceApi { |
| 2468 final commons.ApiRequester _requester; | 2456 final commons.ApiRequester _requester; |
| 2469 | 2457 |
| 2470 TurnBasedMatchesResourceApi(commons.ApiRequester client) : | 2458 TurnBasedMatchesResourceApi(commons.ApiRequester client) |
| 2471 _requester = client; | 2459 : _requester = client; |
| 2472 | 2460 |
| 2473 /** | 2461 /// Cancel a turn-based match. |
| 2474 * Cancel a turn-based match. | 2462 /// |
| 2475 * | 2463 /// Request parameters: |
| 2476 * Request parameters: | 2464 /// |
| 2477 * | 2465 /// [matchId] - The ID of the match. |
| 2478 * [matchId] - The ID of the match. | 2466 /// |
| 2479 * | 2467 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2480 * [consistencyToken] - The last-seen mutation timestamp. | 2468 /// |
| 2481 * | 2469 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2482 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2470 /// an error. |
| 2483 * error. | 2471 /// |
| 2484 * | 2472 /// If the used [http.Client] completes with an error when making a REST |
| 2485 * If the used [http.Client] completes with an error when making a REST call, | 2473 /// call, this method will complete with the same error. |
| 2486 * this method will complete with the same error. | |
| 2487 */ | |
| 2488 async.Future cancel(core.String matchId, {core.String consistencyToken}) { | 2474 async.Future cancel(core.String matchId, {core.String consistencyToken}) { |
| 2489 var _url = null; | 2475 var _url = null; |
| 2490 var _queryParams = new core.Map(); | 2476 var _queryParams = new core.Map(); |
| 2491 var _uploadMedia = null; | 2477 var _uploadMedia = null; |
| 2492 var _uploadOptions = null; | 2478 var _uploadOptions = null; |
| 2493 var _downloadOptions = commons.DownloadOptions.Metadata; | 2479 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2494 var _body = null; | 2480 var _body = null; |
| 2495 | 2481 |
| 2496 if (matchId == null) { | 2482 if (matchId == null) { |
| 2497 throw new core.ArgumentError("Parameter matchId is required."); | 2483 throw new core.ArgumentError("Parameter matchId is required."); |
| 2498 } | 2484 } |
| 2499 if (consistencyToken != null) { | 2485 if (consistencyToken != null) { |
| 2500 _queryParams["consistencyToken"] = [consistencyToken]; | 2486 _queryParams["consistencyToken"] = [consistencyToken]; |
| 2501 } | 2487 } |
| 2502 | 2488 |
| 2503 _downloadOptions = null; | 2489 _downloadOptions = null; |
| 2504 | 2490 |
| 2505 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/c
ancel'; | 2491 _url = 'turnbasedmatches/' + |
| 2492 commons.Escaper.ecapeVariable('$matchId') + |
| 2493 '/cancel'; |
| 2506 | 2494 |
| 2507 var _response = _requester.request(_url, | 2495 var _response = _requester.request(_url, "PUT", |
| 2508 "PUT", | 2496 body: _body, |
| 2509 body: _body, | 2497 queryParams: _queryParams, |
| 2510 queryParams: _queryParams, | 2498 uploadOptions: _uploadOptions, |
| 2511 uploadOptions: _uploadOptions, | 2499 uploadMedia: _uploadMedia, |
| 2512 uploadMedia: _uploadMedia, | 2500 downloadOptions: _downloadOptions); |
| 2513 downloadOptions: _downloadOptions); | |
| 2514 return _response.then((data) => null); | 2501 return _response.then((data) => null); |
| 2515 } | 2502 } |
| 2516 | 2503 |
| 2517 /** | 2504 /// Create a turn-based match. |
| 2518 * Create a turn-based match. | 2505 /// |
| 2519 * | 2506 /// [request] - The metadata request object. |
| 2520 * [request] - The metadata request object. | 2507 /// |
| 2521 * | 2508 /// Request parameters: |
| 2522 * Request parameters: | 2509 /// |
| 2523 * | 2510 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2524 * [consistencyToken] - The last-seen mutation timestamp. | 2511 /// |
| 2525 * | 2512 /// [language] - The preferred language to use for strings returned by this |
| 2526 * [language] - The preferred language to use for strings returned by this | 2513 /// method. |
| 2527 * method. | 2514 /// |
| 2528 * | 2515 /// Completes with a [TurnBasedMatch]. |
| 2529 * Completes with a [TurnBasedMatch]. | 2516 /// |
| 2530 * | 2517 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2531 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2518 /// an error. |
| 2532 * error. | 2519 /// |
| 2533 * | 2520 /// If the used [http.Client] completes with an error when making a REST |
| 2534 * If the used [http.Client] completes with an error when making a REST call, | 2521 /// call, this method will complete with the same error. |
| 2535 * this method will complete with the same error. | 2522 async.Future<TurnBasedMatch> create(TurnBasedMatchCreateRequest request, |
| 2536 */ | 2523 {core.String consistencyToken, core.String language}) { |
| 2537 async.Future<TurnBasedMatch> create(TurnBasedMatchCreateRequest request, {core
.String consistencyToken, core.String language}) { | |
| 2538 var _url = null; | 2524 var _url = null; |
| 2539 var _queryParams = new core.Map(); | 2525 var _queryParams = new core.Map(); |
| 2540 var _uploadMedia = null; | 2526 var _uploadMedia = null; |
| 2541 var _uploadOptions = null; | 2527 var _uploadOptions = null; |
| 2542 var _downloadOptions = commons.DownloadOptions.Metadata; | 2528 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2543 var _body = null; | 2529 var _body = null; |
| 2544 | 2530 |
| 2545 if (request != null) { | 2531 if (request != null) { |
| 2546 _body = convert.JSON.encode((request).toJson()); | 2532 _body = convert.JSON.encode((request).toJson()); |
| 2547 } | 2533 } |
| 2548 if (consistencyToken != null) { | 2534 if (consistencyToken != null) { |
| 2549 _queryParams["consistencyToken"] = [consistencyToken]; | 2535 _queryParams["consistencyToken"] = [consistencyToken]; |
| 2550 } | 2536 } |
| 2551 if (language != null) { | 2537 if (language != null) { |
| 2552 _queryParams["language"] = [language]; | 2538 _queryParams["language"] = [language]; |
| 2553 } | 2539 } |
| 2554 | 2540 |
| 2555 _url = 'turnbasedmatches/create'; | 2541 _url = 'turnbasedmatches/create'; |
| 2556 | 2542 |
| 2557 var _response = _requester.request(_url, | 2543 var _response = _requester.request(_url, "POST", |
| 2558 "POST", | 2544 body: _body, |
| 2559 body: _body, | 2545 queryParams: _queryParams, |
| 2560 queryParams: _queryParams, | 2546 uploadOptions: _uploadOptions, |
| 2561 uploadOptions: _uploadOptions, | 2547 uploadMedia: _uploadMedia, |
| 2562 uploadMedia: _uploadMedia, | 2548 downloadOptions: _downloadOptions); |
| 2563 downloadOptions: _downloadOptions); | |
| 2564 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 2549 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
| 2565 } | 2550 } |
| 2566 | 2551 |
| 2567 /** | 2552 /// Decline an invitation to play a turn-based match. |
| 2568 * Decline an invitation to play a turn-based match. | 2553 /// |
| 2569 * | 2554 /// Request parameters: |
| 2570 * Request parameters: | 2555 /// |
| 2571 * | 2556 /// [matchId] - The ID of the match. |
| 2572 * [matchId] - The ID of the match. | 2557 /// |
| 2573 * | 2558 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2574 * [consistencyToken] - The last-seen mutation timestamp. | 2559 /// |
| 2575 * | 2560 /// [language] - The preferred language to use for strings returned by this |
| 2576 * [language] - The preferred language to use for strings returned by this | 2561 /// method. |
| 2577 * method. | 2562 /// |
| 2578 * | 2563 /// Completes with a [TurnBasedMatch]. |
| 2579 * Completes with a [TurnBasedMatch]. | 2564 /// |
| 2580 * | 2565 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2581 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2566 /// an error. |
| 2582 * error. | 2567 /// |
| 2583 * | 2568 /// If the used [http.Client] completes with an error when making a REST |
| 2584 * If the used [http.Client] completes with an error when making a REST call, | 2569 /// call, this method will complete with the same error. |
| 2585 * this method will complete with the same error. | 2570 async.Future<TurnBasedMatch> decline(core.String matchId, |
| 2586 */ | 2571 {core.String consistencyToken, core.String language}) { |
| 2587 async.Future<TurnBasedMatch> decline(core.String matchId, {core.String consist
encyToken, core.String language}) { | |
| 2588 var _url = null; | 2572 var _url = null; |
| 2589 var _queryParams = new core.Map(); | 2573 var _queryParams = new core.Map(); |
| 2590 var _uploadMedia = null; | 2574 var _uploadMedia = null; |
| 2591 var _uploadOptions = null; | 2575 var _uploadOptions = null; |
| 2592 var _downloadOptions = commons.DownloadOptions.Metadata; | 2576 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2593 var _body = null; | 2577 var _body = null; |
| 2594 | 2578 |
| 2595 if (matchId == null) { | 2579 if (matchId == null) { |
| 2596 throw new core.ArgumentError("Parameter matchId is required."); | 2580 throw new core.ArgumentError("Parameter matchId is required."); |
| 2597 } | 2581 } |
| 2598 if (consistencyToken != null) { | 2582 if (consistencyToken != null) { |
| 2599 _queryParams["consistencyToken"] = [consistencyToken]; | 2583 _queryParams["consistencyToken"] = [consistencyToken]; |
| 2600 } | 2584 } |
| 2601 if (language != null) { | 2585 if (language != null) { |
| 2602 _queryParams["language"] = [language]; | 2586 _queryParams["language"] = [language]; |
| 2603 } | 2587 } |
| 2604 | 2588 |
| 2605 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/d
ecline'; | 2589 _url = 'turnbasedmatches/' + |
| 2590 commons.Escaper.ecapeVariable('$matchId') + |
| 2591 '/decline'; |
| 2606 | 2592 |
| 2607 var _response = _requester.request(_url, | 2593 var _response = _requester.request(_url, "PUT", |
| 2608 "PUT", | 2594 body: _body, |
| 2609 body: _body, | 2595 queryParams: _queryParams, |
| 2610 queryParams: _queryParams, | 2596 uploadOptions: _uploadOptions, |
| 2611 uploadOptions: _uploadOptions, | 2597 uploadMedia: _uploadMedia, |
| 2612 uploadMedia: _uploadMedia, | 2598 downloadOptions: _downloadOptions); |
| 2613 downloadOptions: _downloadOptions); | |
| 2614 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 2599 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
| 2615 } | 2600 } |
| 2616 | 2601 |
| 2617 /** | 2602 /// Dismiss a turn-based match from the match list. The match will no longer |
| 2618 * Dismiss a turn-based match from the match list. The match will no longer | 2603 /// show up in the list and will not generate notifications. |
| 2619 * show up in the list and will not generate notifications. | 2604 /// |
| 2620 * | 2605 /// Request parameters: |
| 2621 * Request parameters: | 2606 /// |
| 2622 * | 2607 /// [matchId] - The ID of the match. |
| 2623 * [matchId] - The ID of the match. | 2608 /// |
| 2624 * | 2609 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2625 * [consistencyToken] - The last-seen mutation timestamp. | 2610 /// |
| 2626 * | 2611 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2627 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2612 /// an error. |
| 2628 * error. | 2613 /// |
| 2629 * | 2614 /// If the used [http.Client] completes with an error when making a REST |
| 2630 * If the used [http.Client] completes with an error when making a REST call, | 2615 /// call, this method will complete with the same error. |
| 2631 * this method will complete with the same error. | |
| 2632 */ | |
| 2633 async.Future dismiss(core.String matchId, {core.String consistencyToken}) { | 2616 async.Future dismiss(core.String matchId, {core.String consistencyToken}) { |
| 2634 var _url = null; | 2617 var _url = null; |
| 2635 var _queryParams = new core.Map(); | 2618 var _queryParams = new core.Map(); |
| 2636 var _uploadMedia = null; | 2619 var _uploadMedia = null; |
| 2637 var _uploadOptions = null; | 2620 var _uploadOptions = null; |
| 2638 var _downloadOptions = commons.DownloadOptions.Metadata; | 2621 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2639 var _body = null; | 2622 var _body = null; |
| 2640 | 2623 |
| 2641 if (matchId == null) { | 2624 if (matchId == null) { |
| 2642 throw new core.ArgumentError("Parameter matchId is required."); | 2625 throw new core.ArgumentError("Parameter matchId is required."); |
| 2643 } | 2626 } |
| 2644 if (consistencyToken != null) { | 2627 if (consistencyToken != null) { |
| 2645 _queryParams["consistencyToken"] = [consistencyToken]; | 2628 _queryParams["consistencyToken"] = [consistencyToken]; |
| 2646 } | 2629 } |
| 2647 | 2630 |
| 2648 _downloadOptions = null; | 2631 _downloadOptions = null; |
| 2649 | 2632 |
| 2650 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/d
ismiss'; | 2633 _url = 'turnbasedmatches/' + |
| 2634 commons.Escaper.ecapeVariable('$matchId') + |
| 2635 '/dismiss'; |
| 2651 | 2636 |
| 2652 var _response = _requester.request(_url, | 2637 var _response = _requester.request(_url, "PUT", |
| 2653 "PUT", | 2638 body: _body, |
| 2654 body: _body, | 2639 queryParams: _queryParams, |
| 2655 queryParams: _queryParams, | 2640 uploadOptions: _uploadOptions, |
| 2656 uploadOptions: _uploadOptions, | 2641 uploadMedia: _uploadMedia, |
| 2657 uploadMedia: _uploadMedia, | 2642 downloadOptions: _downloadOptions); |
| 2658 downloadOptions: _downloadOptions); | |
| 2659 return _response.then((data) => null); | 2643 return _response.then((data) => null); |
| 2660 } | 2644 } |
| 2661 | 2645 |
| 2662 /** | 2646 /// Finish a turn-based match. Each player should make this call once, after |
| 2663 * Finish a turn-based match. Each player should make this call once, after | 2647 /// all results are in. Only the player whose turn it is may make the first |
| 2664 * all results are in. Only the player whose turn it is may make the first | 2648 /// call to Finish, and can pass in the final match state. |
| 2665 * call to Finish, and can pass in the final match state. | 2649 /// |
| 2666 * | 2650 /// [request] - The metadata request object. |
| 2667 * [request] - The metadata request object. | 2651 /// |
| 2668 * | 2652 /// Request parameters: |
| 2669 * Request parameters: | 2653 /// |
| 2670 * | 2654 /// [matchId] - The ID of the match. |
| 2671 * [matchId] - The ID of the match. | 2655 /// |
| 2672 * | 2656 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2673 * [consistencyToken] - The last-seen mutation timestamp. | 2657 /// |
| 2674 * | 2658 /// [language] - The preferred language to use for strings returned by this |
| 2675 * [language] - The preferred language to use for strings returned by this | 2659 /// method. |
| 2676 * method. | 2660 /// |
| 2677 * | 2661 /// Completes with a [TurnBasedMatch]. |
| 2678 * Completes with a [TurnBasedMatch]. | 2662 /// |
| 2679 * | 2663 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2680 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2664 /// an error. |
| 2681 * error. | 2665 /// |
| 2682 * | 2666 /// If the used [http.Client] completes with an error when making a REST |
| 2683 * If the used [http.Client] completes with an error when making a REST call, | 2667 /// call, this method will complete with the same error. |
| 2684 * this method will complete with the same error. | 2668 async.Future<TurnBasedMatch> finish( |
| 2685 */ | 2669 TurnBasedMatchResults request, core.String matchId, |
| 2686 async.Future<TurnBasedMatch> finish(TurnBasedMatchResults request, core.String
matchId, {core.String consistencyToken, core.String language}) { | 2670 {core.String consistencyToken, core.String language}) { |
| 2687 var _url = null; | 2671 var _url = null; |
| 2688 var _queryParams = new core.Map(); | 2672 var _queryParams = new core.Map(); |
| 2689 var _uploadMedia = null; | 2673 var _uploadMedia = null; |
| 2690 var _uploadOptions = null; | 2674 var _uploadOptions = null; |
| 2691 var _downloadOptions = commons.DownloadOptions.Metadata; | 2675 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2692 var _body = null; | 2676 var _body = null; |
| 2693 | 2677 |
| 2694 if (request != null) { | 2678 if (request != null) { |
| 2695 _body = convert.JSON.encode((request).toJson()); | 2679 _body = convert.JSON.encode((request).toJson()); |
| 2696 } | 2680 } |
| 2697 if (matchId == null) { | 2681 if (matchId == null) { |
| 2698 throw new core.ArgumentError("Parameter matchId is required."); | 2682 throw new core.ArgumentError("Parameter matchId is required."); |
| 2699 } | 2683 } |
| 2700 if (consistencyToken != null) { | 2684 if (consistencyToken != null) { |
| 2701 _queryParams["consistencyToken"] = [consistencyToken]; | 2685 _queryParams["consistencyToken"] = [consistencyToken]; |
| 2702 } | 2686 } |
| 2703 if (language != null) { | 2687 if (language != null) { |
| 2704 _queryParams["language"] = [language]; | 2688 _queryParams["language"] = [language]; |
| 2705 } | 2689 } |
| 2706 | 2690 |
| 2707 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/f
inish'; | 2691 _url = 'turnbasedmatches/' + |
| 2692 commons.Escaper.ecapeVariable('$matchId') + |
| 2693 '/finish'; |
| 2708 | 2694 |
| 2709 var _response = _requester.request(_url, | 2695 var _response = _requester.request(_url, "PUT", |
| 2710 "PUT", | 2696 body: _body, |
| 2711 body: _body, | 2697 queryParams: _queryParams, |
| 2712 queryParams: _queryParams, | 2698 uploadOptions: _uploadOptions, |
| 2713 uploadOptions: _uploadOptions, | 2699 uploadMedia: _uploadMedia, |
| 2714 uploadMedia: _uploadMedia, | 2700 downloadOptions: _downloadOptions); |
| 2715 downloadOptions: _downloadOptions); | |
| 2716 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 2701 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
| 2717 } | 2702 } |
| 2718 | 2703 |
| 2719 /** | 2704 /// Get the data for a turn-based match. |
| 2720 * Get the data for a turn-based match. | 2705 /// |
| 2721 * | 2706 /// Request parameters: |
| 2722 * Request parameters: | 2707 /// |
| 2723 * | 2708 /// [matchId] - The ID of the match. |
| 2724 * [matchId] - The ID of the match. | 2709 /// |
| 2725 * | 2710 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2726 * [consistencyToken] - The last-seen mutation timestamp. | 2711 /// |
| 2727 * | 2712 /// [includeMatchData] - Get match data along with metadata. |
| 2728 * [includeMatchData] - Get match data along with metadata. | 2713 /// |
| 2729 * | 2714 /// [language] - The preferred language to use for strings returned by this |
| 2730 * [language] - The preferred language to use for strings returned by this | 2715 /// method. |
| 2731 * method. | 2716 /// |
| 2732 * | 2717 /// Completes with a [TurnBasedMatch]. |
| 2733 * Completes with a [TurnBasedMatch]. | 2718 /// |
| 2734 * | 2719 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2735 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2720 /// an error. |
| 2736 * error. | 2721 /// |
| 2737 * | 2722 /// If the used [http.Client] completes with an error when making a REST |
| 2738 * If the used [http.Client] completes with an error when making a REST call, | 2723 /// call, this method will complete with the same error. |
| 2739 * this method will complete with the same error. | 2724 async.Future<TurnBasedMatch> get(core.String matchId, |
| 2740 */ | 2725 {core.String consistencyToken, |
| 2741 async.Future<TurnBasedMatch> get(core.String matchId, {core.String consistency
Token, core.bool includeMatchData, core.String language}) { | 2726 core.bool includeMatchData, |
| 2727 core.String language}) { |
| 2742 var _url = null; | 2728 var _url = null; |
| 2743 var _queryParams = new core.Map(); | 2729 var _queryParams = new core.Map(); |
| 2744 var _uploadMedia = null; | 2730 var _uploadMedia = null; |
| 2745 var _uploadOptions = null; | 2731 var _uploadOptions = null; |
| 2746 var _downloadOptions = commons.DownloadOptions.Metadata; | 2732 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2747 var _body = null; | 2733 var _body = null; |
| 2748 | 2734 |
| 2749 if (matchId == null) { | 2735 if (matchId == null) { |
| 2750 throw new core.ArgumentError("Parameter matchId is required."); | 2736 throw new core.ArgumentError("Parameter matchId is required."); |
| 2751 } | 2737 } |
| 2752 if (consistencyToken != null) { | 2738 if (consistencyToken != null) { |
| 2753 _queryParams["consistencyToken"] = [consistencyToken]; | 2739 _queryParams["consistencyToken"] = [consistencyToken]; |
| 2754 } | 2740 } |
| 2755 if (includeMatchData != null) { | 2741 if (includeMatchData != null) { |
| 2756 _queryParams["includeMatchData"] = ["${includeMatchData}"]; | 2742 _queryParams["includeMatchData"] = ["${includeMatchData}"]; |
| 2757 } | 2743 } |
| 2758 if (language != null) { | 2744 if (language != null) { |
| 2759 _queryParams["language"] = [language]; | 2745 _queryParams["language"] = [language]; |
| 2760 } | 2746 } |
| 2761 | 2747 |
| 2762 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId'); | 2748 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId'); |
| 2763 | 2749 |
| 2764 var _response = _requester.request(_url, | 2750 var _response = _requester.request(_url, "GET", |
| 2765 "GET", | 2751 body: _body, |
| 2766 body: _body, | 2752 queryParams: _queryParams, |
| 2767 queryParams: _queryParams, | 2753 uploadOptions: _uploadOptions, |
| 2768 uploadOptions: _uploadOptions, | 2754 uploadMedia: _uploadMedia, |
| 2769 uploadMedia: _uploadMedia, | 2755 downloadOptions: _downloadOptions); |
| 2770 downloadOptions: _downloadOptions); | |
| 2771 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 2756 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
| 2772 } | 2757 } |
| 2773 | 2758 |
| 2774 /** | 2759 /// Join a turn-based match. |
| 2775 * Join a turn-based match. | 2760 /// |
| 2776 * | 2761 /// Request parameters: |
| 2777 * Request parameters: | 2762 /// |
| 2778 * | 2763 /// [matchId] - The ID of the match. |
| 2779 * [matchId] - The ID of the match. | 2764 /// |
| 2780 * | 2765 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2781 * [consistencyToken] - The last-seen mutation timestamp. | 2766 /// |
| 2782 * | 2767 /// [language] - The preferred language to use for strings returned by this |
| 2783 * [language] - The preferred language to use for strings returned by this | 2768 /// method. |
| 2784 * method. | 2769 /// |
| 2785 * | 2770 /// Completes with a [TurnBasedMatch]. |
| 2786 * Completes with a [TurnBasedMatch]. | 2771 /// |
| 2787 * | 2772 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2788 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2773 /// an error. |
| 2789 * error. | 2774 /// |
| 2790 * | 2775 /// If the used [http.Client] completes with an error when making a REST |
| 2791 * If the used [http.Client] completes with an error when making a REST call, | 2776 /// call, this method will complete with the same error. |
| 2792 * this method will complete with the same error. | 2777 async.Future<TurnBasedMatch> join(core.String matchId, |
| 2793 */ | 2778 {core.String consistencyToken, core.String language}) { |
| 2794 async.Future<TurnBasedMatch> join(core.String matchId, {core.String consistenc
yToken, core.String language}) { | |
| 2795 var _url = null; | 2779 var _url = null; |
| 2796 var _queryParams = new core.Map(); | 2780 var _queryParams = new core.Map(); |
| 2797 var _uploadMedia = null; | 2781 var _uploadMedia = null; |
| 2798 var _uploadOptions = null; | 2782 var _uploadOptions = null; |
| 2799 var _downloadOptions = commons.DownloadOptions.Metadata; | 2783 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2800 var _body = null; | 2784 var _body = null; |
| 2801 | 2785 |
| 2802 if (matchId == null) { | 2786 if (matchId == null) { |
| 2803 throw new core.ArgumentError("Parameter matchId is required."); | 2787 throw new core.ArgumentError("Parameter matchId is required."); |
| 2804 } | 2788 } |
| 2805 if (consistencyToken != null) { | 2789 if (consistencyToken != null) { |
| 2806 _queryParams["consistencyToken"] = [consistencyToken]; | 2790 _queryParams["consistencyToken"] = [consistencyToken]; |
| 2807 } | 2791 } |
| 2808 if (language != null) { | 2792 if (language != null) { |
| 2809 _queryParams["language"] = [language]; | 2793 _queryParams["language"] = [language]; |
| 2810 } | 2794 } |
| 2811 | 2795 |
| 2812 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/j
oin'; | 2796 _url = 'turnbasedmatches/' + |
| 2797 commons.Escaper.ecapeVariable('$matchId') + |
| 2798 '/join'; |
| 2813 | 2799 |
| 2814 var _response = _requester.request(_url, | 2800 var _response = _requester.request(_url, "PUT", |
| 2815 "PUT", | 2801 body: _body, |
| 2816 body: _body, | 2802 queryParams: _queryParams, |
| 2817 queryParams: _queryParams, | 2803 uploadOptions: _uploadOptions, |
| 2818 uploadOptions: _uploadOptions, | 2804 uploadMedia: _uploadMedia, |
| 2819 uploadMedia: _uploadMedia, | 2805 downloadOptions: _downloadOptions); |
| 2820 downloadOptions: _downloadOptions); | |
| 2821 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 2806 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
| 2822 } | 2807 } |
| 2823 | 2808 |
| 2824 /** | 2809 /// Leave a turn-based match when it is not the current player's turn, |
| 2825 * Leave a turn-based match when it is not the current player's turn, without | 2810 /// without canceling the match. |
| 2826 * canceling the match. | 2811 /// |
| 2827 * | 2812 /// Request parameters: |
| 2828 * Request parameters: | 2813 /// |
| 2829 * | 2814 /// [matchId] - The ID of the match. |
| 2830 * [matchId] - The ID of the match. | 2815 /// |
| 2831 * | 2816 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2832 * [consistencyToken] - The last-seen mutation timestamp. | 2817 /// |
| 2833 * | 2818 /// [language] - The preferred language to use for strings returned by this |
| 2834 * [language] - The preferred language to use for strings returned by this | 2819 /// method. |
| 2835 * method. | 2820 /// |
| 2836 * | 2821 /// Completes with a [TurnBasedMatch]. |
| 2837 * Completes with a [TurnBasedMatch]. | 2822 /// |
| 2838 * | 2823 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2839 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2824 /// an error. |
| 2840 * error. | 2825 /// |
| 2841 * | 2826 /// If the used [http.Client] completes with an error when making a REST |
| 2842 * If the used [http.Client] completes with an error when making a REST call, | 2827 /// call, this method will complete with the same error. |
| 2843 * this method will complete with the same error. | 2828 async.Future<TurnBasedMatch> leave(core.String matchId, |
| 2844 */ | 2829 {core.String consistencyToken, core.String language}) { |
| 2845 async.Future<TurnBasedMatch> leave(core.String matchId, {core.String consisten
cyToken, core.String language}) { | |
| 2846 var _url = null; | 2830 var _url = null; |
| 2847 var _queryParams = new core.Map(); | 2831 var _queryParams = new core.Map(); |
| 2848 var _uploadMedia = null; | 2832 var _uploadMedia = null; |
| 2849 var _uploadOptions = null; | 2833 var _uploadOptions = null; |
| 2850 var _downloadOptions = commons.DownloadOptions.Metadata; | 2834 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2851 var _body = null; | 2835 var _body = null; |
| 2852 | 2836 |
| 2853 if (matchId == null) { | 2837 if (matchId == null) { |
| 2854 throw new core.ArgumentError("Parameter matchId is required."); | 2838 throw new core.ArgumentError("Parameter matchId is required."); |
| 2855 } | 2839 } |
| 2856 if (consistencyToken != null) { | 2840 if (consistencyToken != null) { |
| 2857 _queryParams["consistencyToken"] = [consistencyToken]; | 2841 _queryParams["consistencyToken"] = [consistencyToken]; |
| 2858 } | 2842 } |
| 2859 if (language != null) { | 2843 if (language != null) { |
| 2860 _queryParams["language"] = [language]; | 2844 _queryParams["language"] = [language]; |
| 2861 } | 2845 } |
| 2862 | 2846 |
| 2863 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/l
eave'; | 2847 _url = 'turnbasedmatches/' + |
| 2848 commons.Escaper.ecapeVariable('$matchId') + |
| 2849 '/leave'; |
| 2864 | 2850 |
| 2865 var _response = _requester.request(_url, | 2851 var _response = _requester.request(_url, "PUT", |
| 2866 "PUT", | 2852 body: _body, |
| 2867 body: _body, | 2853 queryParams: _queryParams, |
| 2868 queryParams: _queryParams, | 2854 uploadOptions: _uploadOptions, |
| 2869 uploadOptions: _uploadOptions, | 2855 uploadMedia: _uploadMedia, |
| 2870 uploadMedia: _uploadMedia, | 2856 downloadOptions: _downloadOptions); |
| 2871 downloadOptions: _downloadOptions); | |
| 2872 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 2857 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
| 2873 } | 2858 } |
| 2874 | 2859 |
| 2875 /** | 2860 /// Leave a turn-based match during the current player's turn, without |
| 2876 * Leave a turn-based match during the current player's turn, without | 2861 /// canceling the match. |
| 2877 * canceling the match. | 2862 /// |
| 2878 * | 2863 /// Request parameters: |
| 2879 * Request parameters: | 2864 /// |
| 2880 * | 2865 /// [matchId] - The ID of the match. |
| 2881 * [matchId] - The ID of the match. | 2866 /// |
| 2882 * | 2867 /// [matchVersion] - The version of the match being updated. |
| 2883 * [matchVersion] - The version of the match being updated. | 2868 /// |
| 2884 * | 2869 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2885 * [consistencyToken] - The last-seen mutation timestamp. | 2870 /// |
| 2886 * | 2871 /// [language] - The preferred language to use for strings returned by this |
| 2887 * [language] - The preferred language to use for strings returned by this | 2872 /// method. |
| 2888 * method. | 2873 /// |
| 2889 * | 2874 /// [pendingParticipantId] - The ID of another participant who should take |
| 2890 * [pendingParticipantId] - The ID of another participant who should take | 2875 /// their turn next. If not set, the match will wait for other player(s) to |
| 2891 * their turn next. If not set, the match will wait for other player(s) to | 2876 /// join via automatching; this is only valid if automatch criteria is set on |
| 2892 * join via automatching; this is only valid if automatch criteria is set on | 2877 /// the match with remaining slots for automatched players. |
| 2893 * the match with remaining slots for automatched players. | 2878 /// |
| 2894 * | 2879 /// Completes with a [TurnBasedMatch]. |
| 2895 * Completes with a [TurnBasedMatch]. | 2880 /// |
| 2896 * | 2881 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2897 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2882 /// an error. |
| 2898 * error. | 2883 /// |
| 2899 * | 2884 /// If the used [http.Client] completes with an error when making a REST |
| 2900 * If the used [http.Client] completes with an error when making a REST call, | 2885 /// call, this method will complete with the same error. |
| 2901 * this method will complete with the same error. | 2886 async.Future<TurnBasedMatch> leaveTurn( |
| 2902 */ | 2887 core.String matchId, core.int matchVersion, |
| 2903 async.Future<TurnBasedMatch> leaveTurn(core.String matchId, core.int matchVers
ion, {core.String consistencyToken, core.String language, core.String pendingPar
ticipantId}) { | 2888 {core.String consistencyToken, |
| 2889 core.String language, |
| 2890 core.String pendingParticipantId}) { |
| 2904 var _url = null; | 2891 var _url = null; |
| 2905 var _queryParams = new core.Map(); | 2892 var _queryParams = new core.Map(); |
| 2906 var _uploadMedia = null; | 2893 var _uploadMedia = null; |
| 2907 var _uploadOptions = null; | 2894 var _uploadOptions = null; |
| 2908 var _downloadOptions = commons.DownloadOptions.Metadata; | 2895 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2909 var _body = null; | 2896 var _body = null; |
| 2910 | 2897 |
| 2911 if (matchId == null) { | 2898 if (matchId == null) { |
| 2912 throw new core.ArgumentError("Parameter matchId is required."); | 2899 throw new core.ArgumentError("Parameter matchId is required."); |
| 2913 } | 2900 } |
| 2914 if (matchVersion == null) { | 2901 if (matchVersion == null) { |
| 2915 throw new core.ArgumentError("Parameter matchVersion is required."); | 2902 throw new core.ArgumentError("Parameter matchVersion is required."); |
| 2916 } | 2903 } |
| 2917 _queryParams["matchVersion"] = ["${matchVersion}"]; | 2904 _queryParams["matchVersion"] = ["${matchVersion}"]; |
| 2918 if (consistencyToken != null) { | 2905 if (consistencyToken != null) { |
| 2919 _queryParams["consistencyToken"] = [consistencyToken]; | 2906 _queryParams["consistencyToken"] = [consistencyToken]; |
| 2920 } | 2907 } |
| 2921 if (language != null) { | 2908 if (language != null) { |
| 2922 _queryParams["language"] = [language]; | 2909 _queryParams["language"] = [language]; |
| 2923 } | 2910 } |
| 2924 if (pendingParticipantId != null) { | 2911 if (pendingParticipantId != null) { |
| 2925 _queryParams["pendingParticipantId"] = [pendingParticipantId]; | 2912 _queryParams["pendingParticipantId"] = [pendingParticipantId]; |
| 2926 } | 2913 } |
| 2927 | 2914 |
| 2928 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/l
eaveTurn'; | 2915 _url = 'turnbasedmatches/' + |
| 2916 commons.Escaper.ecapeVariable('$matchId') + |
| 2917 '/leaveTurn'; |
| 2929 | 2918 |
| 2930 var _response = _requester.request(_url, | 2919 var _response = _requester.request(_url, "PUT", |
| 2931 "PUT", | 2920 body: _body, |
| 2932 body: _body, | 2921 queryParams: _queryParams, |
| 2933 queryParams: _queryParams, | 2922 uploadOptions: _uploadOptions, |
| 2934 uploadOptions: _uploadOptions, | 2923 uploadMedia: _uploadMedia, |
| 2935 uploadMedia: _uploadMedia, | 2924 downloadOptions: _downloadOptions); |
| 2936 downloadOptions: _downloadOptions); | |
| 2937 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 2925 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
| 2938 } | 2926 } |
| 2939 | 2927 |
| 2940 /** | 2928 /// Returns turn-based matches the player is or was involved in. |
| 2941 * Returns turn-based matches the player is or was involved in. | 2929 /// |
| 2942 * | 2930 /// Request parameters: |
| 2943 * Request parameters: | 2931 /// |
| 2944 * | 2932 /// [consistencyToken] - The last-seen mutation timestamp. |
| 2945 * [consistencyToken] - The last-seen mutation timestamp. | 2933 /// |
| 2946 * | 2934 /// [includeMatchData] - True if match data should be returned in the |
| 2947 * [includeMatchData] - True if match data should be returned in the response. | 2935 /// response. Note that not all data will necessarily be returned if |
| 2948 * Note that not all data will necessarily be returned if include_match_data | 2936 /// include_match_data is true; the server may decide to only return data for |
| 2949 * is true; the server may decide to only return data for some of the matches | 2937 /// some of the matches to limit download size for the client. The remainder |
| 2950 * to limit download size for the client. The remainder of the data for these | 2938 /// of the data for these matches will be retrievable on request. |
| 2951 * matches will be retrievable on request. | 2939 /// |
| 2952 * | 2940 /// [language] - The preferred language to use for strings returned by this |
| 2953 * [language] - The preferred language to use for strings returned by this | 2941 /// method. |
| 2954 * method. | 2942 /// |
| 2955 * | 2943 /// [maxCompletedMatches] - The maximum number of completed or canceled |
| 2956 * [maxCompletedMatches] - The maximum number of completed or canceled matches | 2944 /// matches to return in the response. If not set, all matches returned could |
| 2957 * to return in the response. If not set, all matches returned could be | 2945 /// be completed or canceled. |
| 2958 * completed or canceled. | 2946 /// Value must be between "0" and "500". |
| 2959 * Value must be between "0" and "500". | 2947 /// |
| 2960 * | 2948 /// [maxResults] - The maximum number of matches to return in the response, |
| 2961 * [maxResults] - The maximum number of matches to return in the response, | 2949 /// used for paging. For any response, the actual number of matches to return |
| 2962 * used for paging. For any response, the actual number of matches to return | 2950 /// may be less than the specified maxResults. |
| 2963 * may be less than the specified maxResults. | 2951 /// Value must be between "1" and "500". |
| 2964 * Value must be between "1" and "500". | 2952 /// |
| 2965 * | 2953 /// [pageToken] - The token returned by the previous request. |
| 2966 * [pageToken] - The token returned by the previous request. | 2954 /// |
| 2967 * | 2955 /// Completes with a [TurnBasedMatchList]. |
| 2968 * Completes with a [TurnBasedMatchList]. | 2956 /// |
| 2969 * | 2957 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 2970 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2958 /// an error. |
| 2971 * error. | 2959 /// |
| 2972 * | 2960 /// If the used [http.Client] completes with an error when making a REST |
| 2973 * If the used [http.Client] completes with an error when making a REST call, | 2961 /// call, this method will complete with the same error. |
| 2974 * this method will complete with the same error. | 2962 async.Future<TurnBasedMatchList> list( |
| 2975 */ | 2963 {core.String consistencyToken, |
| 2976 async.Future<TurnBasedMatchList> list({core.String consistencyToken, core.bool
includeMatchData, core.String language, core.int maxCompletedMatches, core.int
maxResults, core.String pageToken}) { | 2964 core.bool includeMatchData, |
| 2965 core.String language, |
| 2966 core.int maxCompletedMatches, |
| 2967 core.int maxResults, |
| 2968 core.String pageToken}) { |
| 2977 var _url = null; | 2969 var _url = null; |
| 2978 var _queryParams = new core.Map(); | 2970 var _queryParams = new core.Map(); |
| 2979 var _uploadMedia = null; | 2971 var _uploadMedia = null; |
| 2980 var _uploadOptions = null; | 2972 var _uploadOptions = null; |
| 2981 var _downloadOptions = commons.DownloadOptions.Metadata; | 2973 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2982 var _body = null; | 2974 var _body = null; |
| 2983 | 2975 |
| 2984 if (consistencyToken != null) { | 2976 if (consistencyToken != null) { |
| 2985 _queryParams["consistencyToken"] = [consistencyToken]; | 2977 _queryParams["consistencyToken"] = [consistencyToken]; |
| 2986 } | 2978 } |
| 2987 if (includeMatchData != null) { | 2979 if (includeMatchData != null) { |
| 2988 _queryParams["includeMatchData"] = ["${includeMatchData}"]; | 2980 _queryParams["includeMatchData"] = ["${includeMatchData}"]; |
| 2989 } | 2981 } |
| 2990 if (language != null) { | 2982 if (language != null) { |
| 2991 _queryParams["language"] = [language]; | 2983 _queryParams["language"] = [language]; |
| 2992 } | 2984 } |
| 2993 if (maxCompletedMatches != null) { | 2985 if (maxCompletedMatches != null) { |
| 2994 _queryParams["maxCompletedMatches"] = ["${maxCompletedMatches}"]; | 2986 _queryParams["maxCompletedMatches"] = ["${maxCompletedMatches}"]; |
| 2995 } | 2987 } |
| 2996 if (maxResults != null) { | 2988 if (maxResults != null) { |
| 2997 _queryParams["maxResults"] = ["${maxResults}"]; | 2989 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2998 } | 2990 } |
| 2999 if (pageToken != null) { | 2991 if (pageToken != null) { |
| 3000 _queryParams["pageToken"] = [pageToken]; | 2992 _queryParams["pageToken"] = [pageToken]; |
| 3001 } | 2993 } |
| 3002 | 2994 |
| 3003 _url = 'turnbasedmatches'; | 2995 _url = 'turnbasedmatches'; |
| 3004 | 2996 |
| 3005 var _response = _requester.request(_url, | 2997 var _response = _requester.request(_url, "GET", |
| 3006 "GET", | 2998 body: _body, |
| 3007 body: _body, | 2999 queryParams: _queryParams, |
| 3008 queryParams: _queryParams, | 3000 uploadOptions: _uploadOptions, |
| 3009 uploadOptions: _uploadOptions, | 3001 uploadMedia: _uploadMedia, |
| 3010 uploadMedia: _uploadMedia, | 3002 downloadOptions: _downloadOptions); |
| 3011 downloadOptions: _downloadOptions); | |
| 3012 return _response.then((data) => new TurnBasedMatchList.fromJson(data)); | 3003 return _response.then((data) => new TurnBasedMatchList.fromJson(data)); |
| 3013 } | 3004 } |
| 3014 | 3005 |
| 3015 /** | 3006 /// Create a rematch of a match that was previously completed, with the same |
| 3016 * Create a rematch of a match that was previously completed, with the same | 3007 /// participants. This can be called by only one player on a match still in |
| 3017 * participants. This can be called by only one player on a match still in | 3008 /// their list; the player must have called Finish first. Returns the newly |
| 3018 * their list; the player must have called Finish first. Returns the newly | 3009 /// created match; it will be the caller's turn. |
| 3019 * created match; it will be the caller's turn. | 3010 /// |
| 3020 * | 3011 /// Request parameters: |
| 3021 * Request parameters: | 3012 /// |
| 3022 * | 3013 /// [matchId] - The ID of the match. |
| 3023 * [matchId] - The ID of the match. | 3014 /// |
| 3024 * | 3015 /// [consistencyToken] - The last-seen mutation timestamp. |
| 3025 * [consistencyToken] - The last-seen mutation timestamp. | 3016 /// |
| 3026 * | 3017 /// [language] - The preferred language to use for strings returned by this |
| 3027 * [language] - The preferred language to use for strings returned by this | 3018 /// method. |
| 3028 * method. | 3019 /// |
| 3029 * | 3020 /// [requestId] - A randomly generated numeric ID for each request specified |
| 3030 * [requestId] - A randomly generated numeric ID for each request specified by | 3021 /// by the caller. This number is used at the server to ensure that the |
| 3031 * the caller. This number is used at the server to ensure that the request is | 3022 /// request is handled correctly across retries. |
| 3032 * handled correctly across retries. | 3023 /// |
| 3033 * | 3024 /// Completes with a [TurnBasedMatchRematch]. |
| 3034 * Completes with a [TurnBasedMatchRematch]. | 3025 /// |
| 3035 * | 3026 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 3036 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3027 /// an error. |
| 3037 * error. | 3028 /// |
| 3038 * | 3029 /// If the used [http.Client] completes with an error when making a REST |
| 3039 * If the used [http.Client] completes with an error when making a REST call, | 3030 /// call, this method will complete with the same error. |
| 3040 * this method will complete with the same error. | 3031 async.Future<TurnBasedMatchRematch> rematch(core.String matchId, |
| 3041 */ | 3032 {core.String consistencyToken, |
| 3042 async.Future<TurnBasedMatchRematch> rematch(core.String matchId, {core.String
consistencyToken, core.String language, core.String requestId}) { | 3033 core.String language, |
| 3034 core.String requestId}) { |
| 3043 var _url = null; | 3035 var _url = null; |
| 3044 var _queryParams = new core.Map(); | 3036 var _queryParams = new core.Map(); |
| 3045 var _uploadMedia = null; | 3037 var _uploadMedia = null; |
| 3046 var _uploadOptions = null; | 3038 var _uploadOptions = null; |
| 3047 var _downloadOptions = commons.DownloadOptions.Metadata; | 3039 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 3048 var _body = null; | 3040 var _body = null; |
| 3049 | 3041 |
| 3050 if (matchId == null) { | 3042 if (matchId == null) { |
| 3051 throw new core.ArgumentError("Parameter matchId is required."); | 3043 throw new core.ArgumentError("Parameter matchId is required."); |
| 3052 } | 3044 } |
| 3053 if (consistencyToken != null) { | 3045 if (consistencyToken != null) { |
| 3054 _queryParams["consistencyToken"] = [consistencyToken]; | 3046 _queryParams["consistencyToken"] = [consistencyToken]; |
| 3055 } | 3047 } |
| 3056 if (language != null) { | 3048 if (language != null) { |
| 3057 _queryParams["language"] = [language]; | 3049 _queryParams["language"] = [language]; |
| 3058 } | 3050 } |
| 3059 if (requestId != null) { | 3051 if (requestId != null) { |
| 3060 _queryParams["requestId"] = [requestId]; | 3052 _queryParams["requestId"] = [requestId]; |
| 3061 } | 3053 } |
| 3062 | 3054 |
| 3063 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/r
ematch'; | 3055 _url = 'turnbasedmatches/' + |
| 3056 commons.Escaper.ecapeVariable('$matchId') + |
| 3057 '/rematch'; |
| 3064 | 3058 |
| 3065 var _response = _requester.request(_url, | 3059 var _response = _requester.request(_url, "POST", |
| 3066 "POST", | 3060 body: _body, |
| 3067 body: _body, | 3061 queryParams: _queryParams, |
| 3068 queryParams: _queryParams, | 3062 uploadOptions: _uploadOptions, |
| 3069 uploadOptions: _uploadOptions, | 3063 uploadMedia: _uploadMedia, |
| 3070 uploadMedia: _uploadMedia, | 3064 downloadOptions: _downloadOptions); |
| 3071 downloadOptions: _downloadOptions); | |
| 3072 return _response.then((data) => new TurnBasedMatchRematch.fromJson(data)); | 3065 return _response.then((data) => new TurnBasedMatchRematch.fromJson(data)); |
| 3073 } | 3066 } |
| 3074 | 3067 |
| 3075 /** | 3068 /// Returns turn-based matches the player is or was involved in that changed |
| 3076 * Returns turn-based matches the player is or was involved in that changed | 3069 /// since the last sync call, with the least recent changes coming first. |
| 3077 * since the last sync call, with the least recent changes coming first. | 3070 /// Matches that should be removed from the local cache will have a status of |
| 3078 * Matches that should be removed from the local cache will have a status of | 3071 /// MATCH_DELETED. |
| 3079 * MATCH_DELETED. | 3072 /// |
| 3080 * | 3073 /// Request parameters: |
| 3081 * Request parameters: | 3074 /// |
| 3082 * | 3075 /// [consistencyToken] - The last-seen mutation timestamp. |
| 3083 * [consistencyToken] - The last-seen mutation timestamp. | 3076 /// |
| 3084 * | 3077 /// [includeMatchData] - True if match data should be returned in the |
| 3085 * [includeMatchData] - True if match data should be returned in the response. | 3078 /// response. Note that not all data will necessarily be returned if |
| 3086 * Note that not all data will necessarily be returned if include_match_data | 3079 /// include_match_data is true; the server may decide to only return data for |
| 3087 * is true; the server may decide to only return data for some of the matches | 3080 /// some of the matches to limit download size for the client. The remainder |
| 3088 * to limit download size for the client. The remainder of the data for these | 3081 /// of the data for these matches will be retrievable on request. |
| 3089 * matches will be retrievable on request. | 3082 /// |
| 3090 * | 3083 /// [language] - The preferred language to use for strings returned by this |
| 3091 * [language] - The preferred language to use for strings returned by this | 3084 /// method. |
| 3092 * method. | 3085 /// |
| 3093 * | 3086 /// [maxCompletedMatches] - The maximum number of completed or canceled |
| 3094 * [maxCompletedMatches] - The maximum number of completed or canceled matches | 3087 /// matches to return in the response. If not set, all matches returned could |
| 3095 * to return in the response. If not set, all matches returned could be | 3088 /// be completed or canceled. |
| 3096 * completed or canceled. | 3089 /// Value must be between "0" and "500". |
| 3097 * Value must be between "0" and "500". | 3090 /// |
| 3098 * | 3091 /// [maxResults] - The maximum number of matches to return in the response, |
| 3099 * [maxResults] - The maximum number of matches to return in the response, | 3092 /// used for paging. For any response, the actual number of matches to return |
| 3100 * used for paging. For any response, the actual number of matches to return | 3093 /// may be less than the specified maxResults. |
| 3101 * may be less than the specified maxResults. | 3094 /// Value must be between "1" and "500". |
| 3102 * Value must be between "1" and "500". | 3095 /// |
| 3103 * | 3096 /// [pageToken] - The token returned by the previous request. |
| 3104 * [pageToken] - The token returned by the previous request. | 3097 /// |
| 3105 * | 3098 /// Completes with a [TurnBasedMatchSync]. |
| 3106 * Completes with a [TurnBasedMatchSync]. | 3099 /// |
| 3107 * | 3100 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 3108 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3101 /// an error. |
| 3109 * error. | 3102 /// |
| 3110 * | 3103 /// If the used [http.Client] completes with an error when making a REST |
| 3111 * If the used [http.Client] completes with an error when making a REST call, | 3104 /// call, this method will complete with the same error. |
| 3112 * this method will complete with the same error. | 3105 async.Future<TurnBasedMatchSync> sync( |
| 3113 */ | 3106 {core.String consistencyToken, |
| 3114 async.Future<TurnBasedMatchSync> sync({core.String consistencyToken, core.bool
includeMatchData, core.String language, core.int maxCompletedMatches, core.int
maxResults, core.String pageToken}) { | 3107 core.bool includeMatchData, |
| 3108 core.String language, |
| 3109 core.int maxCompletedMatches, |
| 3110 core.int maxResults, |
| 3111 core.String pageToken}) { |
| 3115 var _url = null; | 3112 var _url = null; |
| 3116 var _queryParams = new core.Map(); | 3113 var _queryParams = new core.Map(); |
| 3117 var _uploadMedia = null; | 3114 var _uploadMedia = null; |
| 3118 var _uploadOptions = null; | 3115 var _uploadOptions = null; |
| 3119 var _downloadOptions = commons.DownloadOptions.Metadata; | 3116 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 3120 var _body = null; | 3117 var _body = null; |
| 3121 | 3118 |
| 3122 if (consistencyToken != null) { | 3119 if (consistencyToken != null) { |
| 3123 _queryParams["consistencyToken"] = [consistencyToken]; | 3120 _queryParams["consistencyToken"] = [consistencyToken]; |
| 3124 } | 3121 } |
| 3125 if (includeMatchData != null) { | 3122 if (includeMatchData != null) { |
| 3126 _queryParams["includeMatchData"] = ["${includeMatchData}"]; | 3123 _queryParams["includeMatchData"] = ["${includeMatchData}"]; |
| 3127 } | 3124 } |
| 3128 if (language != null) { | 3125 if (language != null) { |
| 3129 _queryParams["language"] = [language]; | 3126 _queryParams["language"] = [language]; |
| 3130 } | 3127 } |
| 3131 if (maxCompletedMatches != null) { | 3128 if (maxCompletedMatches != null) { |
| 3132 _queryParams["maxCompletedMatches"] = ["${maxCompletedMatches}"]; | 3129 _queryParams["maxCompletedMatches"] = ["${maxCompletedMatches}"]; |
| 3133 } | 3130 } |
| 3134 if (maxResults != null) { | 3131 if (maxResults != null) { |
| 3135 _queryParams["maxResults"] = ["${maxResults}"]; | 3132 _queryParams["maxResults"] = ["${maxResults}"]; |
| 3136 } | 3133 } |
| 3137 if (pageToken != null) { | 3134 if (pageToken != null) { |
| 3138 _queryParams["pageToken"] = [pageToken]; | 3135 _queryParams["pageToken"] = [pageToken]; |
| 3139 } | 3136 } |
| 3140 | 3137 |
| 3141 _url = 'turnbasedmatches/sync'; | 3138 _url = 'turnbasedmatches/sync'; |
| 3142 | 3139 |
| 3143 var _response = _requester.request(_url, | 3140 var _response = _requester.request(_url, "GET", |
| 3144 "GET", | 3141 body: _body, |
| 3145 body: _body, | 3142 queryParams: _queryParams, |
| 3146 queryParams: _queryParams, | 3143 uploadOptions: _uploadOptions, |
| 3147 uploadOptions: _uploadOptions, | 3144 uploadMedia: _uploadMedia, |
| 3148 uploadMedia: _uploadMedia, | 3145 downloadOptions: _downloadOptions); |
| 3149 downloadOptions: _downloadOptions); | |
| 3150 return _response.then((data) => new TurnBasedMatchSync.fromJson(data)); | 3146 return _response.then((data) => new TurnBasedMatchSync.fromJson(data)); |
| 3151 } | 3147 } |
| 3152 | 3148 |
| 3153 /** | 3149 /// Commit the results of a player turn. |
| 3154 * Commit the results of a player turn. | 3150 /// |
| 3155 * | 3151 /// [request] - The metadata request object. |
| 3156 * [request] - The metadata request object. | 3152 /// |
| 3157 * | 3153 /// Request parameters: |
| 3158 * Request parameters: | 3154 /// |
| 3159 * | 3155 /// [matchId] - The ID of the match. |
| 3160 * [matchId] - The ID of the match. | 3156 /// |
| 3161 * | 3157 /// [consistencyToken] - The last-seen mutation timestamp. |
| 3162 * [consistencyToken] - The last-seen mutation timestamp. | 3158 /// |
| 3163 * | 3159 /// [language] - The preferred language to use for strings returned by this |
| 3164 * [language] - The preferred language to use for strings returned by this | 3160 /// method. |
| 3165 * method. | 3161 /// |
| 3166 * | 3162 /// Completes with a [TurnBasedMatch]. |
| 3167 * Completes with a [TurnBasedMatch]. | 3163 /// |
| 3168 * | 3164 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 3169 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3165 /// an error. |
| 3170 * error. | 3166 /// |
| 3171 * | 3167 /// If the used [http.Client] completes with an error when making a REST |
| 3172 * If the used [http.Client] completes with an error when making a REST call, | 3168 /// call, this method will complete with the same error. |
| 3173 * this method will complete with the same error. | 3169 async.Future<TurnBasedMatch> takeTurn( |
| 3174 */ | 3170 TurnBasedMatchTurn request, core.String matchId, |
| 3175 async.Future<TurnBasedMatch> takeTurn(TurnBasedMatchTurn request, core.String
matchId, {core.String consistencyToken, core.String language}) { | 3171 {core.String consistencyToken, core.String language}) { |
| 3176 var _url = null; | 3172 var _url = null; |
| 3177 var _queryParams = new core.Map(); | 3173 var _queryParams = new core.Map(); |
| 3178 var _uploadMedia = null; | 3174 var _uploadMedia = null; |
| 3179 var _uploadOptions = null; | 3175 var _uploadOptions = null; |
| 3180 var _downloadOptions = commons.DownloadOptions.Metadata; | 3176 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 3181 var _body = null; | 3177 var _body = null; |
| 3182 | 3178 |
| 3183 if (request != null) { | 3179 if (request != null) { |
| 3184 _body = convert.JSON.encode((request).toJson()); | 3180 _body = convert.JSON.encode((request).toJson()); |
| 3185 } | 3181 } |
| 3186 if (matchId == null) { | 3182 if (matchId == null) { |
| 3187 throw new core.ArgumentError("Parameter matchId is required."); | 3183 throw new core.ArgumentError("Parameter matchId is required."); |
| 3188 } | 3184 } |
| 3189 if (consistencyToken != null) { | 3185 if (consistencyToken != null) { |
| 3190 _queryParams["consistencyToken"] = [consistencyToken]; | 3186 _queryParams["consistencyToken"] = [consistencyToken]; |
| 3191 } | 3187 } |
| 3192 if (language != null) { | 3188 if (language != null) { |
| 3193 _queryParams["language"] = [language]; | 3189 _queryParams["language"] = [language]; |
| 3194 } | 3190 } |
| 3195 | 3191 |
| 3196 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/t
urn'; | 3192 _url = 'turnbasedmatches/' + |
| 3193 commons.Escaper.ecapeVariable('$matchId') + |
| 3194 '/turn'; |
| 3197 | 3195 |
| 3198 var _response = _requester.request(_url, | 3196 var _response = _requester.request(_url, "PUT", |
| 3199 "PUT", | 3197 body: _body, |
| 3200 body: _body, | 3198 queryParams: _queryParams, |
| 3201 queryParams: _queryParams, | 3199 uploadOptions: _uploadOptions, |
| 3202 uploadOptions: _uploadOptions, | 3200 uploadMedia: _uploadMedia, |
| 3203 uploadMedia: _uploadMedia, | 3201 downloadOptions: _downloadOptions); |
| 3204 downloadOptions: _downloadOptions); | |
| 3205 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 3202 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
| 3206 } | 3203 } |
| 3207 | |
| 3208 } | 3204 } |
| 3209 | 3205 |
| 3206 /// This is a JSON template for an achievement definition object. |
| 3207 class AchievementDefinition { |
| 3208 /// The type of the achievement. |
| 3209 /// Possible values are: |
| 3210 /// - "STANDARD" - Achievement is either locked or unlocked. |
| 3211 /// - "INCREMENTAL" - Achievement is incremental. |
| 3212 core.String achievementType; |
| 3210 | 3213 |
| 3214 /// The description of the achievement. |
| 3215 core.String description; |
| 3211 | 3216 |
| 3212 /** This is a JSON template for an achievement definition object. */ | 3217 /// Experience points which will be earned when unlocking this achievement. |
| 3213 class AchievementDefinition { | |
| 3214 /** | |
| 3215 * The type of the achievement. | |
| 3216 * Possible values are: | |
| 3217 * - "STANDARD" - Achievement is either locked or unlocked. | |
| 3218 * - "INCREMENTAL" - Achievement is incremental. | |
| 3219 */ | |
| 3220 core.String achievementType; | |
| 3221 /** The description of the achievement. */ | |
| 3222 core.String description; | |
| 3223 /** | |
| 3224 * Experience points which will be earned when unlocking this achievement. | |
| 3225 */ | |
| 3226 core.String experiencePoints; | 3218 core.String experiencePoints; |
| 3227 /** The total steps for an incremental achievement as a string. */ | 3219 |
| 3220 /// The total steps for an incremental achievement as a string. |
| 3228 core.String formattedTotalSteps; | 3221 core.String formattedTotalSteps; |
| 3229 /** The ID of the achievement. */ | 3222 |
| 3223 /// The ID of the achievement. |
| 3230 core.String id; | 3224 core.String id; |
| 3231 /** | 3225 |
| 3232 * The initial state of the achievement. | 3226 /// The initial state of the achievement. |
| 3233 * Possible values are: | 3227 /// Possible values are: |
| 3234 * - "HIDDEN" - Achievement is hidden. | 3228 /// - "HIDDEN" - Achievement is hidden. |
| 3235 * - "REVEALED" - Achievement is revealed. | 3229 /// - "REVEALED" - Achievement is revealed. |
| 3236 * - "UNLOCKED" - Achievement is unlocked. | 3230 /// - "UNLOCKED" - Achievement is unlocked. |
| 3237 */ | |
| 3238 core.String initialState; | 3231 core.String initialState; |
| 3239 /** | 3232 |
| 3240 * Indicates whether the revealed icon image being returned is a default | 3233 /// Indicates whether the revealed icon image being returned is a default |
| 3241 * image, or is provided by the game. | 3234 /// image, or is provided by the game. |
| 3242 */ | |
| 3243 core.bool isRevealedIconUrlDefault; | 3235 core.bool isRevealedIconUrlDefault; |
| 3244 /** | 3236 |
| 3245 * Indicates whether the unlocked icon image being returned is a default | 3237 /// Indicates whether the unlocked icon image being returned is a default |
| 3246 * image, or is game-provided. | 3238 /// image, or is game-provided. |
| 3247 */ | |
| 3248 core.bool isUnlockedIconUrlDefault; | 3239 core.bool isUnlockedIconUrlDefault; |
| 3249 /** | 3240 |
| 3250 * Uniquely identifies the type of this resource. Value is always the fixed | 3241 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 3251 * string games#achievementDefinition. | 3242 /// string games#achievementDefinition. |
| 3252 */ | |
| 3253 core.String kind; | 3243 core.String kind; |
| 3254 /** The name of the achievement. */ | 3244 |
| 3245 /// The name of the achievement. |
| 3255 core.String name; | 3246 core.String name; |
| 3256 /** The image URL for the revealed achievement icon. */ | 3247 |
| 3248 /// The image URL for the revealed achievement icon. |
| 3257 core.String revealedIconUrl; | 3249 core.String revealedIconUrl; |
| 3258 /** The total steps for an incremental achievement. */ | 3250 |
| 3251 /// The total steps for an incremental achievement. |
| 3259 core.int totalSteps; | 3252 core.int totalSteps; |
| 3260 /** The image URL for the unlocked achievement icon. */ | 3253 |
| 3254 /// The image URL for the unlocked achievement icon. |
| 3261 core.String unlockedIconUrl; | 3255 core.String unlockedIconUrl; |
| 3262 | 3256 |
| 3263 AchievementDefinition(); | 3257 AchievementDefinition(); |
| 3264 | 3258 |
| 3265 AchievementDefinition.fromJson(core.Map _json) { | 3259 AchievementDefinition.fromJson(core.Map _json) { |
| 3266 if (_json.containsKey("achievementType")) { | 3260 if (_json.containsKey("achievementType")) { |
| 3267 achievementType = _json["achievementType"]; | 3261 achievementType = _json["achievementType"]; |
| 3268 } | 3262 } |
| 3269 if (_json.containsKey("description")) { | 3263 if (_json.containsKey("description")) { |
| 3270 description = _json["description"]; | 3264 description = _json["description"]; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 3298 } | 3292 } |
| 3299 if (_json.containsKey("totalSteps")) { | 3293 if (_json.containsKey("totalSteps")) { |
| 3300 totalSteps = _json["totalSteps"]; | 3294 totalSteps = _json["totalSteps"]; |
| 3301 } | 3295 } |
| 3302 if (_json.containsKey("unlockedIconUrl")) { | 3296 if (_json.containsKey("unlockedIconUrl")) { |
| 3303 unlockedIconUrl = _json["unlockedIconUrl"]; | 3297 unlockedIconUrl = _json["unlockedIconUrl"]; |
| 3304 } | 3298 } |
| 3305 } | 3299 } |
| 3306 | 3300 |
| 3307 core.Map<core.String, core.Object> toJson() { | 3301 core.Map<core.String, core.Object> toJson() { |
| 3308 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3302 final core.Map<core.String, core.Object> _json = |
| 3303 new core.Map<core.String, core.Object>(); |
| 3309 if (achievementType != null) { | 3304 if (achievementType != null) { |
| 3310 _json["achievementType"] = achievementType; | 3305 _json["achievementType"] = achievementType; |
| 3311 } | 3306 } |
| 3312 if (description != null) { | 3307 if (description != null) { |
| 3313 _json["description"] = description; | 3308 _json["description"] = description; |
| 3314 } | 3309 } |
| 3315 if (experiencePoints != null) { | 3310 if (experiencePoints != null) { |
| 3316 _json["experiencePoints"] = experiencePoints; | 3311 _json["experiencePoints"] = experiencePoints; |
| 3317 } | 3312 } |
| 3318 if (formattedTotalSteps != null) { | 3313 if (formattedTotalSteps != null) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3342 if (totalSteps != null) { | 3337 if (totalSteps != null) { |
| 3343 _json["totalSteps"] = totalSteps; | 3338 _json["totalSteps"] = totalSteps; |
| 3344 } | 3339 } |
| 3345 if (unlockedIconUrl != null) { | 3340 if (unlockedIconUrl != null) { |
| 3346 _json["unlockedIconUrl"] = unlockedIconUrl; | 3341 _json["unlockedIconUrl"] = unlockedIconUrl; |
| 3347 } | 3342 } |
| 3348 return _json; | 3343 return _json; |
| 3349 } | 3344 } |
| 3350 } | 3345 } |
| 3351 | 3346 |
| 3352 /** This is a JSON template for a list of achievement definition objects. */ | 3347 /// This is a JSON template for a list of achievement definition objects. |
| 3353 class AchievementDefinitionsListResponse { | 3348 class AchievementDefinitionsListResponse { |
| 3354 /** The achievement definitions. */ | 3349 /// The achievement definitions. |
| 3355 core.List<AchievementDefinition> items; | 3350 core.List<AchievementDefinition> items; |
| 3356 /** | 3351 |
| 3357 * Uniquely identifies the type of this resource. Value is always the fixed | 3352 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 3358 * string games#achievementDefinitionsListResponse. | 3353 /// string games#achievementDefinitionsListResponse. |
| 3359 */ | |
| 3360 core.String kind; | 3354 core.String kind; |
| 3361 /** Token corresponding to the next page of results. */ | 3355 |
| 3356 /// Token corresponding to the next page of results. |
| 3362 core.String nextPageToken; | 3357 core.String nextPageToken; |
| 3363 | 3358 |
| 3364 AchievementDefinitionsListResponse(); | 3359 AchievementDefinitionsListResponse(); |
| 3365 | 3360 |
| 3366 AchievementDefinitionsListResponse.fromJson(core.Map _json) { | 3361 AchievementDefinitionsListResponse.fromJson(core.Map _json) { |
| 3367 if (_json.containsKey("items")) { | 3362 if (_json.containsKey("items")) { |
| 3368 items = _json["items"].map((value) => new AchievementDefinition.fromJson(v
alue)).toList(); | 3363 items = _json["items"] |
| 3364 .map((value) => new AchievementDefinition.fromJson(value)) |
| 3365 .toList(); |
| 3369 } | 3366 } |
| 3370 if (_json.containsKey("kind")) { | 3367 if (_json.containsKey("kind")) { |
| 3371 kind = _json["kind"]; | 3368 kind = _json["kind"]; |
| 3372 } | 3369 } |
| 3373 if (_json.containsKey("nextPageToken")) { | 3370 if (_json.containsKey("nextPageToken")) { |
| 3374 nextPageToken = _json["nextPageToken"]; | 3371 nextPageToken = _json["nextPageToken"]; |
| 3375 } | 3372 } |
| 3376 } | 3373 } |
| 3377 | 3374 |
| 3378 core.Map<core.String, core.Object> toJson() { | 3375 core.Map<core.String, core.Object> toJson() { |
| 3379 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3376 final core.Map<core.String, core.Object> _json = |
| 3377 new core.Map<core.String, core.Object>(); |
| 3380 if (items != null) { | 3378 if (items != null) { |
| 3381 _json["items"] = items.map((value) => (value).toJson()).toList(); | 3379 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 3382 } | 3380 } |
| 3383 if (kind != null) { | 3381 if (kind != null) { |
| 3384 _json["kind"] = kind; | 3382 _json["kind"] = kind; |
| 3385 } | 3383 } |
| 3386 if (nextPageToken != null) { | 3384 if (nextPageToken != null) { |
| 3387 _json["nextPageToken"] = nextPageToken; | 3385 _json["nextPageToken"] = nextPageToken; |
| 3388 } | 3386 } |
| 3389 return _json; | 3387 return _json; |
| 3390 } | 3388 } |
| 3391 } | 3389 } |
| 3392 | 3390 |
| 3393 /** This is a JSON template for an achievement increment response */ | 3391 /// This is a JSON template for an achievement increment response |
| 3394 class AchievementIncrementResponse { | 3392 class AchievementIncrementResponse { |
| 3395 /** The current steps recorded for this incremental achievement. */ | 3393 /// The current steps recorded for this incremental achievement. |
| 3396 core.int currentSteps; | 3394 core.int currentSteps; |
| 3397 /** | 3395 |
| 3398 * Uniquely identifies the type of this resource. Value is always the fixed | 3396 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 3399 * string games#achievementIncrementResponse. | 3397 /// string games#achievementIncrementResponse. |
| 3400 */ | |
| 3401 core.String kind; | 3398 core.String kind; |
| 3402 /** | 3399 |
| 3403 * Whether the current steps for the achievement has reached the number of | 3400 /// Whether the current steps for the achievement has reached the number of |
| 3404 * steps required to unlock. | 3401 /// steps required to unlock. |
| 3405 */ | |
| 3406 core.bool newlyUnlocked; | 3402 core.bool newlyUnlocked; |
| 3407 | 3403 |
| 3408 AchievementIncrementResponse(); | 3404 AchievementIncrementResponse(); |
| 3409 | 3405 |
| 3410 AchievementIncrementResponse.fromJson(core.Map _json) { | 3406 AchievementIncrementResponse.fromJson(core.Map _json) { |
| 3411 if (_json.containsKey("currentSteps")) { | 3407 if (_json.containsKey("currentSteps")) { |
| 3412 currentSteps = _json["currentSteps"]; | 3408 currentSteps = _json["currentSteps"]; |
| 3413 } | 3409 } |
| 3414 if (_json.containsKey("kind")) { | 3410 if (_json.containsKey("kind")) { |
| 3415 kind = _json["kind"]; | 3411 kind = _json["kind"]; |
| 3416 } | 3412 } |
| 3417 if (_json.containsKey("newlyUnlocked")) { | 3413 if (_json.containsKey("newlyUnlocked")) { |
| 3418 newlyUnlocked = _json["newlyUnlocked"]; | 3414 newlyUnlocked = _json["newlyUnlocked"]; |
| 3419 } | 3415 } |
| 3420 } | 3416 } |
| 3421 | 3417 |
| 3422 core.Map<core.String, core.Object> toJson() { | 3418 core.Map<core.String, core.Object> toJson() { |
| 3423 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3419 final core.Map<core.String, core.Object> _json = |
| 3420 new core.Map<core.String, core.Object>(); |
| 3424 if (currentSteps != null) { | 3421 if (currentSteps != null) { |
| 3425 _json["currentSteps"] = currentSteps; | 3422 _json["currentSteps"] = currentSteps; |
| 3426 } | 3423 } |
| 3427 if (kind != null) { | 3424 if (kind != null) { |
| 3428 _json["kind"] = kind; | 3425 _json["kind"] = kind; |
| 3429 } | 3426 } |
| 3430 if (newlyUnlocked != null) { | 3427 if (newlyUnlocked != null) { |
| 3431 _json["newlyUnlocked"] = newlyUnlocked; | 3428 _json["newlyUnlocked"] = newlyUnlocked; |
| 3432 } | 3429 } |
| 3433 return _json; | 3430 return _json; |
| 3434 } | 3431 } |
| 3435 } | 3432 } |
| 3436 | 3433 |
| 3437 /** This is a JSON template for an achievement reveal response */ | 3434 /// This is a JSON template for an achievement reveal response |
| 3438 class AchievementRevealResponse { | 3435 class AchievementRevealResponse { |
| 3439 /** | 3436 /// The current state of the achievement for which a reveal was attempted. |
| 3440 * The current state of the achievement for which a reveal was attempted. This | 3437 /// This might be UNLOCKED if the achievement was already unlocked. |
| 3441 * might be UNLOCKED if the achievement was already unlocked. | 3438 /// Possible values are: |
| 3442 * Possible values are: | 3439 /// - "REVEALED" - Achievement is revealed. |
| 3443 * - "REVEALED" - Achievement is revealed. | 3440 /// - "UNLOCKED" - Achievement is unlocked. |
| 3444 * - "UNLOCKED" - Achievement is unlocked. | |
| 3445 */ | |
| 3446 core.String currentState; | 3441 core.String currentState; |
| 3447 /** | 3442 |
| 3448 * Uniquely identifies the type of this resource. Value is always the fixed | 3443 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 3449 * string games#achievementRevealResponse. | 3444 /// string games#achievementRevealResponse. |
| 3450 */ | |
| 3451 core.String kind; | 3445 core.String kind; |
| 3452 | 3446 |
| 3453 AchievementRevealResponse(); | 3447 AchievementRevealResponse(); |
| 3454 | 3448 |
| 3455 AchievementRevealResponse.fromJson(core.Map _json) { | 3449 AchievementRevealResponse.fromJson(core.Map _json) { |
| 3456 if (_json.containsKey("currentState")) { | 3450 if (_json.containsKey("currentState")) { |
| 3457 currentState = _json["currentState"]; | 3451 currentState = _json["currentState"]; |
| 3458 } | 3452 } |
| 3459 if (_json.containsKey("kind")) { | 3453 if (_json.containsKey("kind")) { |
| 3460 kind = _json["kind"]; | 3454 kind = _json["kind"]; |
| 3461 } | 3455 } |
| 3462 } | 3456 } |
| 3463 | 3457 |
| 3464 core.Map<core.String, core.Object> toJson() { | 3458 core.Map<core.String, core.Object> toJson() { |
| 3465 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3459 final core.Map<core.String, core.Object> _json = |
| 3460 new core.Map<core.String, core.Object>(); |
| 3466 if (currentState != null) { | 3461 if (currentState != null) { |
| 3467 _json["currentState"] = currentState; | 3462 _json["currentState"] = currentState; |
| 3468 } | 3463 } |
| 3469 if (kind != null) { | 3464 if (kind != null) { |
| 3470 _json["kind"] = kind; | 3465 _json["kind"] = kind; |
| 3471 } | 3466 } |
| 3472 return _json; | 3467 return _json; |
| 3473 } | 3468 } |
| 3474 } | 3469 } |
| 3475 | 3470 |
| 3476 /** This is a JSON template for an achievement set steps at least response. */ | 3471 /// This is a JSON template for an achievement set steps at least response. |
| 3477 class AchievementSetStepsAtLeastResponse { | 3472 class AchievementSetStepsAtLeastResponse { |
| 3478 /** The current steps recorded for this incremental achievement. */ | 3473 /// The current steps recorded for this incremental achievement. |
| 3479 core.int currentSteps; | 3474 core.int currentSteps; |
| 3480 /** | 3475 |
| 3481 * Uniquely identifies the type of this resource. Value is always the fixed | 3476 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 3482 * string games#achievementSetStepsAtLeastResponse. | 3477 /// string games#achievementSetStepsAtLeastResponse. |
| 3483 */ | |
| 3484 core.String kind; | 3478 core.String kind; |
| 3485 /** | 3479 |
| 3486 * Whether the the current steps for the achievement has reached the number of | 3480 /// Whether the the current steps for the achievement has reached the number |
| 3487 * steps required to unlock. | 3481 /// of steps required to unlock. |
| 3488 */ | |
| 3489 core.bool newlyUnlocked; | 3482 core.bool newlyUnlocked; |
| 3490 | 3483 |
| 3491 AchievementSetStepsAtLeastResponse(); | 3484 AchievementSetStepsAtLeastResponse(); |
| 3492 | 3485 |
| 3493 AchievementSetStepsAtLeastResponse.fromJson(core.Map _json) { | 3486 AchievementSetStepsAtLeastResponse.fromJson(core.Map _json) { |
| 3494 if (_json.containsKey("currentSteps")) { | 3487 if (_json.containsKey("currentSteps")) { |
| 3495 currentSteps = _json["currentSteps"]; | 3488 currentSteps = _json["currentSteps"]; |
| 3496 } | 3489 } |
| 3497 if (_json.containsKey("kind")) { | 3490 if (_json.containsKey("kind")) { |
| 3498 kind = _json["kind"]; | 3491 kind = _json["kind"]; |
| 3499 } | 3492 } |
| 3500 if (_json.containsKey("newlyUnlocked")) { | 3493 if (_json.containsKey("newlyUnlocked")) { |
| 3501 newlyUnlocked = _json["newlyUnlocked"]; | 3494 newlyUnlocked = _json["newlyUnlocked"]; |
| 3502 } | 3495 } |
| 3503 } | 3496 } |
| 3504 | 3497 |
| 3505 core.Map<core.String, core.Object> toJson() { | 3498 core.Map<core.String, core.Object> toJson() { |
| 3506 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3499 final core.Map<core.String, core.Object> _json = |
| 3500 new core.Map<core.String, core.Object>(); |
| 3507 if (currentSteps != null) { | 3501 if (currentSteps != null) { |
| 3508 _json["currentSteps"] = currentSteps; | 3502 _json["currentSteps"] = currentSteps; |
| 3509 } | 3503 } |
| 3510 if (kind != null) { | 3504 if (kind != null) { |
| 3511 _json["kind"] = kind; | 3505 _json["kind"] = kind; |
| 3512 } | 3506 } |
| 3513 if (newlyUnlocked != null) { | 3507 if (newlyUnlocked != null) { |
| 3514 _json["newlyUnlocked"] = newlyUnlocked; | 3508 _json["newlyUnlocked"] = newlyUnlocked; |
| 3515 } | 3509 } |
| 3516 return _json; | 3510 return _json; |
| 3517 } | 3511 } |
| 3518 } | 3512 } |
| 3519 | 3513 |
| 3520 /** This is a JSON template for an achievement unlock response */ | 3514 /// This is a JSON template for an achievement unlock response |
| 3521 class AchievementUnlockResponse { | 3515 class AchievementUnlockResponse { |
| 3522 /** | 3516 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 3523 * Uniquely identifies the type of this resource. Value is always the fixed | 3517 /// string games#achievementUnlockResponse. |
| 3524 * string games#achievementUnlockResponse. | |
| 3525 */ | |
| 3526 core.String kind; | 3518 core.String kind; |
| 3527 /** | 3519 |
| 3528 * Whether this achievement was newly unlocked (that is, whether the unlock | 3520 /// Whether this achievement was newly unlocked (that is, whether the unlock |
| 3529 * request for the achievement was the first for the player). | 3521 /// request for the achievement was the first for the player). |
| 3530 */ | |
| 3531 core.bool newlyUnlocked; | 3522 core.bool newlyUnlocked; |
| 3532 | 3523 |
| 3533 AchievementUnlockResponse(); | 3524 AchievementUnlockResponse(); |
| 3534 | 3525 |
| 3535 AchievementUnlockResponse.fromJson(core.Map _json) { | 3526 AchievementUnlockResponse.fromJson(core.Map _json) { |
| 3536 if (_json.containsKey("kind")) { | 3527 if (_json.containsKey("kind")) { |
| 3537 kind = _json["kind"]; | 3528 kind = _json["kind"]; |
| 3538 } | 3529 } |
| 3539 if (_json.containsKey("newlyUnlocked")) { | 3530 if (_json.containsKey("newlyUnlocked")) { |
| 3540 newlyUnlocked = _json["newlyUnlocked"]; | 3531 newlyUnlocked = _json["newlyUnlocked"]; |
| 3541 } | 3532 } |
| 3542 } | 3533 } |
| 3543 | 3534 |
| 3544 core.Map<core.String, core.Object> toJson() { | 3535 core.Map<core.String, core.Object> toJson() { |
| 3545 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3536 final core.Map<core.String, core.Object> _json = |
| 3537 new core.Map<core.String, core.Object>(); |
| 3546 if (kind != null) { | 3538 if (kind != null) { |
| 3547 _json["kind"] = kind; | 3539 _json["kind"] = kind; |
| 3548 } | 3540 } |
| 3549 if (newlyUnlocked != null) { | 3541 if (newlyUnlocked != null) { |
| 3550 _json["newlyUnlocked"] = newlyUnlocked; | 3542 _json["newlyUnlocked"] = newlyUnlocked; |
| 3551 } | 3543 } |
| 3552 return _json; | 3544 return _json; |
| 3553 } | 3545 } |
| 3554 } | 3546 } |
| 3555 | 3547 |
| 3556 /** This is a JSON template for a list of achievement update requests. */ | 3548 /// This is a JSON template for a list of achievement update requests. |
| 3557 class AchievementUpdateMultipleRequest { | 3549 class AchievementUpdateMultipleRequest { |
| 3558 /** | 3550 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 3559 * Uniquely identifies the type of this resource. Value is always the fixed | 3551 /// string games#achievementUpdateMultipleRequest. |
| 3560 * string games#achievementUpdateMultipleRequest. | |
| 3561 */ | |
| 3562 core.String kind; | 3552 core.String kind; |
| 3563 /** The individual achievement update requests. */ | 3553 |
| 3554 /// The individual achievement update requests. |
| 3564 core.List<AchievementUpdateRequest> updates; | 3555 core.List<AchievementUpdateRequest> updates; |
| 3565 | 3556 |
| 3566 AchievementUpdateMultipleRequest(); | 3557 AchievementUpdateMultipleRequest(); |
| 3567 | 3558 |
| 3568 AchievementUpdateMultipleRequest.fromJson(core.Map _json) { | 3559 AchievementUpdateMultipleRequest.fromJson(core.Map _json) { |
| 3569 if (_json.containsKey("kind")) { | 3560 if (_json.containsKey("kind")) { |
| 3570 kind = _json["kind"]; | 3561 kind = _json["kind"]; |
| 3571 } | 3562 } |
| 3572 if (_json.containsKey("updates")) { | 3563 if (_json.containsKey("updates")) { |
| 3573 updates = _json["updates"].map((value) => new AchievementUpdateRequest.fro
mJson(value)).toList(); | 3564 updates = _json["updates"] |
| 3565 .map((value) => new AchievementUpdateRequest.fromJson(value)) |
| 3566 .toList(); |
| 3574 } | 3567 } |
| 3575 } | 3568 } |
| 3576 | 3569 |
| 3577 core.Map<core.String, core.Object> toJson() { | 3570 core.Map<core.String, core.Object> toJson() { |
| 3578 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3571 final core.Map<core.String, core.Object> _json = |
| 3572 new core.Map<core.String, core.Object>(); |
| 3579 if (kind != null) { | 3573 if (kind != null) { |
| 3580 _json["kind"] = kind; | 3574 _json["kind"] = kind; |
| 3581 } | 3575 } |
| 3582 if (updates != null) { | 3576 if (updates != null) { |
| 3583 _json["updates"] = updates.map((value) => (value).toJson()).toList(); | 3577 _json["updates"] = updates.map((value) => (value).toJson()).toList(); |
| 3584 } | 3578 } |
| 3585 return _json; | 3579 return _json; |
| 3586 } | 3580 } |
| 3587 } | 3581 } |
| 3588 | 3582 |
| 3589 /** This is a JSON template for an achievement unlock response. */ | 3583 /// This is a JSON template for an achievement unlock response. |
| 3590 class AchievementUpdateMultipleResponse { | 3584 class AchievementUpdateMultipleResponse { |
| 3591 /** | 3585 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 3592 * Uniquely identifies the type of this resource. Value is always the fixed | 3586 /// string games#achievementUpdateListResponse. |
| 3593 * string games#achievementUpdateListResponse. | |
| 3594 */ | |
| 3595 core.String kind; | 3587 core.String kind; |
| 3596 /** The updated state of the achievements. */ | 3588 |
| 3589 /// The updated state of the achievements. |
| 3597 core.List<AchievementUpdateResponse> updatedAchievements; | 3590 core.List<AchievementUpdateResponse> updatedAchievements; |
| 3598 | 3591 |
| 3599 AchievementUpdateMultipleResponse(); | 3592 AchievementUpdateMultipleResponse(); |
| 3600 | 3593 |
| 3601 AchievementUpdateMultipleResponse.fromJson(core.Map _json) { | 3594 AchievementUpdateMultipleResponse.fromJson(core.Map _json) { |
| 3602 if (_json.containsKey("kind")) { | 3595 if (_json.containsKey("kind")) { |
| 3603 kind = _json["kind"]; | 3596 kind = _json["kind"]; |
| 3604 } | 3597 } |
| 3605 if (_json.containsKey("updatedAchievements")) { | 3598 if (_json.containsKey("updatedAchievements")) { |
| 3606 updatedAchievements = _json["updatedAchievements"].map((value) => new Achi
evementUpdateResponse.fromJson(value)).toList(); | 3599 updatedAchievements = _json["updatedAchievements"] |
| 3600 .map((value) => new AchievementUpdateResponse.fromJson(value)) |
| 3601 .toList(); |
| 3607 } | 3602 } |
| 3608 } | 3603 } |
| 3609 | 3604 |
| 3610 core.Map<core.String, core.Object> toJson() { | 3605 core.Map<core.String, core.Object> toJson() { |
| 3611 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3606 final core.Map<core.String, core.Object> _json = |
| 3607 new core.Map<core.String, core.Object>(); |
| 3612 if (kind != null) { | 3608 if (kind != null) { |
| 3613 _json["kind"] = kind; | 3609 _json["kind"] = kind; |
| 3614 } | 3610 } |
| 3615 if (updatedAchievements != null) { | 3611 if (updatedAchievements != null) { |
| 3616 _json["updatedAchievements"] = updatedAchievements.map((value) => (value).
toJson()).toList(); | 3612 _json["updatedAchievements"] = |
| 3613 updatedAchievements.map((value) => (value).toJson()).toList(); |
| 3617 } | 3614 } |
| 3618 return _json; | 3615 return _json; |
| 3619 } | 3616 } |
| 3620 } | 3617 } |
| 3621 | 3618 |
| 3622 /** This is a JSON template for a request to update an achievement. */ | 3619 /// This is a JSON template for a request to update an achievement. |
| 3623 class AchievementUpdateRequest { | 3620 class AchievementUpdateRequest { |
| 3624 /** The achievement this update is being applied to. */ | 3621 /// The achievement this update is being applied to. |
| 3625 core.String achievementId; | 3622 core.String achievementId; |
| 3626 /** | 3623 |
| 3627 * The payload if an update of type INCREMENT was requested for the | 3624 /// The payload if an update of type INCREMENT was requested for the |
| 3628 * achievement. | 3625 /// achievement. |
| 3629 */ | |
| 3630 GamesAchievementIncrement incrementPayload; | 3626 GamesAchievementIncrement incrementPayload; |
| 3631 /** | 3627 |
| 3632 * Uniquely identifies the type of this resource. Value is always the fixed | 3628 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 3633 * string games#achievementUpdateRequest. | 3629 /// string games#achievementUpdateRequest. |
| 3634 */ | |
| 3635 core.String kind; | 3630 core.String kind; |
| 3636 /** | 3631 |
| 3637 * The payload if an update of type SET_STEPS_AT_LEAST was requested for the | 3632 /// The payload if an update of type SET_STEPS_AT_LEAST was requested for the |
| 3638 * achievement. | 3633 /// achievement. |
| 3639 */ | |
| 3640 GamesAchievementSetStepsAtLeast setStepsAtLeastPayload; | 3634 GamesAchievementSetStepsAtLeast setStepsAtLeastPayload; |
| 3641 /** | 3635 |
| 3642 * The type of update being applied. | 3636 /// The type of update being applied. |
| 3643 * Possible values are: | 3637 /// Possible values are: |
| 3644 * - "REVEAL" - Achievement is revealed. | 3638 /// - "REVEAL" - Achievement is revealed. |
| 3645 * - "UNLOCK" - Achievement is unlocked. | 3639 /// - "UNLOCK" - Achievement is unlocked. |
| 3646 * - "INCREMENT" - Achievement is incremented. | 3640 /// - "INCREMENT" - Achievement is incremented. |
| 3647 * - "SET_STEPS_AT_LEAST" - Achievement progress is set to at least the passed | 3641 /// - "SET_STEPS_AT_LEAST" - Achievement progress is set to at least the |
| 3648 * value. | 3642 /// passed value. |
| 3649 */ | |
| 3650 core.String updateType; | 3643 core.String updateType; |
| 3651 | 3644 |
| 3652 AchievementUpdateRequest(); | 3645 AchievementUpdateRequest(); |
| 3653 | 3646 |
| 3654 AchievementUpdateRequest.fromJson(core.Map _json) { | 3647 AchievementUpdateRequest.fromJson(core.Map _json) { |
| 3655 if (_json.containsKey("achievementId")) { | 3648 if (_json.containsKey("achievementId")) { |
| 3656 achievementId = _json["achievementId"]; | 3649 achievementId = _json["achievementId"]; |
| 3657 } | 3650 } |
| 3658 if (_json.containsKey("incrementPayload")) { | 3651 if (_json.containsKey("incrementPayload")) { |
| 3659 incrementPayload = new GamesAchievementIncrement.fromJson(_json["increment
Payload"]); | 3652 incrementPayload = |
| 3653 new GamesAchievementIncrement.fromJson(_json["incrementPayload"]); |
| 3660 } | 3654 } |
| 3661 if (_json.containsKey("kind")) { | 3655 if (_json.containsKey("kind")) { |
| 3662 kind = _json["kind"]; | 3656 kind = _json["kind"]; |
| 3663 } | 3657 } |
| 3664 if (_json.containsKey("setStepsAtLeastPayload")) { | 3658 if (_json.containsKey("setStepsAtLeastPayload")) { |
| 3665 setStepsAtLeastPayload = new GamesAchievementSetStepsAtLeast.fromJson(_jso
n["setStepsAtLeastPayload"]); | 3659 setStepsAtLeastPayload = new GamesAchievementSetStepsAtLeast.fromJson( |
| 3660 _json["setStepsAtLeastPayload"]); |
| 3666 } | 3661 } |
| 3667 if (_json.containsKey("updateType")) { | 3662 if (_json.containsKey("updateType")) { |
| 3668 updateType = _json["updateType"]; | 3663 updateType = _json["updateType"]; |
| 3669 } | 3664 } |
| 3670 } | 3665 } |
| 3671 | 3666 |
| 3672 core.Map<core.String, core.Object> toJson() { | 3667 core.Map<core.String, core.Object> toJson() { |
| 3673 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3668 final core.Map<core.String, core.Object> _json = |
| 3669 new core.Map<core.String, core.Object>(); |
| 3674 if (achievementId != null) { | 3670 if (achievementId != null) { |
| 3675 _json["achievementId"] = achievementId; | 3671 _json["achievementId"] = achievementId; |
| 3676 } | 3672 } |
| 3677 if (incrementPayload != null) { | 3673 if (incrementPayload != null) { |
| 3678 _json["incrementPayload"] = (incrementPayload).toJson(); | 3674 _json["incrementPayload"] = (incrementPayload).toJson(); |
| 3679 } | 3675 } |
| 3680 if (kind != null) { | 3676 if (kind != null) { |
| 3681 _json["kind"] = kind; | 3677 _json["kind"] = kind; |
| 3682 } | 3678 } |
| 3683 if (setStepsAtLeastPayload != null) { | 3679 if (setStepsAtLeastPayload != null) { |
| 3684 _json["setStepsAtLeastPayload"] = (setStepsAtLeastPayload).toJson(); | 3680 _json["setStepsAtLeastPayload"] = (setStepsAtLeastPayload).toJson(); |
| 3685 } | 3681 } |
| 3686 if (updateType != null) { | 3682 if (updateType != null) { |
| 3687 _json["updateType"] = updateType; | 3683 _json["updateType"] = updateType; |
| 3688 } | 3684 } |
| 3689 return _json; | 3685 return _json; |
| 3690 } | 3686 } |
| 3691 } | 3687 } |
| 3692 | 3688 |
| 3693 /** This is a JSON template for an achievement update response. */ | 3689 /// This is a JSON template for an achievement update response. |
| 3694 class AchievementUpdateResponse { | 3690 class AchievementUpdateResponse { |
| 3695 /** The achievement this update is was applied to. */ | 3691 /// The achievement this update is was applied to. |
| 3696 core.String achievementId; | 3692 core.String achievementId; |
| 3697 /** | 3693 |
| 3698 * The current state of the achievement. | 3694 /// The current state of the achievement. |
| 3699 * Possible values are: | 3695 /// Possible values are: |
| 3700 * - "HIDDEN" - Achievement is hidden. | 3696 /// - "HIDDEN" - Achievement is hidden. |
| 3701 * - "REVEALED" - Achievement is revealed. | 3697 /// - "REVEALED" - Achievement is revealed. |
| 3702 * - "UNLOCKED" - Achievement is unlocked. | 3698 /// - "UNLOCKED" - Achievement is unlocked. |
| 3703 */ | |
| 3704 core.String currentState; | 3699 core.String currentState; |
| 3705 /** The current steps recorded for this achievement if it is incremental. */ | 3700 |
| 3701 /// The current steps recorded for this achievement if it is incremental. |
| 3706 core.int currentSteps; | 3702 core.int currentSteps; |
| 3707 /** | 3703 |
| 3708 * Uniquely identifies the type of this resource. Value is always the fixed | 3704 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 3709 * string games#achievementUpdateResponse. | 3705 /// string games#achievementUpdateResponse. |
| 3710 */ | |
| 3711 core.String kind; | 3706 core.String kind; |
| 3712 /** | 3707 |
| 3713 * Whether this achievement was newly unlocked (that is, whether the unlock | 3708 /// Whether this achievement was newly unlocked (that is, whether the unlock |
| 3714 * request for the achievement was the first for the player). | 3709 /// request for the achievement was the first for the player). |
| 3715 */ | |
| 3716 core.bool newlyUnlocked; | 3710 core.bool newlyUnlocked; |
| 3717 /** Whether the requested updates actually affected the achievement. */ | 3711 |
| 3712 /// Whether the requested updates actually affected the achievement. |
| 3718 core.bool updateOccurred; | 3713 core.bool updateOccurred; |
| 3719 | 3714 |
| 3720 AchievementUpdateResponse(); | 3715 AchievementUpdateResponse(); |
| 3721 | 3716 |
| 3722 AchievementUpdateResponse.fromJson(core.Map _json) { | 3717 AchievementUpdateResponse.fromJson(core.Map _json) { |
| 3723 if (_json.containsKey("achievementId")) { | 3718 if (_json.containsKey("achievementId")) { |
| 3724 achievementId = _json["achievementId"]; | 3719 achievementId = _json["achievementId"]; |
| 3725 } | 3720 } |
| 3726 if (_json.containsKey("currentState")) { | 3721 if (_json.containsKey("currentState")) { |
| 3727 currentState = _json["currentState"]; | 3722 currentState = _json["currentState"]; |
| 3728 } | 3723 } |
| 3729 if (_json.containsKey("currentSteps")) { | 3724 if (_json.containsKey("currentSteps")) { |
| 3730 currentSteps = _json["currentSteps"]; | 3725 currentSteps = _json["currentSteps"]; |
| 3731 } | 3726 } |
| 3732 if (_json.containsKey("kind")) { | 3727 if (_json.containsKey("kind")) { |
| 3733 kind = _json["kind"]; | 3728 kind = _json["kind"]; |
| 3734 } | 3729 } |
| 3735 if (_json.containsKey("newlyUnlocked")) { | 3730 if (_json.containsKey("newlyUnlocked")) { |
| 3736 newlyUnlocked = _json["newlyUnlocked"]; | 3731 newlyUnlocked = _json["newlyUnlocked"]; |
| 3737 } | 3732 } |
| 3738 if (_json.containsKey("updateOccurred")) { | 3733 if (_json.containsKey("updateOccurred")) { |
| 3739 updateOccurred = _json["updateOccurred"]; | 3734 updateOccurred = _json["updateOccurred"]; |
| 3740 } | 3735 } |
| 3741 } | 3736 } |
| 3742 | 3737 |
| 3743 core.Map<core.String, core.Object> toJson() { | 3738 core.Map<core.String, core.Object> toJson() { |
| 3744 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3739 final core.Map<core.String, core.Object> _json = |
| 3740 new core.Map<core.String, core.Object>(); |
| 3745 if (achievementId != null) { | 3741 if (achievementId != null) { |
| 3746 _json["achievementId"] = achievementId; | 3742 _json["achievementId"] = achievementId; |
| 3747 } | 3743 } |
| 3748 if (currentState != null) { | 3744 if (currentState != null) { |
| 3749 _json["currentState"] = currentState; | 3745 _json["currentState"] = currentState; |
| 3750 } | 3746 } |
| 3751 if (currentSteps != null) { | 3747 if (currentSteps != null) { |
| 3752 _json["currentSteps"] = currentSteps; | 3748 _json["currentSteps"] = currentSteps; |
| 3753 } | 3749 } |
| 3754 if (kind != null) { | 3750 if (kind != null) { |
| 3755 _json["kind"] = kind; | 3751 _json["kind"] = kind; |
| 3756 } | 3752 } |
| 3757 if (newlyUnlocked != null) { | 3753 if (newlyUnlocked != null) { |
| 3758 _json["newlyUnlocked"] = newlyUnlocked; | 3754 _json["newlyUnlocked"] = newlyUnlocked; |
| 3759 } | 3755 } |
| 3760 if (updateOccurred != null) { | 3756 if (updateOccurred != null) { |
| 3761 _json["updateOccurred"] = updateOccurred; | 3757 _json["updateOccurred"] = updateOccurred; |
| 3762 } | 3758 } |
| 3763 return _json; | 3759 return _json; |
| 3764 } | 3760 } |
| 3765 } | 3761 } |
| 3766 | 3762 |
| 3767 /** This is a JSON template for aggregate stats. */ | 3763 /// This is a JSON template for aggregate stats. |
| 3768 class AggregateStats { | 3764 class AggregateStats { |
| 3769 /** The number of messages sent between a pair of peers. */ | 3765 /// The number of messages sent between a pair of peers. |
| 3770 core.String count; | 3766 core.String count; |
| 3771 /** | 3767 |
| 3772 * Uniquely identifies the type of this resource. Value is always the fixed | 3768 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 3773 * string games#aggregateStats. | 3769 /// string games#aggregateStats. |
| 3774 */ | |
| 3775 core.String kind; | 3770 core.String kind; |
| 3776 /** The maximum amount. */ | 3771 |
| 3772 /// The maximum amount. |
| 3777 core.String max; | 3773 core.String max; |
| 3778 /** The minimum amount. */ | 3774 |
| 3775 /// The minimum amount. |
| 3779 core.String min; | 3776 core.String min; |
| 3780 /** The total number of bytes sent for messages between a pair of peers. */ | 3777 |
| 3778 /// The total number of bytes sent for messages between a pair of peers. |
| 3781 core.String sum; | 3779 core.String sum; |
| 3782 | 3780 |
| 3783 AggregateStats(); | 3781 AggregateStats(); |
| 3784 | 3782 |
| 3785 AggregateStats.fromJson(core.Map _json) { | 3783 AggregateStats.fromJson(core.Map _json) { |
| 3786 if (_json.containsKey("count")) { | 3784 if (_json.containsKey("count")) { |
| 3787 count = _json["count"]; | 3785 count = _json["count"]; |
| 3788 } | 3786 } |
| 3789 if (_json.containsKey("kind")) { | 3787 if (_json.containsKey("kind")) { |
| 3790 kind = _json["kind"]; | 3788 kind = _json["kind"]; |
| 3791 } | 3789 } |
| 3792 if (_json.containsKey("max")) { | 3790 if (_json.containsKey("max")) { |
| 3793 max = _json["max"]; | 3791 max = _json["max"]; |
| 3794 } | 3792 } |
| 3795 if (_json.containsKey("min")) { | 3793 if (_json.containsKey("min")) { |
| 3796 min = _json["min"]; | 3794 min = _json["min"]; |
| 3797 } | 3795 } |
| 3798 if (_json.containsKey("sum")) { | 3796 if (_json.containsKey("sum")) { |
| 3799 sum = _json["sum"]; | 3797 sum = _json["sum"]; |
| 3800 } | 3798 } |
| 3801 } | 3799 } |
| 3802 | 3800 |
| 3803 core.Map<core.String, core.Object> toJson() { | 3801 core.Map<core.String, core.Object> toJson() { |
| 3804 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3802 final core.Map<core.String, core.Object> _json = |
| 3803 new core.Map<core.String, core.Object>(); |
| 3805 if (count != null) { | 3804 if (count != null) { |
| 3806 _json["count"] = count; | 3805 _json["count"] = count; |
| 3807 } | 3806 } |
| 3808 if (kind != null) { | 3807 if (kind != null) { |
| 3809 _json["kind"] = kind; | 3808 _json["kind"] = kind; |
| 3810 } | 3809 } |
| 3811 if (max != null) { | 3810 if (max != null) { |
| 3812 _json["max"] = max; | 3811 _json["max"] = max; |
| 3813 } | 3812 } |
| 3814 if (min != null) { | 3813 if (min != null) { |
| 3815 _json["min"] = min; | 3814 _json["min"] = min; |
| 3816 } | 3815 } |
| 3817 if (sum != null) { | 3816 if (sum != null) { |
| 3818 _json["sum"] = sum; | 3817 _json["sum"] = sum; |
| 3819 } | 3818 } |
| 3820 return _json; | 3819 return _json; |
| 3821 } | 3820 } |
| 3822 } | 3821 } |
| 3823 | 3822 |
| 3824 /** This is a JSON template for an anonymous player */ | 3823 /// This is a JSON template for an anonymous player |
| 3825 class AnonymousPlayer { | 3824 class AnonymousPlayer { |
| 3826 /** The base URL for the image to display for the anonymous player. */ | 3825 /// The base URL for the image to display for the anonymous player. |
| 3827 core.String avatarImageUrl; | 3826 core.String avatarImageUrl; |
| 3828 /** The name to display for the anonymous player. */ | 3827 |
| 3828 /// The name to display for the anonymous player. |
| 3829 core.String displayName; | 3829 core.String displayName; |
| 3830 /** | 3830 |
| 3831 * Uniquely identifies the type of this resource. Value is always the fixed | 3831 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 3832 * string games#anonymousPlayer. | 3832 /// string games#anonymousPlayer. |
| 3833 */ | |
| 3834 core.String kind; | 3833 core.String kind; |
| 3835 | 3834 |
| 3836 AnonymousPlayer(); | 3835 AnonymousPlayer(); |
| 3837 | 3836 |
| 3838 AnonymousPlayer.fromJson(core.Map _json) { | 3837 AnonymousPlayer.fromJson(core.Map _json) { |
| 3839 if (_json.containsKey("avatarImageUrl")) { | 3838 if (_json.containsKey("avatarImageUrl")) { |
| 3840 avatarImageUrl = _json["avatarImageUrl"]; | 3839 avatarImageUrl = _json["avatarImageUrl"]; |
| 3841 } | 3840 } |
| 3842 if (_json.containsKey("displayName")) { | 3841 if (_json.containsKey("displayName")) { |
| 3843 displayName = _json["displayName"]; | 3842 displayName = _json["displayName"]; |
| 3844 } | 3843 } |
| 3845 if (_json.containsKey("kind")) { | 3844 if (_json.containsKey("kind")) { |
| 3846 kind = _json["kind"]; | 3845 kind = _json["kind"]; |
| 3847 } | 3846 } |
| 3848 } | 3847 } |
| 3849 | 3848 |
| 3850 core.Map<core.String, core.Object> toJson() { | 3849 core.Map<core.String, core.Object> toJson() { |
| 3851 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3850 final core.Map<core.String, core.Object> _json = |
| 3851 new core.Map<core.String, core.Object>(); |
| 3852 if (avatarImageUrl != null) { | 3852 if (avatarImageUrl != null) { |
| 3853 _json["avatarImageUrl"] = avatarImageUrl; | 3853 _json["avatarImageUrl"] = avatarImageUrl; |
| 3854 } | 3854 } |
| 3855 if (displayName != null) { | 3855 if (displayName != null) { |
| 3856 _json["displayName"] = displayName; | 3856 _json["displayName"] = displayName; |
| 3857 } | 3857 } |
| 3858 if (kind != null) { | 3858 if (kind != null) { |
| 3859 _json["kind"] = kind; | 3859 _json["kind"] = kind; |
| 3860 } | 3860 } |
| 3861 return _json; | 3861 return _json; |
| 3862 } | 3862 } |
| 3863 } | 3863 } |
| 3864 | 3864 |
| 3865 /** This is a JSON template for the Application resource. */ | 3865 /// This is a JSON template for the Application resource. |
| 3866 class Application { | 3866 class Application { |
| 3867 /** | 3867 /// The number of achievements visible to the currently authenticated player. |
| 3868 * The number of achievements visible to the currently authenticated player. | |
| 3869 */ | |
| 3870 core.int achievementCount; | 3868 core.int achievementCount; |
| 3871 /** The assets of the application. */ | 3869 |
| 3870 /// The assets of the application. |
| 3872 core.List<ImageAsset> assets; | 3871 core.List<ImageAsset> assets; |
| 3873 /** The author of the application. */ | 3872 |
| 3873 /// The author of the application. |
| 3874 core.String author; | 3874 core.String author; |
| 3875 /** The category of the application. */ | 3875 |
| 3876 /// The category of the application. |
| 3876 ApplicationCategory category; | 3877 ApplicationCategory category; |
| 3877 /** The description of the application. */ | 3878 |
| 3879 /// The description of the application. |
| 3878 core.String description; | 3880 core.String description; |
| 3879 /** | 3881 |
| 3880 * A list of features that have been enabled for the application. | 3882 /// A list of features that have been enabled for the application. |
| 3881 * Possible values are: | 3883 /// Possible values are: |
| 3882 * - "SNAPSHOTS" - Snapshots has been enabled | 3884 /// - "SNAPSHOTS" - Snapshots has been enabled |
| 3883 */ | |
| 3884 core.List<core.String> enabledFeatures; | 3885 core.List<core.String> enabledFeatures; |
| 3885 /** The ID of the application. */ | 3886 |
| 3887 /// The ID of the application. |
| 3886 core.String id; | 3888 core.String id; |
| 3887 /** The instances of the application. */ | 3889 |
| 3890 /// The instances of the application. |
| 3888 core.List<Instance> instances; | 3891 core.List<Instance> instances; |
| 3889 /** | 3892 |
| 3890 * Uniquely identifies the type of this resource. Value is always the fixed | 3893 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 3891 * string games#application. | 3894 /// string games#application. |
| 3892 */ | |
| 3893 core.String kind; | 3895 core.String kind; |
| 3894 /** The last updated timestamp of the application. */ | 3896 |
| 3897 /// The last updated timestamp of the application. |
| 3895 core.String lastUpdatedTimestamp; | 3898 core.String lastUpdatedTimestamp; |
| 3896 /** | 3899 |
| 3897 * The number of leaderboards visible to the currently authenticated player. | 3900 /// The number of leaderboards visible to the currently authenticated player. |
| 3898 */ | |
| 3899 core.int leaderboardCount; | 3901 core.int leaderboardCount; |
| 3900 /** The name of the application. */ | 3902 |
| 3903 /// The name of the application. |
| 3901 core.String name; | 3904 core.String name; |
| 3902 /** | 3905 |
| 3903 * A hint to the client UI for what color to use as an app-themed color. The | 3906 /// A hint to the client UI for what color to use as an app-themed color. The |
| 3904 * color is given as an RGB triplet (e.g. "E0E0E0"). | 3907 /// color is given as an RGB triplet (e.g. "E0E0E0"). |
| 3905 */ | |
| 3906 core.String themeColor; | 3908 core.String themeColor; |
| 3907 | 3909 |
| 3908 Application(); | 3910 Application(); |
| 3909 | 3911 |
| 3910 Application.fromJson(core.Map _json) { | 3912 Application.fromJson(core.Map _json) { |
| 3911 if (_json.containsKey("achievement_count")) { | 3913 if (_json.containsKey("achievement_count")) { |
| 3912 achievementCount = _json["achievement_count"]; | 3914 achievementCount = _json["achievement_count"]; |
| 3913 } | 3915 } |
| 3914 if (_json.containsKey("assets")) { | 3916 if (_json.containsKey("assets")) { |
| 3915 assets = _json["assets"].map((value) => new ImageAsset.fromJson(value)).to
List(); | 3917 assets = _json["assets"] |
| 3918 .map((value) => new ImageAsset.fromJson(value)) |
| 3919 .toList(); |
| 3916 } | 3920 } |
| 3917 if (_json.containsKey("author")) { | 3921 if (_json.containsKey("author")) { |
| 3918 author = _json["author"]; | 3922 author = _json["author"]; |
| 3919 } | 3923 } |
| 3920 if (_json.containsKey("category")) { | 3924 if (_json.containsKey("category")) { |
| 3921 category = new ApplicationCategory.fromJson(_json["category"]); | 3925 category = new ApplicationCategory.fromJson(_json["category"]); |
| 3922 } | 3926 } |
| 3923 if (_json.containsKey("description")) { | 3927 if (_json.containsKey("description")) { |
| 3924 description = _json["description"]; | 3928 description = _json["description"]; |
| 3925 } | 3929 } |
| 3926 if (_json.containsKey("enabledFeatures")) { | 3930 if (_json.containsKey("enabledFeatures")) { |
| 3927 enabledFeatures = _json["enabledFeatures"]; | 3931 enabledFeatures = _json["enabledFeatures"]; |
| 3928 } | 3932 } |
| 3929 if (_json.containsKey("id")) { | 3933 if (_json.containsKey("id")) { |
| 3930 id = _json["id"]; | 3934 id = _json["id"]; |
| 3931 } | 3935 } |
| 3932 if (_json.containsKey("instances")) { | 3936 if (_json.containsKey("instances")) { |
| 3933 instances = _json["instances"].map((value) => new Instance.fromJson(value)
).toList(); | 3937 instances = _json["instances"] |
| 3938 .map((value) => new Instance.fromJson(value)) |
| 3939 .toList(); |
| 3934 } | 3940 } |
| 3935 if (_json.containsKey("kind")) { | 3941 if (_json.containsKey("kind")) { |
| 3936 kind = _json["kind"]; | 3942 kind = _json["kind"]; |
| 3937 } | 3943 } |
| 3938 if (_json.containsKey("lastUpdatedTimestamp")) { | 3944 if (_json.containsKey("lastUpdatedTimestamp")) { |
| 3939 lastUpdatedTimestamp = _json["lastUpdatedTimestamp"]; | 3945 lastUpdatedTimestamp = _json["lastUpdatedTimestamp"]; |
| 3940 } | 3946 } |
| 3941 if (_json.containsKey("leaderboard_count")) { | 3947 if (_json.containsKey("leaderboard_count")) { |
| 3942 leaderboardCount = _json["leaderboard_count"]; | 3948 leaderboardCount = _json["leaderboard_count"]; |
| 3943 } | 3949 } |
| 3944 if (_json.containsKey("name")) { | 3950 if (_json.containsKey("name")) { |
| 3945 name = _json["name"]; | 3951 name = _json["name"]; |
| 3946 } | 3952 } |
| 3947 if (_json.containsKey("themeColor")) { | 3953 if (_json.containsKey("themeColor")) { |
| 3948 themeColor = _json["themeColor"]; | 3954 themeColor = _json["themeColor"]; |
| 3949 } | 3955 } |
| 3950 } | 3956 } |
| 3951 | 3957 |
| 3952 core.Map<core.String, core.Object> toJson() { | 3958 core.Map<core.String, core.Object> toJson() { |
| 3953 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3959 final core.Map<core.String, core.Object> _json = |
| 3960 new core.Map<core.String, core.Object>(); |
| 3954 if (achievementCount != null) { | 3961 if (achievementCount != null) { |
| 3955 _json["achievement_count"] = achievementCount; | 3962 _json["achievement_count"] = achievementCount; |
| 3956 } | 3963 } |
| 3957 if (assets != null) { | 3964 if (assets != null) { |
| 3958 _json["assets"] = assets.map((value) => (value).toJson()).toList(); | 3965 _json["assets"] = assets.map((value) => (value).toJson()).toList(); |
| 3959 } | 3966 } |
| 3960 if (author != null) { | 3967 if (author != null) { |
| 3961 _json["author"] = author; | 3968 _json["author"] = author; |
| 3962 } | 3969 } |
| 3963 if (category != null) { | 3970 if (category != null) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3987 if (name != null) { | 3994 if (name != null) { |
| 3988 _json["name"] = name; | 3995 _json["name"] = name; |
| 3989 } | 3996 } |
| 3990 if (themeColor != null) { | 3997 if (themeColor != null) { |
| 3991 _json["themeColor"] = themeColor; | 3998 _json["themeColor"] = themeColor; |
| 3992 } | 3999 } |
| 3993 return _json; | 4000 return _json; |
| 3994 } | 4001 } |
| 3995 } | 4002 } |
| 3996 | 4003 |
| 3997 /** This is a JSON template for an application category object. */ | 4004 /// This is a JSON template for an application category object. |
| 3998 class ApplicationCategory { | 4005 class ApplicationCategory { |
| 3999 /** | 4006 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4000 * Uniquely identifies the type of this resource. Value is always the fixed | 4007 /// string games#applicationCategory. |
| 4001 * string games#applicationCategory. | |
| 4002 */ | |
| 4003 core.String kind; | 4008 core.String kind; |
| 4004 /** The primary category. */ | 4009 |
| 4010 /// The primary category. |
| 4005 core.String primary; | 4011 core.String primary; |
| 4006 /** The secondary category. */ | 4012 |
| 4013 /// The secondary category. |
| 4007 core.String secondary; | 4014 core.String secondary; |
| 4008 | 4015 |
| 4009 ApplicationCategory(); | 4016 ApplicationCategory(); |
| 4010 | 4017 |
| 4011 ApplicationCategory.fromJson(core.Map _json) { | 4018 ApplicationCategory.fromJson(core.Map _json) { |
| 4012 if (_json.containsKey("kind")) { | 4019 if (_json.containsKey("kind")) { |
| 4013 kind = _json["kind"]; | 4020 kind = _json["kind"]; |
| 4014 } | 4021 } |
| 4015 if (_json.containsKey("primary")) { | 4022 if (_json.containsKey("primary")) { |
| 4016 primary = _json["primary"]; | 4023 primary = _json["primary"]; |
| 4017 } | 4024 } |
| 4018 if (_json.containsKey("secondary")) { | 4025 if (_json.containsKey("secondary")) { |
| 4019 secondary = _json["secondary"]; | 4026 secondary = _json["secondary"]; |
| 4020 } | 4027 } |
| 4021 } | 4028 } |
| 4022 | 4029 |
| 4023 core.Map<core.String, core.Object> toJson() { | 4030 core.Map<core.String, core.Object> toJson() { |
| 4024 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4031 final core.Map<core.String, core.Object> _json = |
| 4032 new core.Map<core.String, core.Object>(); |
| 4025 if (kind != null) { | 4033 if (kind != null) { |
| 4026 _json["kind"] = kind; | 4034 _json["kind"] = kind; |
| 4027 } | 4035 } |
| 4028 if (primary != null) { | 4036 if (primary != null) { |
| 4029 _json["primary"] = primary; | 4037 _json["primary"] = primary; |
| 4030 } | 4038 } |
| 4031 if (secondary != null) { | 4039 if (secondary != null) { |
| 4032 _json["secondary"] = secondary; | 4040 _json["secondary"] = secondary; |
| 4033 } | 4041 } |
| 4034 return _json; | 4042 return _json; |
| 4035 } | 4043 } |
| 4036 } | 4044 } |
| 4037 | 4045 |
| 4038 /** | 4046 /// This is a JSON template for a third party application verification response |
| 4039 * This is a JSON template for a third party application verification response | 4047 /// resource. |
| 4040 * resource. | |
| 4041 */ | |
| 4042 class ApplicationVerifyResponse { | 4048 class ApplicationVerifyResponse { |
| 4043 /** | 4049 /// An alternate ID that was once used for the player that was issued the |
| 4044 * An alternate ID that was once used for the player that was issued the auth | 4050 /// auth token used in this request. (This field is not normally populated.) |
| 4045 * token used in this request. (This field is not normally populated.) | |
| 4046 */ | |
| 4047 core.String alternatePlayerId; | 4051 core.String alternatePlayerId; |
| 4048 /** | 4052 |
| 4049 * Uniquely identifies the type of this resource. Value is always the fixed | 4053 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4050 * string games#applicationVerifyResponse. | 4054 /// string games#applicationVerifyResponse. |
| 4051 */ | |
| 4052 core.String kind; | 4055 core.String kind; |
| 4053 /** | 4056 |
| 4054 * The ID of the player that was issued the auth token used in this request. | 4057 /// The ID of the player that was issued the auth token used in this request. |
| 4055 */ | |
| 4056 core.String playerId; | 4058 core.String playerId; |
| 4057 | 4059 |
| 4058 ApplicationVerifyResponse(); | 4060 ApplicationVerifyResponse(); |
| 4059 | 4061 |
| 4060 ApplicationVerifyResponse.fromJson(core.Map _json) { | 4062 ApplicationVerifyResponse.fromJson(core.Map _json) { |
| 4061 if (_json.containsKey("alternate_player_id")) { | 4063 if (_json.containsKey("alternate_player_id")) { |
| 4062 alternatePlayerId = _json["alternate_player_id"]; | 4064 alternatePlayerId = _json["alternate_player_id"]; |
| 4063 } | 4065 } |
| 4064 if (_json.containsKey("kind")) { | 4066 if (_json.containsKey("kind")) { |
| 4065 kind = _json["kind"]; | 4067 kind = _json["kind"]; |
| 4066 } | 4068 } |
| 4067 if (_json.containsKey("player_id")) { | 4069 if (_json.containsKey("player_id")) { |
| 4068 playerId = _json["player_id"]; | 4070 playerId = _json["player_id"]; |
| 4069 } | 4071 } |
| 4070 } | 4072 } |
| 4071 | 4073 |
| 4072 core.Map<core.String, core.Object> toJson() { | 4074 core.Map<core.String, core.Object> toJson() { |
| 4073 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4075 final core.Map<core.String, core.Object> _json = |
| 4076 new core.Map<core.String, core.Object>(); |
| 4074 if (alternatePlayerId != null) { | 4077 if (alternatePlayerId != null) { |
| 4075 _json["alternate_player_id"] = alternatePlayerId; | 4078 _json["alternate_player_id"] = alternatePlayerId; |
| 4076 } | 4079 } |
| 4077 if (kind != null) { | 4080 if (kind != null) { |
| 4078 _json["kind"] = kind; | 4081 _json["kind"] = kind; |
| 4079 } | 4082 } |
| 4080 if (playerId != null) { | 4083 if (playerId != null) { |
| 4081 _json["player_id"] = playerId; | 4084 _json["player_id"] = playerId; |
| 4082 } | 4085 } |
| 4083 return _json; | 4086 return _json; |
| 4084 } | 4087 } |
| 4085 } | 4088 } |
| 4086 | 4089 |
| 4087 /** This is a JSON template for data related to individual game categories. */ | 4090 /// This is a JSON template for data related to individual game categories. |
| 4088 class Category { | 4091 class Category { |
| 4089 /** The category name. */ | 4092 /// The category name. |
| 4090 core.String category; | 4093 core.String category; |
| 4091 /** Experience points earned in this category. */ | 4094 |
| 4095 /// Experience points earned in this category. |
| 4092 core.String experiencePoints; | 4096 core.String experiencePoints; |
| 4093 /** | 4097 |
| 4094 * Uniquely identifies the type of this resource. Value is always the fixed | 4098 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4095 * string games#category. | 4099 /// string games#category. |
| 4096 */ | |
| 4097 core.String kind; | 4100 core.String kind; |
| 4098 | 4101 |
| 4099 Category(); | 4102 Category(); |
| 4100 | 4103 |
| 4101 Category.fromJson(core.Map _json) { | 4104 Category.fromJson(core.Map _json) { |
| 4102 if (_json.containsKey("category")) { | 4105 if (_json.containsKey("category")) { |
| 4103 category = _json["category"]; | 4106 category = _json["category"]; |
| 4104 } | 4107 } |
| 4105 if (_json.containsKey("experiencePoints")) { | 4108 if (_json.containsKey("experiencePoints")) { |
| 4106 experiencePoints = _json["experiencePoints"]; | 4109 experiencePoints = _json["experiencePoints"]; |
| 4107 } | 4110 } |
| 4108 if (_json.containsKey("kind")) { | 4111 if (_json.containsKey("kind")) { |
| 4109 kind = _json["kind"]; | 4112 kind = _json["kind"]; |
| 4110 } | 4113 } |
| 4111 } | 4114 } |
| 4112 | 4115 |
| 4113 core.Map<core.String, core.Object> toJson() { | 4116 core.Map<core.String, core.Object> toJson() { |
| 4114 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4117 final core.Map<core.String, core.Object> _json = |
| 4118 new core.Map<core.String, core.Object>(); |
| 4115 if (category != null) { | 4119 if (category != null) { |
| 4116 _json["category"] = category; | 4120 _json["category"] = category; |
| 4117 } | 4121 } |
| 4118 if (experiencePoints != null) { | 4122 if (experiencePoints != null) { |
| 4119 _json["experiencePoints"] = experiencePoints; | 4123 _json["experiencePoints"] = experiencePoints; |
| 4120 } | 4124 } |
| 4121 if (kind != null) { | 4125 if (kind != null) { |
| 4122 _json["kind"] = kind; | 4126 _json["kind"] = kind; |
| 4123 } | 4127 } |
| 4124 return _json; | 4128 return _json; |
| 4125 } | 4129 } |
| 4126 } | 4130 } |
| 4127 | 4131 |
| 4128 /** This is a JSON template for a list of category data objects. */ | 4132 /// This is a JSON template for a list of category data objects. |
| 4129 class CategoryListResponse { | 4133 class CategoryListResponse { |
| 4130 /** The list of categories with usage data. */ | 4134 /// The list of categories with usage data. |
| 4131 core.List<Category> items; | 4135 core.List<Category> items; |
| 4132 /** | 4136 |
| 4133 * Uniquely identifies the type of this resource. Value is always the fixed | 4137 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4134 * string games#categoryListResponse. | 4138 /// string games#categoryListResponse. |
| 4135 */ | |
| 4136 core.String kind; | 4139 core.String kind; |
| 4137 /** Token corresponding to the next page of results. */ | 4140 |
| 4141 /// Token corresponding to the next page of results. |
| 4138 core.String nextPageToken; | 4142 core.String nextPageToken; |
| 4139 | 4143 |
| 4140 CategoryListResponse(); | 4144 CategoryListResponse(); |
| 4141 | 4145 |
| 4142 CategoryListResponse.fromJson(core.Map _json) { | 4146 CategoryListResponse.fromJson(core.Map _json) { |
| 4143 if (_json.containsKey("items")) { | 4147 if (_json.containsKey("items")) { |
| 4144 items = _json["items"].map((value) => new Category.fromJson(value)).toList
(); | 4148 items = |
| 4149 _json["items"].map((value) => new Category.fromJson(value)).toList(); |
| 4145 } | 4150 } |
| 4146 if (_json.containsKey("kind")) { | 4151 if (_json.containsKey("kind")) { |
| 4147 kind = _json["kind"]; | 4152 kind = _json["kind"]; |
| 4148 } | 4153 } |
| 4149 if (_json.containsKey("nextPageToken")) { | 4154 if (_json.containsKey("nextPageToken")) { |
| 4150 nextPageToken = _json["nextPageToken"]; | 4155 nextPageToken = _json["nextPageToken"]; |
| 4151 } | 4156 } |
| 4152 } | 4157 } |
| 4153 | 4158 |
| 4154 core.Map<core.String, core.Object> toJson() { | 4159 core.Map<core.String, core.Object> toJson() { |
| 4155 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4160 final core.Map<core.String, core.Object> _json = |
| 4161 new core.Map<core.String, core.Object>(); |
| 4156 if (items != null) { | 4162 if (items != null) { |
| 4157 _json["items"] = items.map((value) => (value).toJson()).toList(); | 4163 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 4158 } | 4164 } |
| 4159 if (kind != null) { | 4165 if (kind != null) { |
| 4160 _json["kind"] = kind; | 4166 _json["kind"] = kind; |
| 4161 } | 4167 } |
| 4162 if (nextPageToken != null) { | 4168 if (nextPageToken != null) { |
| 4163 _json["nextPageToken"] = nextPageToken; | 4169 _json["nextPageToken"] = nextPageToken; |
| 4164 } | 4170 } |
| 4165 return _json; | 4171 return _json; |
| 4166 } | 4172 } |
| 4167 } | 4173 } |
| 4168 | 4174 |
| 4169 /** This is a JSON template for a batch update failure resource. */ | 4175 /// This is a JSON template for a batch update failure resource. |
| 4170 class EventBatchRecordFailure { | 4176 class EventBatchRecordFailure { |
| 4171 /** | 4177 /// The cause for the update failure. |
| 4172 * The cause for the update failure. | 4178 /// Possible values are: |
| 4173 * Possible values are: | 4179 /// - "TOO_LARGE": A batch request was issued with more events than are |
| 4174 * - "TOO_LARGE": A batch request was issued with more events than are allowed | 4180 /// allowed in a single batch. |
| 4175 * in a single batch. | 4181 /// - "TIME_PERIOD_EXPIRED": A batch was sent with data too far in the past |
| 4176 * - "TIME_PERIOD_EXPIRED": A batch was sent with data too far in the past to | 4182 /// to record. |
| 4177 * record. | 4183 /// - "TIME_PERIOD_SHORT": A batch was sent with a time range that was too |
| 4178 * - "TIME_PERIOD_SHORT": A batch was sent with a time range that was too | 4184 /// short. |
| 4179 * short. | 4185 /// - "TIME_PERIOD_LONG": A batch was sent with a time range that was too |
| 4180 * - "TIME_PERIOD_LONG": A batch was sent with a time range that was too long. | 4186 /// long. |
| 4181 * - "ALREADY_UPDATED": An attempt was made to record a batch of data which | 4187 /// - "ALREADY_UPDATED": An attempt was made to record a batch of data which |
| 4182 * was already seen. | 4188 /// was already seen. |
| 4183 * - "RECORD_RATE_HIGH": An attempt was made to record data faster than the | 4189 /// - "RECORD_RATE_HIGH": An attempt was made to record data faster than the |
| 4184 * server will apply updates. | 4190 /// server will apply updates. |
| 4185 */ | |
| 4186 core.String failureCause; | 4191 core.String failureCause; |
| 4187 /** | 4192 |
| 4188 * Uniquely identifies the type of this resource. Value is always the fixed | 4193 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4189 * string games#eventBatchRecordFailure. | 4194 /// string games#eventBatchRecordFailure. |
| 4190 */ | |
| 4191 core.String kind; | 4195 core.String kind; |
| 4192 /** The time range which was rejected; empty for a request-wide failure. */ | 4196 |
| 4197 /// The time range which was rejected; empty for a request-wide failure. |
| 4193 EventPeriodRange range; | 4198 EventPeriodRange range; |
| 4194 | 4199 |
| 4195 EventBatchRecordFailure(); | 4200 EventBatchRecordFailure(); |
| 4196 | 4201 |
| 4197 EventBatchRecordFailure.fromJson(core.Map _json) { | 4202 EventBatchRecordFailure.fromJson(core.Map _json) { |
| 4198 if (_json.containsKey("failureCause")) { | 4203 if (_json.containsKey("failureCause")) { |
| 4199 failureCause = _json["failureCause"]; | 4204 failureCause = _json["failureCause"]; |
| 4200 } | 4205 } |
| 4201 if (_json.containsKey("kind")) { | 4206 if (_json.containsKey("kind")) { |
| 4202 kind = _json["kind"]; | 4207 kind = _json["kind"]; |
| 4203 } | 4208 } |
| 4204 if (_json.containsKey("range")) { | 4209 if (_json.containsKey("range")) { |
| 4205 range = new EventPeriodRange.fromJson(_json["range"]); | 4210 range = new EventPeriodRange.fromJson(_json["range"]); |
| 4206 } | 4211 } |
| 4207 } | 4212 } |
| 4208 | 4213 |
| 4209 core.Map<core.String, core.Object> toJson() { | 4214 core.Map<core.String, core.Object> toJson() { |
| 4210 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4215 final core.Map<core.String, core.Object> _json = |
| 4216 new core.Map<core.String, core.Object>(); |
| 4211 if (failureCause != null) { | 4217 if (failureCause != null) { |
| 4212 _json["failureCause"] = failureCause; | 4218 _json["failureCause"] = failureCause; |
| 4213 } | 4219 } |
| 4214 if (kind != null) { | 4220 if (kind != null) { |
| 4215 _json["kind"] = kind; | 4221 _json["kind"] = kind; |
| 4216 } | 4222 } |
| 4217 if (range != null) { | 4223 if (range != null) { |
| 4218 _json["range"] = (range).toJson(); | 4224 _json["range"] = (range).toJson(); |
| 4219 } | 4225 } |
| 4220 return _json; | 4226 return _json; |
| 4221 } | 4227 } |
| 4222 } | 4228 } |
| 4223 | 4229 |
| 4224 /** This is a JSON template for an event child relationship resource. */ | 4230 /// This is a JSON template for an event child relationship resource. |
| 4225 class EventChild { | 4231 class EventChild { |
| 4226 /** The ID of the child event. */ | 4232 /// The ID of the child event. |
| 4227 core.String childId; | 4233 core.String childId; |
| 4228 /** | 4234 |
| 4229 * Uniquely identifies the type of this resource. Value is always the fixed | 4235 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4230 * string games#eventChild. | 4236 /// string games#eventChild. |
| 4231 */ | |
| 4232 core.String kind; | 4237 core.String kind; |
| 4233 | 4238 |
| 4234 EventChild(); | 4239 EventChild(); |
| 4235 | 4240 |
| 4236 EventChild.fromJson(core.Map _json) { | 4241 EventChild.fromJson(core.Map _json) { |
| 4237 if (_json.containsKey("childId")) { | 4242 if (_json.containsKey("childId")) { |
| 4238 childId = _json["childId"]; | 4243 childId = _json["childId"]; |
| 4239 } | 4244 } |
| 4240 if (_json.containsKey("kind")) { | 4245 if (_json.containsKey("kind")) { |
| 4241 kind = _json["kind"]; | 4246 kind = _json["kind"]; |
| 4242 } | 4247 } |
| 4243 } | 4248 } |
| 4244 | 4249 |
| 4245 core.Map<core.String, core.Object> toJson() { | 4250 core.Map<core.String, core.Object> toJson() { |
| 4246 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4251 final core.Map<core.String, core.Object> _json = |
| 4252 new core.Map<core.String, core.Object>(); |
| 4247 if (childId != null) { | 4253 if (childId != null) { |
| 4248 _json["childId"] = childId; | 4254 _json["childId"] = childId; |
| 4249 } | 4255 } |
| 4250 if (kind != null) { | 4256 if (kind != null) { |
| 4251 _json["kind"] = kind; | 4257 _json["kind"] = kind; |
| 4252 } | 4258 } |
| 4253 return _json; | 4259 return _json; |
| 4254 } | 4260 } |
| 4255 } | 4261 } |
| 4256 | 4262 |
| 4257 /** This is a JSON template for an event definition resource. */ | 4263 /// This is a JSON template for an event definition resource. |
| 4258 class EventDefinition { | 4264 class EventDefinition { |
| 4259 /** A list of events that are a child of this event. */ | 4265 /// A list of events that are a child of this event. |
| 4260 core.List<EventChild> childEvents; | 4266 core.List<EventChild> childEvents; |
| 4261 /** Description of what this event represents. */ | 4267 |
| 4268 /// Description of what this event represents. |
| 4262 core.String description; | 4269 core.String description; |
| 4263 /** The name to display for the event. */ | 4270 |
| 4271 /// The name to display for the event. |
| 4264 core.String displayName; | 4272 core.String displayName; |
| 4265 /** The ID of the event. */ | 4273 |
| 4274 /// The ID of the event. |
| 4266 core.String id; | 4275 core.String id; |
| 4267 /** The base URL for the image that represents the event. */ | 4276 |
| 4277 /// The base URL for the image that represents the event. |
| 4268 core.String imageUrl; | 4278 core.String imageUrl; |
| 4269 /** | 4279 |
| 4270 * Indicates whether the icon image being returned is a default image, or is | 4280 /// Indicates whether the icon image being returned is a default image, or is |
| 4271 * game-provided. | 4281 /// game-provided. |
| 4272 */ | |
| 4273 core.bool isDefaultImageUrl; | 4282 core.bool isDefaultImageUrl; |
| 4274 /** | 4283 |
| 4275 * Uniquely identifies the type of this resource. Value is always the fixed | 4284 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4276 * string games#eventDefinition. | 4285 /// string games#eventDefinition. |
| 4277 */ | |
| 4278 core.String kind; | 4286 core.String kind; |
| 4279 /** | 4287 |
| 4280 * The visibility of event being tracked in this definition. | 4288 /// The visibility of event being tracked in this definition. |
| 4281 * Possible values are: | 4289 /// Possible values are: |
| 4282 * - "REVEALED": This event should be visible to all users. | 4290 /// - "REVEALED": This event should be visible to all users. |
| 4283 * - "HIDDEN": This event should only be shown to users that have recorded | 4291 /// - "HIDDEN": This event should only be shown to users that have recorded |
| 4284 * this event at least once. | 4292 /// this event at least once. |
| 4285 */ | |
| 4286 core.String visibility; | 4293 core.String visibility; |
| 4287 | 4294 |
| 4288 EventDefinition(); | 4295 EventDefinition(); |
| 4289 | 4296 |
| 4290 EventDefinition.fromJson(core.Map _json) { | 4297 EventDefinition.fromJson(core.Map _json) { |
| 4291 if (_json.containsKey("childEvents")) { | 4298 if (_json.containsKey("childEvents")) { |
| 4292 childEvents = _json["childEvents"].map((value) => new EventChild.fromJson(
value)).toList(); | 4299 childEvents = _json["childEvents"] |
| 4300 .map((value) => new EventChild.fromJson(value)) |
| 4301 .toList(); |
| 4293 } | 4302 } |
| 4294 if (_json.containsKey("description")) { | 4303 if (_json.containsKey("description")) { |
| 4295 description = _json["description"]; | 4304 description = _json["description"]; |
| 4296 } | 4305 } |
| 4297 if (_json.containsKey("displayName")) { | 4306 if (_json.containsKey("displayName")) { |
| 4298 displayName = _json["displayName"]; | 4307 displayName = _json["displayName"]; |
| 4299 } | 4308 } |
| 4300 if (_json.containsKey("id")) { | 4309 if (_json.containsKey("id")) { |
| 4301 id = _json["id"]; | 4310 id = _json["id"]; |
| 4302 } | 4311 } |
| 4303 if (_json.containsKey("imageUrl")) { | 4312 if (_json.containsKey("imageUrl")) { |
| 4304 imageUrl = _json["imageUrl"]; | 4313 imageUrl = _json["imageUrl"]; |
| 4305 } | 4314 } |
| 4306 if (_json.containsKey("isDefaultImageUrl")) { | 4315 if (_json.containsKey("isDefaultImageUrl")) { |
| 4307 isDefaultImageUrl = _json["isDefaultImageUrl"]; | 4316 isDefaultImageUrl = _json["isDefaultImageUrl"]; |
| 4308 } | 4317 } |
| 4309 if (_json.containsKey("kind")) { | 4318 if (_json.containsKey("kind")) { |
| 4310 kind = _json["kind"]; | 4319 kind = _json["kind"]; |
| 4311 } | 4320 } |
| 4312 if (_json.containsKey("visibility")) { | 4321 if (_json.containsKey("visibility")) { |
| 4313 visibility = _json["visibility"]; | 4322 visibility = _json["visibility"]; |
| 4314 } | 4323 } |
| 4315 } | 4324 } |
| 4316 | 4325 |
| 4317 core.Map<core.String, core.Object> toJson() { | 4326 core.Map<core.String, core.Object> toJson() { |
| 4318 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4327 final core.Map<core.String, core.Object> _json = |
| 4328 new core.Map<core.String, core.Object>(); |
| 4319 if (childEvents != null) { | 4329 if (childEvents != null) { |
| 4320 _json["childEvents"] = childEvents.map((value) => (value).toJson()).toList
(); | 4330 _json["childEvents"] = |
| 4331 childEvents.map((value) => (value).toJson()).toList(); |
| 4321 } | 4332 } |
| 4322 if (description != null) { | 4333 if (description != null) { |
| 4323 _json["description"] = description; | 4334 _json["description"] = description; |
| 4324 } | 4335 } |
| 4325 if (displayName != null) { | 4336 if (displayName != null) { |
| 4326 _json["displayName"] = displayName; | 4337 _json["displayName"] = displayName; |
| 4327 } | 4338 } |
| 4328 if (id != null) { | 4339 if (id != null) { |
| 4329 _json["id"] = id; | 4340 _json["id"] = id; |
| 4330 } | 4341 } |
| 4331 if (imageUrl != null) { | 4342 if (imageUrl != null) { |
| 4332 _json["imageUrl"] = imageUrl; | 4343 _json["imageUrl"] = imageUrl; |
| 4333 } | 4344 } |
| 4334 if (isDefaultImageUrl != null) { | 4345 if (isDefaultImageUrl != null) { |
| 4335 _json["isDefaultImageUrl"] = isDefaultImageUrl; | 4346 _json["isDefaultImageUrl"] = isDefaultImageUrl; |
| 4336 } | 4347 } |
| 4337 if (kind != null) { | 4348 if (kind != null) { |
| 4338 _json["kind"] = kind; | 4349 _json["kind"] = kind; |
| 4339 } | 4350 } |
| 4340 if (visibility != null) { | 4351 if (visibility != null) { |
| 4341 _json["visibility"] = visibility; | 4352 _json["visibility"] = visibility; |
| 4342 } | 4353 } |
| 4343 return _json; | 4354 return _json; |
| 4344 } | 4355 } |
| 4345 } | 4356 } |
| 4346 | 4357 |
| 4347 /** This is a JSON template for a ListDefinitions response. */ | 4358 /// This is a JSON template for a ListDefinitions response. |
| 4348 class EventDefinitionListResponse { | 4359 class EventDefinitionListResponse { |
| 4349 /** The event definitions. */ | 4360 /// The event definitions. |
| 4350 core.List<EventDefinition> items; | 4361 core.List<EventDefinition> items; |
| 4351 /** | 4362 |
| 4352 * Uniquely identifies the type of this resource. Value is always the fixed | 4363 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4353 * string games#eventDefinitionListResponse. | 4364 /// string games#eventDefinitionListResponse. |
| 4354 */ | |
| 4355 core.String kind; | 4365 core.String kind; |
| 4356 /** The pagination token for the next page of results. */ | 4366 |
| 4367 /// The pagination token for the next page of results. |
| 4357 core.String nextPageToken; | 4368 core.String nextPageToken; |
| 4358 | 4369 |
| 4359 EventDefinitionListResponse(); | 4370 EventDefinitionListResponse(); |
| 4360 | 4371 |
| 4361 EventDefinitionListResponse.fromJson(core.Map _json) { | 4372 EventDefinitionListResponse.fromJson(core.Map _json) { |
| 4362 if (_json.containsKey("items")) { | 4373 if (_json.containsKey("items")) { |
| 4363 items = _json["items"].map((value) => new EventDefinition.fromJson(value))
.toList(); | 4374 items = _json["items"] |
| 4375 .map((value) => new EventDefinition.fromJson(value)) |
| 4376 .toList(); |
| 4364 } | 4377 } |
| 4365 if (_json.containsKey("kind")) { | 4378 if (_json.containsKey("kind")) { |
| 4366 kind = _json["kind"]; | 4379 kind = _json["kind"]; |
| 4367 } | 4380 } |
| 4368 if (_json.containsKey("nextPageToken")) { | 4381 if (_json.containsKey("nextPageToken")) { |
| 4369 nextPageToken = _json["nextPageToken"]; | 4382 nextPageToken = _json["nextPageToken"]; |
| 4370 } | 4383 } |
| 4371 } | 4384 } |
| 4372 | 4385 |
| 4373 core.Map<core.String, core.Object> toJson() { | 4386 core.Map<core.String, core.Object> toJson() { |
| 4374 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4387 final core.Map<core.String, core.Object> _json = |
| 4388 new core.Map<core.String, core.Object>(); |
| 4375 if (items != null) { | 4389 if (items != null) { |
| 4376 _json["items"] = items.map((value) => (value).toJson()).toList(); | 4390 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 4377 } | 4391 } |
| 4378 if (kind != null) { | 4392 if (kind != null) { |
| 4379 _json["kind"] = kind; | 4393 _json["kind"] = kind; |
| 4380 } | 4394 } |
| 4381 if (nextPageToken != null) { | 4395 if (nextPageToken != null) { |
| 4382 _json["nextPageToken"] = nextPageToken; | 4396 _json["nextPageToken"] = nextPageToken; |
| 4383 } | 4397 } |
| 4384 return _json; | 4398 return _json; |
| 4385 } | 4399 } |
| 4386 } | 4400 } |
| 4387 | 4401 |
| 4388 /** This is a JSON template for an event period time range. */ | 4402 /// This is a JSON template for an event period time range. |
| 4389 class EventPeriodRange { | 4403 class EventPeriodRange { |
| 4390 /** | 4404 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4391 * Uniquely identifies the type of this resource. Value is always the fixed | 4405 /// string games#eventPeriodRange. |
| 4392 * string games#eventPeriodRange. | |
| 4393 */ | |
| 4394 core.String kind; | 4406 core.String kind; |
| 4395 /** | 4407 |
| 4396 * The time when this update period ends, in millis, since 1970 UTC (Unix | 4408 /// The time when this update period ends, in millis, since 1970 UTC (Unix |
| 4397 * Epoch). | 4409 /// Epoch). |
| 4398 */ | |
| 4399 core.String periodEndMillis; | 4410 core.String periodEndMillis; |
| 4400 /** | 4411 |
| 4401 * The time when this update period begins, in millis, since 1970 UTC (Unix | 4412 /// The time when this update period begins, in millis, since 1970 UTC (Unix |
| 4402 * Epoch). | 4413 /// Epoch). |
| 4403 */ | |
| 4404 core.String periodStartMillis; | 4414 core.String periodStartMillis; |
| 4405 | 4415 |
| 4406 EventPeriodRange(); | 4416 EventPeriodRange(); |
| 4407 | 4417 |
| 4408 EventPeriodRange.fromJson(core.Map _json) { | 4418 EventPeriodRange.fromJson(core.Map _json) { |
| 4409 if (_json.containsKey("kind")) { | 4419 if (_json.containsKey("kind")) { |
| 4410 kind = _json["kind"]; | 4420 kind = _json["kind"]; |
| 4411 } | 4421 } |
| 4412 if (_json.containsKey("periodEndMillis")) { | 4422 if (_json.containsKey("periodEndMillis")) { |
| 4413 periodEndMillis = _json["periodEndMillis"]; | 4423 periodEndMillis = _json["periodEndMillis"]; |
| 4414 } | 4424 } |
| 4415 if (_json.containsKey("periodStartMillis")) { | 4425 if (_json.containsKey("periodStartMillis")) { |
| 4416 periodStartMillis = _json["periodStartMillis"]; | 4426 periodStartMillis = _json["periodStartMillis"]; |
| 4417 } | 4427 } |
| 4418 } | 4428 } |
| 4419 | 4429 |
| 4420 core.Map<core.String, core.Object> toJson() { | 4430 core.Map<core.String, core.Object> toJson() { |
| 4421 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4431 final core.Map<core.String, core.Object> _json = |
| 4432 new core.Map<core.String, core.Object>(); |
| 4422 if (kind != null) { | 4433 if (kind != null) { |
| 4423 _json["kind"] = kind; | 4434 _json["kind"] = kind; |
| 4424 } | 4435 } |
| 4425 if (periodEndMillis != null) { | 4436 if (periodEndMillis != null) { |
| 4426 _json["periodEndMillis"] = periodEndMillis; | 4437 _json["periodEndMillis"] = periodEndMillis; |
| 4427 } | 4438 } |
| 4428 if (periodStartMillis != null) { | 4439 if (periodStartMillis != null) { |
| 4429 _json["periodStartMillis"] = periodStartMillis; | 4440 _json["periodStartMillis"] = periodStartMillis; |
| 4430 } | 4441 } |
| 4431 return _json; | 4442 return _json; |
| 4432 } | 4443 } |
| 4433 } | 4444 } |
| 4434 | 4445 |
| 4435 /** This is a JSON template for an event period update resource. */ | 4446 /// This is a JSON template for an event period update resource. |
| 4436 class EventPeriodUpdate { | 4447 class EventPeriodUpdate { |
| 4437 /** | 4448 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4438 * Uniquely identifies the type of this resource. Value is always the fixed | 4449 /// string games#eventPeriodUpdate. |
| 4439 * string games#eventPeriodUpdate. | |
| 4440 */ | |
| 4441 core.String kind; | 4450 core.String kind; |
| 4442 /** The time period being covered by this update. */ | 4451 |
| 4452 /// The time period being covered by this update. |
| 4443 EventPeriodRange timePeriod; | 4453 EventPeriodRange timePeriod; |
| 4444 /** The updates being made for this time period. */ | 4454 |
| 4455 /// The updates being made for this time period. |
| 4445 core.List<EventUpdateRequest> updates; | 4456 core.List<EventUpdateRequest> updates; |
| 4446 | 4457 |
| 4447 EventPeriodUpdate(); | 4458 EventPeriodUpdate(); |
| 4448 | 4459 |
| 4449 EventPeriodUpdate.fromJson(core.Map _json) { | 4460 EventPeriodUpdate.fromJson(core.Map _json) { |
| 4450 if (_json.containsKey("kind")) { | 4461 if (_json.containsKey("kind")) { |
| 4451 kind = _json["kind"]; | 4462 kind = _json["kind"]; |
| 4452 } | 4463 } |
| 4453 if (_json.containsKey("timePeriod")) { | 4464 if (_json.containsKey("timePeriod")) { |
| 4454 timePeriod = new EventPeriodRange.fromJson(_json["timePeriod"]); | 4465 timePeriod = new EventPeriodRange.fromJson(_json["timePeriod"]); |
| 4455 } | 4466 } |
| 4456 if (_json.containsKey("updates")) { | 4467 if (_json.containsKey("updates")) { |
| 4457 updates = _json["updates"].map((value) => new EventUpdateRequest.fromJson(
value)).toList(); | 4468 updates = _json["updates"] |
| 4469 .map((value) => new EventUpdateRequest.fromJson(value)) |
| 4470 .toList(); |
| 4458 } | 4471 } |
| 4459 } | 4472 } |
| 4460 | 4473 |
| 4461 core.Map<core.String, core.Object> toJson() { | 4474 core.Map<core.String, core.Object> toJson() { |
| 4462 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4475 final core.Map<core.String, core.Object> _json = |
| 4476 new core.Map<core.String, core.Object>(); |
| 4463 if (kind != null) { | 4477 if (kind != null) { |
| 4464 _json["kind"] = kind; | 4478 _json["kind"] = kind; |
| 4465 } | 4479 } |
| 4466 if (timePeriod != null) { | 4480 if (timePeriod != null) { |
| 4467 _json["timePeriod"] = (timePeriod).toJson(); | 4481 _json["timePeriod"] = (timePeriod).toJson(); |
| 4468 } | 4482 } |
| 4469 if (updates != null) { | 4483 if (updates != null) { |
| 4470 _json["updates"] = updates.map((value) => (value).toJson()).toList(); | 4484 _json["updates"] = updates.map((value) => (value).toJson()).toList(); |
| 4471 } | 4485 } |
| 4472 return _json; | 4486 return _json; |
| 4473 } | 4487 } |
| 4474 } | 4488 } |
| 4475 | 4489 |
| 4476 /** This is a JSON template for an event update failure resource. */ | 4490 /// This is a JSON template for an event update failure resource. |
| 4477 class EventRecordFailure { | 4491 class EventRecordFailure { |
| 4478 /** The ID of the event that was not updated. */ | 4492 /// The ID of the event that was not updated. |
| 4479 core.String eventId; | 4493 core.String eventId; |
| 4480 /** | 4494 |
| 4481 * The cause for the update failure. | 4495 /// The cause for the update failure. |
| 4482 * Possible values are: | 4496 /// Possible values are: |
| 4483 * - "NOT_FOUND" - An attempt was made to set an event that was not defined. | 4497 /// - "NOT_FOUND" - An attempt was made to set an event that was not defined. |
| 4484 * - "INVALID_UPDATE_VALUE" - An attempt was made to increment an event by a | 4498 /// - "INVALID_UPDATE_VALUE" - An attempt was made to increment an event by a |
| 4485 * non-positive value. | 4499 /// non-positive value. |
| 4486 */ | |
| 4487 core.String failureCause; | 4500 core.String failureCause; |
| 4488 /** | 4501 |
| 4489 * Uniquely identifies the type of this resource. Value is always the fixed | 4502 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4490 * string games#eventRecordFailure. | 4503 /// string games#eventRecordFailure. |
| 4491 */ | |
| 4492 core.String kind; | 4504 core.String kind; |
| 4493 | 4505 |
| 4494 EventRecordFailure(); | 4506 EventRecordFailure(); |
| 4495 | 4507 |
| 4496 EventRecordFailure.fromJson(core.Map _json) { | 4508 EventRecordFailure.fromJson(core.Map _json) { |
| 4497 if (_json.containsKey("eventId")) { | 4509 if (_json.containsKey("eventId")) { |
| 4498 eventId = _json["eventId"]; | 4510 eventId = _json["eventId"]; |
| 4499 } | 4511 } |
| 4500 if (_json.containsKey("failureCause")) { | 4512 if (_json.containsKey("failureCause")) { |
| 4501 failureCause = _json["failureCause"]; | 4513 failureCause = _json["failureCause"]; |
| 4502 } | 4514 } |
| 4503 if (_json.containsKey("kind")) { | 4515 if (_json.containsKey("kind")) { |
| 4504 kind = _json["kind"]; | 4516 kind = _json["kind"]; |
| 4505 } | 4517 } |
| 4506 } | 4518 } |
| 4507 | 4519 |
| 4508 core.Map<core.String, core.Object> toJson() { | 4520 core.Map<core.String, core.Object> toJson() { |
| 4509 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4521 final core.Map<core.String, core.Object> _json = |
| 4522 new core.Map<core.String, core.Object>(); |
| 4510 if (eventId != null) { | 4523 if (eventId != null) { |
| 4511 _json["eventId"] = eventId; | 4524 _json["eventId"] = eventId; |
| 4512 } | 4525 } |
| 4513 if (failureCause != null) { | 4526 if (failureCause != null) { |
| 4514 _json["failureCause"] = failureCause; | 4527 _json["failureCause"] = failureCause; |
| 4515 } | 4528 } |
| 4516 if (kind != null) { | 4529 if (kind != null) { |
| 4517 _json["kind"] = kind; | 4530 _json["kind"] = kind; |
| 4518 } | 4531 } |
| 4519 return _json; | 4532 return _json; |
| 4520 } | 4533 } |
| 4521 } | 4534 } |
| 4522 | 4535 |
| 4523 /** This is a JSON template for an event period update resource. */ | 4536 /// This is a JSON template for an event period update resource. |
| 4524 class EventRecordRequest { | 4537 class EventRecordRequest { |
| 4525 /** | 4538 /// The current time when this update was sent, in milliseconds, since 1970 |
| 4526 * The current time when this update was sent, in milliseconds, since 1970 UTC | 4539 /// UTC (Unix Epoch). |
| 4527 * (Unix Epoch). | |
| 4528 */ | |
| 4529 core.String currentTimeMillis; | 4540 core.String currentTimeMillis; |
| 4530 /** | 4541 |
| 4531 * Uniquely identifies the type of this resource. Value is always the fixed | 4542 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4532 * string games#eventRecordRequest. | 4543 /// string games#eventRecordRequest. |
| 4533 */ | |
| 4534 core.String kind; | 4544 core.String kind; |
| 4535 /** The request ID used to identify this attempt to record events. */ | 4545 |
| 4546 /// The request ID used to identify this attempt to record events. |
| 4536 core.String requestId; | 4547 core.String requestId; |
| 4537 /** A list of the time period updates being made in this request. */ | 4548 |
| 4549 /// A list of the time period updates being made in this request. |
| 4538 core.List<EventPeriodUpdate> timePeriods; | 4550 core.List<EventPeriodUpdate> timePeriods; |
| 4539 | 4551 |
| 4540 EventRecordRequest(); | 4552 EventRecordRequest(); |
| 4541 | 4553 |
| 4542 EventRecordRequest.fromJson(core.Map _json) { | 4554 EventRecordRequest.fromJson(core.Map _json) { |
| 4543 if (_json.containsKey("currentTimeMillis")) { | 4555 if (_json.containsKey("currentTimeMillis")) { |
| 4544 currentTimeMillis = _json["currentTimeMillis"]; | 4556 currentTimeMillis = _json["currentTimeMillis"]; |
| 4545 } | 4557 } |
| 4546 if (_json.containsKey("kind")) { | 4558 if (_json.containsKey("kind")) { |
| 4547 kind = _json["kind"]; | 4559 kind = _json["kind"]; |
| 4548 } | 4560 } |
| 4549 if (_json.containsKey("requestId")) { | 4561 if (_json.containsKey("requestId")) { |
| 4550 requestId = _json["requestId"]; | 4562 requestId = _json["requestId"]; |
| 4551 } | 4563 } |
| 4552 if (_json.containsKey("timePeriods")) { | 4564 if (_json.containsKey("timePeriods")) { |
| 4553 timePeriods = _json["timePeriods"].map((value) => new EventPeriodUpdate.fr
omJson(value)).toList(); | 4565 timePeriods = _json["timePeriods"] |
| 4566 .map((value) => new EventPeriodUpdate.fromJson(value)) |
| 4567 .toList(); |
| 4554 } | 4568 } |
| 4555 } | 4569 } |
| 4556 | 4570 |
| 4557 core.Map<core.String, core.Object> toJson() { | 4571 core.Map<core.String, core.Object> toJson() { |
| 4558 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4572 final core.Map<core.String, core.Object> _json = |
| 4573 new core.Map<core.String, core.Object>(); |
| 4559 if (currentTimeMillis != null) { | 4574 if (currentTimeMillis != null) { |
| 4560 _json["currentTimeMillis"] = currentTimeMillis; | 4575 _json["currentTimeMillis"] = currentTimeMillis; |
| 4561 } | 4576 } |
| 4562 if (kind != null) { | 4577 if (kind != null) { |
| 4563 _json["kind"] = kind; | 4578 _json["kind"] = kind; |
| 4564 } | 4579 } |
| 4565 if (requestId != null) { | 4580 if (requestId != null) { |
| 4566 _json["requestId"] = requestId; | 4581 _json["requestId"] = requestId; |
| 4567 } | 4582 } |
| 4568 if (timePeriods != null) { | 4583 if (timePeriods != null) { |
| 4569 _json["timePeriods"] = timePeriods.map((value) => (value).toJson()).toList
(); | 4584 _json["timePeriods"] = |
| 4585 timePeriods.map((value) => (value).toJson()).toList(); |
| 4570 } | 4586 } |
| 4571 return _json; | 4587 return _json; |
| 4572 } | 4588 } |
| 4573 } | 4589 } |
| 4574 | 4590 |
| 4575 /** This is a JSON template for an event period update resource. */ | 4591 /// This is a JSON template for an event period update resource. |
| 4576 class EventUpdateRequest { | 4592 class EventUpdateRequest { |
| 4577 /** The ID of the event being modified in this update. */ | 4593 /// The ID of the event being modified in this update. |
| 4578 core.String definitionId; | 4594 core.String definitionId; |
| 4579 /** | 4595 |
| 4580 * Uniquely identifies the type of this resource. Value is always the fixed | 4596 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4581 * string games#eventUpdateRequest. | 4597 /// string games#eventUpdateRequest. |
| 4582 */ | |
| 4583 core.String kind; | 4598 core.String kind; |
| 4584 /** The number of times this event occurred in this time period. */ | 4599 |
| 4600 /// The number of times this event occurred in this time period. |
| 4585 core.String updateCount; | 4601 core.String updateCount; |
| 4586 | 4602 |
| 4587 EventUpdateRequest(); | 4603 EventUpdateRequest(); |
| 4588 | 4604 |
| 4589 EventUpdateRequest.fromJson(core.Map _json) { | 4605 EventUpdateRequest.fromJson(core.Map _json) { |
| 4590 if (_json.containsKey("definitionId")) { | 4606 if (_json.containsKey("definitionId")) { |
| 4591 definitionId = _json["definitionId"]; | 4607 definitionId = _json["definitionId"]; |
| 4592 } | 4608 } |
| 4593 if (_json.containsKey("kind")) { | 4609 if (_json.containsKey("kind")) { |
| 4594 kind = _json["kind"]; | 4610 kind = _json["kind"]; |
| 4595 } | 4611 } |
| 4596 if (_json.containsKey("updateCount")) { | 4612 if (_json.containsKey("updateCount")) { |
| 4597 updateCount = _json["updateCount"]; | 4613 updateCount = _json["updateCount"]; |
| 4598 } | 4614 } |
| 4599 } | 4615 } |
| 4600 | 4616 |
| 4601 core.Map<core.String, core.Object> toJson() { | 4617 core.Map<core.String, core.Object> toJson() { |
| 4602 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4618 final core.Map<core.String, core.Object> _json = |
| 4619 new core.Map<core.String, core.Object>(); |
| 4603 if (definitionId != null) { | 4620 if (definitionId != null) { |
| 4604 _json["definitionId"] = definitionId; | 4621 _json["definitionId"] = definitionId; |
| 4605 } | 4622 } |
| 4606 if (kind != null) { | 4623 if (kind != null) { |
| 4607 _json["kind"] = kind; | 4624 _json["kind"] = kind; |
| 4608 } | 4625 } |
| 4609 if (updateCount != null) { | 4626 if (updateCount != null) { |
| 4610 _json["updateCount"] = updateCount; | 4627 _json["updateCount"] = updateCount; |
| 4611 } | 4628 } |
| 4612 return _json; | 4629 return _json; |
| 4613 } | 4630 } |
| 4614 } | 4631 } |
| 4615 | 4632 |
| 4616 /** This is a JSON template for an event period update resource. */ | 4633 /// This is a JSON template for an event period update resource. |
| 4617 class EventUpdateResponse { | 4634 class EventUpdateResponse { |
| 4618 /** Any batch-wide failures which occurred applying updates. */ | 4635 /// Any batch-wide failures which occurred applying updates. |
| 4619 core.List<EventBatchRecordFailure> batchFailures; | 4636 core.List<EventBatchRecordFailure> batchFailures; |
| 4620 /** Any failures updating a particular event. */ | 4637 |
| 4638 /// Any failures updating a particular event. |
| 4621 core.List<EventRecordFailure> eventFailures; | 4639 core.List<EventRecordFailure> eventFailures; |
| 4622 /** | 4640 |
| 4623 * Uniquely identifies the type of this resource. Value is always the fixed | 4641 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4624 * string games#eventUpdateResponse. | 4642 /// string games#eventUpdateResponse. |
| 4625 */ | |
| 4626 core.String kind; | 4643 core.String kind; |
| 4627 /** The current status of any updated events */ | 4644 |
| 4645 /// The current status of any updated events |
| 4628 core.List<PlayerEvent> playerEvents; | 4646 core.List<PlayerEvent> playerEvents; |
| 4629 | 4647 |
| 4630 EventUpdateResponse(); | 4648 EventUpdateResponse(); |
| 4631 | 4649 |
| 4632 EventUpdateResponse.fromJson(core.Map _json) { | 4650 EventUpdateResponse.fromJson(core.Map _json) { |
| 4633 if (_json.containsKey("batchFailures")) { | 4651 if (_json.containsKey("batchFailures")) { |
| 4634 batchFailures = _json["batchFailures"].map((value) => new EventBatchRecord
Failure.fromJson(value)).toList(); | 4652 batchFailures = _json["batchFailures"] |
| 4653 .map((value) => new EventBatchRecordFailure.fromJson(value)) |
| 4654 .toList(); |
| 4635 } | 4655 } |
| 4636 if (_json.containsKey("eventFailures")) { | 4656 if (_json.containsKey("eventFailures")) { |
| 4637 eventFailures = _json["eventFailures"].map((value) => new EventRecordFailu
re.fromJson(value)).toList(); | 4657 eventFailures = _json["eventFailures"] |
| 4658 .map((value) => new EventRecordFailure.fromJson(value)) |
| 4659 .toList(); |
| 4638 } | 4660 } |
| 4639 if (_json.containsKey("kind")) { | 4661 if (_json.containsKey("kind")) { |
| 4640 kind = _json["kind"]; | 4662 kind = _json["kind"]; |
| 4641 } | 4663 } |
| 4642 if (_json.containsKey("playerEvents")) { | 4664 if (_json.containsKey("playerEvents")) { |
| 4643 playerEvents = _json["playerEvents"].map((value) => new PlayerEvent.fromJs
on(value)).toList(); | 4665 playerEvents = _json["playerEvents"] |
| 4666 .map((value) => new PlayerEvent.fromJson(value)) |
| 4667 .toList(); |
| 4644 } | 4668 } |
| 4645 } | 4669 } |
| 4646 | 4670 |
| 4647 core.Map<core.String, core.Object> toJson() { | 4671 core.Map<core.String, core.Object> toJson() { |
| 4648 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4672 final core.Map<core.String, core.Object> _json = |
| 4673 new core.Map<core.String, core.Object>(); |
| 4649 if (batchFailures != null) { | 4674 if (batchFailures != null) { |
| 4650 _json["batchFailures"] = batchFailures.map((value) => (value).toJson()).to
List(); | 4675 _json["batchFailures"] = |
| 4676 batchFailures.map((value) => (value).toJson()).toList(); |
| 4651 } | 4677 } |
| 4652 if (eventFailures != null) { | 4678 if (eventFailures != null) { |
| 4653 _json["eventFailures"] = eventFailures.map((value) => (value).toJson()).to
List(); | 4679 _json["eventFailures"] = |
| 4680 eventFailures.map((value) => (value).toJson()).toList(); |
| 4654 } | 4681 } |
| 4655 if (kind != null) { | 4682 if (kind != null) { |
| 4656 _json["kind"] = kind; | 4683 _json["kind"] = kind; |
| 4657 } | 4684 } |
| 4658 if (playerEvents != null) { | 4685 if (playerEvents != null) { |
| 4659 _json["playerEvents"] = playerEvents.map((value) => (value).toJson()).toLi
st(); | 4686 _json["playerEvents"] = |
| 4687 playerEvents.map((value) => (value).toJson()).toList(); |
| 4660 } | 4688 } |
| 4661 return _json; | 4689 return _json; |
| 4662 } | 4690 } |
| 4663 } | 4691 } |
| 4664 | 4692 |
| 4665 /** | 4693 /// This is a JSON template for the payload to request to increment an |
| 4666 * This is a JSON template for the payload to request to increment an | 4694 /// achievement. |
| 4667 * achievement. | |
| 4668 */ | |
| 4669 class GamesAchievementIncrement { | 4695 class GamesAchievementIncrement { |
| 4670 /** | 4696 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4671 * Uniquely identifies the type of this resource. Value is always the fixed | 4697 /// string games#GamesAchievementIncrement. |
| 4672 * string games#GamesAchievementIncrement. | |
| 4673 */ | |
| 4674 core.String kind; | 4698 core.String kind; |
| 4675 /** The requestId associated with an increment to an achievement. */ | 4699 |
| 4700 /// The requestId associated with an increment to an achievement. |
| 4676 core.String requestId; | 4701 core.String requestId; |
| 4677 /** The number of steps to be incremented. */ | 4702 |
| 4703 /// The number of steps to be incremented. |
| 4678 core.int steps; | 4704 core.int steps; |
| 4679 | 4705 |
| 4680 GamesAchievementIncrement(); | 4706 GamesAchievementIncrement(); |
| 4681 | 4707 |
| 4682 GamesAchievementIncrement.fromJson(core.Map _json) { | 4708 GamesAchievementIncrement.fromJson(core.Map _json) { |
| 4683 if (_json.containsKey("kind")) { | 4709 if (_json.containsKey("kind")) { |
| 4684 kind = _json["kind"]; | 4710 kind = _json["kind"]; |
| 4685 } | 4711 } |
| 4686 if (_json.containsKey("requestId")) { | 4712 if (_json.containsKey("requestId")) { |
| 4687 requestId = _json["requestId"]; | 4713 requestId = _json["requestId"]; |
| 4688 } | 4714 } |
| 4689 if (_json.containsKey("steps")) { | 4715 if (_json.containsKey("steps")) { |
| 4690 steps = _json["steps"]; | 4716 steps = _json["steps"]; |
| 4691 } | 4717 } |
| 4692 } | 4718 } |
| 4693 | 4719 |
| 4694 core.Map<core.String, core.Object> toJson() { | 4720 core.Map<core.String, core.Object> toJson() { |
| 4695 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4721 final core.Map<core.String, core.Object> _json = |
| 4722 new core.Map<core.String, core.Object>(); |
| 4696 if (kind != null) { | 4723 if (kind != null) { |
| 4697 _json["kind"] = kind; | 4724 _json["kind"] = kind; |
| 4698 } | 4725 } |
| 4699 if (requestId != null) { | 4726 if (requestId != null) { |
| 4700 _json["requestId"] = requestId; | 4727 _json["requestId"] = requestId; |
| 4701 } | 4728 } |
| 4702 if (steps != null) { | 4729 if (steps != null) { |
| 4703 _json["steps"] = steps; | 4730 _json["steps"] = steps; |
| 4704 } | 4731 } |
| 4705 return _json; | 4732 return _json; |
| 4706 } | 4733 } |
| 4707 } | 4734 } |
| 4708 | 4735 |
| 4709 /** | 4736 /// This is a JSON template for the payload to request to increment an |
| 4710 * This is a JSON template for the payload to request to increment an | 4737 /// achievement. |
| 4711 * achievement. | |
| 4712 */ | |
| 4713 class GamesAchievementSetStepsAtLeast { | 4738 class GamesAchievementSetStepsAtLeast { |
| 4714 /** | 4739 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4715 * Uniquely identifies the type of this resource. Value is always the fixed | 4740 /// string games#GamesAchievementSetStepsAtLeast. |
| 4716 * string games#GamesAchievementSetStepsAtLeast. | |
| 4717 */ | |
| 4718 core.String kind; | 4741 core.String kind; |
| 4719 /** The minimum number of steps for the achievement to be set to. */ | 4742 |
| 4743 /// The minimum number of steps for the achievement to be set to. |
| 4720 core.int steps; | 4744 core.int steps; |
| 4721 | 4745 |
| 4722 GamesAchievementSetStepsAtLeast(); | 4746 GamesAchievementSetStepsAtLeast(); |
| 4723 | 4747 |
| 4724 GamesAchievementSetStepsAtLeast.fromJson(core.Map _json) { | 4748 GamesAchievementSetStepsAtLeast.fromJson(core.Map _json) { |
| 4725 if (_json.containsKey("kind")) { | 4749 if (_json.containsKey("kind")) { |
| 4726 kind = _json["kind"]; | 4750 kind = _json["kind"]; |
| 4727 } | 4751 } |
| 4728 if (_json.containsKey("steps")) { | 4752 if (_json.containsKey("steps")) { |
| 4729 steps = _json["steps"]; | 4753 steps = _json["steps"]; |
| 4730 } | 4754 } |
| 4731 } | 4755 } |
| 4732 | 4756 |
| 4733 core.Map<core.String, core.Object> toJson() { | 4757 core.Map<core.String, core.Object> toJson() { |
| 4734 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4758 final core.Map<core.String, core.Object> _json = |
| 4759 new core.Map<core.String, core.Object>(); |
| 4735 if (kind != null) { | 4760 if (kind != null) { |
| 4736 _json["kind"] = kind; | 4761 _json["kind"] = kind; |
| 4737 } | 4762 } |
| 4738 if (steps != null) { | 4763 if (steps != null) { |
| 4739 _json["steps"] = steps; | 4764 _json["steps"] = steps; |
| 4740 } | 4765 } |
| 4741 return _json; | 4766 return _json; |
| 4742 } | 4767 } |
| 4743 } | 4768 } |
| 4744 | 4769 |
| 4745 /** This is a JSON template for an image asset object. */ | 4770 /// This is a JSON template for an image asset object. |
| 4746 class ImageAsset { | 4771 class ImageAsset { |
| 4747 /** The height of the asset. */ | 4772 /// The height of the asset. |
| 4748 core.int height; | 4773 core.int height; |
| 4749 /** | 4774 |
| 4750 * Uniquely identifies the type of this resource. Value is always the fixed | 4775 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4751 * string games#imageAsset. | 4776 /// string games#imageAsset. |
| 4752 */ | |
| 4753 core.String kind; | 4777 core.String kind; |
| 4754 /** The name of the asset. */ | 4778 |
| 4779 /// The name of the asset. |
| 4755 core.String name; | 4780 core.String name; |
| 4756 /** The URL of the asset. */ | 4781 |
| 4782 /// The URL of the asset. |
| 4757 core.String url; | 4783 core.String url; |
| 4758 /** The width of the asset. */ | 4784 |
| 4785 /// The width of the asset. |
| 4759 core.int width; | 4786 core.int width; |
| 4760 | 4787 |
| 4761 ImageAsset(); | 4788 ImageAsset(); |
| 4762 | 4789 |
| 4763 ImageAsset.fromJson(core.Map _json) { | 4790 ImageAsset.fromJson(core.Map _json) { |
| 4764 if (_json.containsKey("height")) { | 4791 if (_json.containsKey("height")) { |
| 4765 height = _json["height"]; | 4792 height = _json["height"]; |
| 4766 } | 4793 } |
| 4767 if (_json.containsKey("kind")) { | 4794 if (_json.containsKey("kind")) { |
| 4768 kind = _json["kind"]; | 4795 kind = _json["kind"]; |
| 4769 } | 4796 } |
| 4770 if (_json.containsKey("name")) { | 4797 if (_json.containsKey("name")) { |
| 4771 name = _json["name"]; | 4798 name = _json["name"]; |
| 4772 } | 4799 } |
| 4773 if (_json.containsKey("url")) { | 4800 if (_json.containsKey("url")) { |
| 4774 url = _json["url"]; | 4801 url = _json["url"]; |
| 4775 } | 4802 } |
| 4776 if (_json.containsKey("width")) { | 4803 if (_json.containsKey("width")) { |
| 4777 width = _json["width"]; | 4804 width = _json["width"]; |
| 4778 } | 4805 } |
| 4779 } | 4806 } |
| 4780 | 4807 |
| 4781 core.Map<core.String, core.Object> toJson() { | 4808 core.Map<core.String, core.Object> toJson() { |
| 4782 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4809 final core.Map<core.String, core.Object> _json = |
| 4810 new core.Map<core.String, core.Object>(); |
| 4783 if (height != null) { | 4811 if (height != null) { |
| 4784 _json["height"] = height; | 4812 _json["height"] = height; |
| 4785 } | 4813 } |
| 4786 if (kind != null) { | 4814 if (kind != null) { |
| 4787 _json["kind"] = kind; | 4815 _json["kind"] = kind; |
| 4788 } | 4816 } |
| 4789 if (name != null) { | 4817 if (name != null) { |
| 4790 _json["name"] = name; | 4818 _json["name"] = name; |
| 4791 } | 4819 } |
| 4792 if (url != null) { | 4820 if (url != null) { |
| 4793 _json["url"] = url; | 4821 _json["url"] = url; |
| 4794 } | 4822 } |
| 4795 if (width != null) { | 4823 if (width != null) { |
| 4796 _json["width"] = width; | 4824 _json["width"] = width; |
| 4797 } | 4825 } |
| 4798 return _json; | 4826 return _json; |
| 4799 } | 4827 } |
| 4800 } | 4828 } |
| 4801 | 4829 |
| 4802 /** This is a JSON template for the Instance resource. */ | 4830 /// This is a JSON template for the Instance resource. |
| 4803 class Instance { | 4831 class Instance { |
| 4804 /** URI which shows where a user can acquire this instance. */ | 4832 /// URI which shows where a user can acquire this instance. |
| 4805 core.String acquisitionUri; | 4833 core.String acquisitionUri; |
| 4806 /** Platform dependent details for Android. */ | 4834 |
| 4835 /// Platform dependent details for Android. |
| 4807 InstanceAndroidDetails androidInstance; | 4836 InstanceAndroidDetails androidInstance; |
| 4808 /** Platform dependent details for iOS. */ | 4837 |
| 4838 /// Platform dependent details for iOS. |
| 4809 InstanceIosDetails iosInstance; | 4839 InstanceIosDetails iosInstance; |
| 4810 /** | 4840 |
| 4811 * Uniquely identifies the type of this resource. Value is always the fixed | 4841 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4812 * string games#instance. | 4842 /// string games#instance. |
| 4813 */ | |
| 4814 core.String kind; | 4843 core.String kind; |
| 4815 /** Localized display name. */ | 4844 |
| 4845 /// Localized display name. |
| 4816 core.String name; | 4846 core.String name; |
| 4817 /** | 4847 |
| 4818 * The platform type. | 4848 /// The platform type. |
| 4819 * Possible values are: | 4849 /// Possible values are: |
| 4820 * - "ANDROID" - Instance is for Android. | 4850 /// - "ANDROID" - Instance is for Android. |
| 4821 * - "IOS" - Instance is for iOS | 4851 /// - "IOS" - Instance is for iOS |
| 4822 * - "WEB_APP" - Instance is for Web App. | 4852 /// - "WEB_APP" - Instance is for Web App. |
| 4823 */ | |
| 4824 core.String platformType; | 4853 core.String platformType; |
| 4825 /** Flag to show if this game instance supports realtime play. */ | 4854 |
| 4855 /// Flag to show if this game instance supports realtime play. |
| 4826 core.bool realtimePlay; | 4856 core.bool realtimePlay; |
| 4827 /** Flag to show if this game instance supports turn based play. */ | 4857 |
| 4858 /// Flag to show if this game instance supports turn based play. |
| 4828 core.bool turnBasedPlay; | 4859 core.bool turnBasedPlay; |
| 4829 /** Platform dependent details for Web. */ | 4860 |
| 4861 /// Platform dependent details for Web. |
| 4830 InstanceWebDetails webInstance; | 4862 InstanceWebDetails webInstance; |
| 4831 | 4863 |
| 4832 Instance(); | 4864 Instance(); |
| 4833 | 4865 |
| 4834 Instance.fromJson(core.Map _json) { | 4866 Instance.fromJson(core.Map _json) { |
| 4835 if (_json.containsKey("acquisitionUri")) { | 4867 if (_json.containsKey("acquisitionUri")) { |
| 4836 acquisitionUri = _json["acquisitionUri"]; | 4868 acquisitionUri = _json["acquisitionUri"]; |
| 4837 } | 4869 } |
| 4838 if (_json.containsKey("androidInstance")) { | 4870 if (_json.containsKey("androidInstance")) { |
| 4839 androidInstance = new InstanceAndroidDetails.fromJson(_json["androidInstan
ce"]); | 4871 androidInstance = |
| 4872 new InstanceAndroidDetails.fromJson(_json["androidInstance"]); |
| 4840 } | 4873 } |
| 4841 if (_json.containsKey("iosInstance")) { | 4874 if (_json.containsKey("iosInstance")) { |
| 4842 iosInstance = new InstanceIosDetails.fromJson(_json["iosInstance"]); | 4875 iosInstance = new InstanceIosDetails.fromJson(_json["iosInstance"]); |
| 4843 } | 4876 } |
| 4844 if (_json.containsKey("kind")) { | 4877 if (_json.containsKey("kind")) { |
| 4845 kind = _json["kind"]; | 4878 kind = _json["kind"]; |
| 4846 } | 4879 } |
| 4847 if (_json.containsKey("name")) { | 4880 if (_json.containsKey("name")) { |
| 4848 name = _json["name"]; | 4881 name = _json["name"]; |
| 4849 } | 4882 } |
| 4850 if (_json.containsKey("platformType")) { | 4883 if (_json.containsKey("platformType")) { |
| 4851 platformType = _json["platformType"]; | 4884 platformType = _json["platformType"]; |
| 4852 } | 4885 } |
| 4853 if (_json.containsKey("realtimePlay")) { | 4886 if (_json.containsKey("realtimePlay")) { |
| 4854 realtimePlay = _json["realtimePlay"]; | 4887 realtimePlay = _json["realtimePlay"]; |
| 4855 } | 4888 } |
| 4856 if (_json.containsKey("turnBasedPlay")) { | 4889 if (_json.containsKey("turnBasedPlay")) { |
| 4857 turnBasedPlay = _json["turnBasedPlay"]; | 4890 turnBasedPlay = _json["turnBasedPlay"]; |
| 4858 } | 4891 } |
| 4859 if (_json.containsKey("webInstance")) { | 4892 if (_json.containsKey("webInstance")) { |
| 4860 webInstance = new InstanceWebDetails.fromJson(_json["webInstance"]); | 4893 webInstance = new InstanceWebDetails.fromJson(_json["webInstance"]); |
| 4861 } | 4894 } |
| 4862 } | 4895 } |
| 4863 | 4896 |
| 4864 core.Map<core.String, core.Object> toJson() { | 4897 core.Map<core.String, core.Object> toJson() { |
| 4865 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4898 final core.Map<core.String, core.Object> _json = |
| 4899 new core.Map<core.String, core.Object>(); |
| 4866 if (acquisitionUri != null) { | 4900 if (acquisitionUri != null) { |
| 4867 _json["acquisitionUri"] = acquisitionUri; | 4901 _json["acquisitionUri"] = acquisitionUri; |
| 4868 } | 4902 } |
| 4869 if (androidInstance != null) { | 4903 if (androidInstance != null) { |
| 4870 _json["androidInstance"] = (androidInstance).toJson(); | 4904 _json["androidInstance"] = (androidInstance).toJson(); |
| 4871 } | 4905 } |
| 4872 if (iosInstance != null) { | 4906 if (iosInstance != null) { |
| 4873 _json["iosInstance"] = (iosInstance).toJson(); | 4907 _json["iosInstance"] = (iosInstance).toJson(); |
| 4874 } | 4908 } |
| 4875 if (kind != null) { | 4909 if (kind != null) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 4887 if (turnBasedPlay != null) { | 4921 if (turnBasedPlay != null) { |
| 4888 _json["turnBasedPlay"] = turnBasedPlay; | 4922 _json["turnBasedPlay"] = turnBasedPlay; |
| 4889 } | 4923 } |
| 4890 if (webInstance != null) { | 4924 if (webInstance != null) { |
| 4891 _json["webInstance"] = (webInstance).toJson(); | 4925 _json["webInstance"] = (webInstance).toJson(); |
| 4892 } | 4926 } |
| 4893 return _json; | 4927 return _json; |
| 4894 } | 4928 } |
| 4895 } | 4929 } |
| 4896 | 4930 |
| 4897 /** This is a JSON template for the Android instance details resource. */ | 4931 /// This is a JSON template for the Android instance details resource. |
| 4898 class InstanceAndroidDetails { | 4932 class InstanceAndroidDetails { |
| 4899 /** Flag indicating whether the anti-piracy check is enabled. */ | 4933 /// Flag indicating whether the anti-piracy check is enabled. |
| 4900 core.bool enablePiracyCheck; | 4934 core.bool enablePiracyCheck; |
| 4901 /** | 4935 |
| 4902 * Uniquely identifies the type of this resource. Value is always the fixed | 4936 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4903 * string games#instanceAndroidDetails. | 4937 /// string games#instanceAndroidDetails. |
| 4904 */ | |
| 4905 core.String kind; | 4938 core.String kind; |
| 4906 /** Android package name which maps to Google Play URL. */ | 4939 |
| 4940 /// Android package name which maps to Google Play URL. |
| 4907 core.String packageName; | 4941 core.String packageName; |
| 4908 /** Indicates that this instance is the default for new installations. */ | 4942 |
| 4943 /// Indicates that this instance is the default for new installations. |
| 4909 core.bool preferred; | 4944 core.bool preferred; |
| 4910 | 4945 |
| 4911 InstanceAndroidDetails(); | 4946 InstanceAndroidDetails(); |
| 4912 | 4947 |
| 4913 InstanceAndroidDetails.fromJson(core.Map _json) { | 4948 InstanceAndroidDetails.fromJson(core.Map _json) { |
| 4914 if (_json.containsKey("enablePiracyCheck")) { | 4949 if (_json.containsKey("enablePiracyCheck")) { |
| 4915 enablePiracyCheck = _json["enablePiracyCheck"]; | 4950 enablePiracyCheck = _json["enablePiracyCheck"]; |
| 4916 } | 4951 } |
| 4917 if (_json.containsKey("kind")) { | 4952 if (_json.containsKey("kind")) { |
| 4918 kind = _json["kind"]; | 4953 kind = _json["kind"]; |
| 4919 } | 4954 } |
| 4920 if (_json.containsKey("packageName")) { | 4955 if (_json.containsKey("packageName")) { |
| 4921 packageName = _json["packageName"]; | 4956 packageName = _json["packageName"]; |
| 4922 } | 4957 } |
| 4923 if (_json.containsKey("preferred")) { | 4958 if (_json.containsKey("preferred")) { |
| 4924 preferred = _json["preferred"]; | 4959 preferred = _json["preferred"]; |
| 4925 } | 4960 } |
| 4926 } | 4961 } |
| 4927 | 4962 |
| 4928 core.Map<core.String, core.Object> toJson() { | 4963 core.Map<core.String, core.Object> toJson() { |
| 4929 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4964 final core.Map<core.String, core.Object> _json = |
| 4965 new core.Map<core.String, core.Object>(); |
| 4930 if (enablePiracyCheck != null) { | 4966 if (enablePiracyCheck != null) { |
| 4931 _json["enablePiracyCheck"] = enablePiracyCheck; | 4967 _json["enablePiracyCheck"] = enablePiracyCheck; |
| 4932 } | 4968 } |
| 4933 if (kind != null) { | 4969 if (kind != null) { |
| 4934 _json["kind"] = kind; | 4970 _json["kind"] = kind; |
| 4935 } | 4971 } |
| 4936 if (packageName != null) { | 4972 if (packageName != null) { |
| 4937 _json["packageName"] = packageName; | 4973 _json["packageName"] = packageName; |
| 4938 } | 4974 } |
| 4939 if (preferred != null) { | 4975 if (preferred != null) { |
| 4940 _json["preferred"] = preferred; | 4976 _json["preferred"] = preferred; |
| 4941 } | 4977 } |
| 4942 return _json; | 4978 return _json; |
| 4943 } | 4979 } |
| 4944 } | 4980 } |
| 4945 | 4981 |
| 4946 /** This is a JSON template for the iOS details resource. */ | 4982 /// This is a JSON template for the iOS details resource. |
| 4947 class InstanceIosDetails { | 4983 class InstanceIosDetails { |
| 4948 /** Bundle identifier. */ | 4984 /// Bundle identifier. |
| 4949 core.String bundleIdentifier; | 4985 core.String bundleIdentifier; |
| 4950 /** iTunes App ID. */ | 4986 |
| 4987 /// iTunes App ID. |
| 4951 core.String itunesAppId; | 4988 core.String itunesAppId; |
| 4952 /** | 4989 |
| 4953 * Uniquely identifies the type of this resource. Value is always the fixed | 4990 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 4954 * string games#instanceIosDetails. | 4991 /// string games#instanceIosDetails. |
| 4955 */ | |
| 4956 core.String kind; | 4992 core.String kind; |
| 4957 /** | 4993 |
| 4958 * Indicates that this instance is the default for new installations on iPad | 4994 /// Indicates that this instance is the default for new installations on iPad |
| 4959 * devices. | 4995 /// devices. |
| 4960 */ | |
| 4961 core.bool preferredForIpad; | 4996 core.bool preferredForIpad; |
| 4962 /** | 4997 |
| 4963 * Indicates that this instance is the default for new installations on iPhone | 4998 /// Indicates that this instance is the default for new installations on |
| 4964 * devices. | 4999 /// iPhone devices. |
| 4965 */ | |
| 4966 core.bool preferredForIphone; | 5000 core.bool preferredForIphone; |
| 4967 /** Flag to indicate if this instance supports iPad. */ | 5001 |
| 5002 /// Flag to indicate if this instance supports iPad. |
| 4968 core.bool supportIpad; | 5003 core.bool supportIpad; |
| 4969 /** Flag to indicate if this instance supports iPhone. */ | 5004 |
| 5005 /// Flag to indicate if this instance supports iPhone. |
| 4970 core.bool supportIphone; | 5006 core.bool supportIphone; |
| 4971 | 5007 |
| 4972 InstanceIosDetails(); | 5008 InstanceIosDetails(); |
| 4973 | 5009 |
| 4974 InstanceIosDetails.fromJson(core.Map _json) { | 5010 InstanceIosDetails.fromJson(core.Map _json) { |
| 4975 if (_json.containsKey("bundleIdentifier")) { | 5011 if (_json.containsKey("bundleIdentifier")) { |
| 4976 bundleIdentifier = _json["bundleIdentifier"]; | 5012 bundleIdentifier = _json["bundleIdentifier"]; |
| 4977 } | 5013 } |
| 4978 if (_json.containsKey("itunesAppId")) { | 5014 if (_json.containsKey("itunesAppId")) { |
| 4979 itunesAppId = _json["itunesAppId"]; | 5015 itunesAppId = _json["itunesAppId"]; |
| 4980 } | 5016 } |
| 4981 if (_json.containsKey("kind")) { | 5017 if (_json.containsKey("kind")) { |
| 4982 kind = _json["kind"]; | 5018 kind = _json["kind"]; |
| 4983 } | 5019 } |
| 4984 if (_json.containsKey("preferredForIpad")) { | 5020 if (_json.containsKey("preferredForIpad")) { |
| 4985 preferredForIpad = _json["preferredForIpad"]; | 5021 preferredForIpad = _json["preferredForIpad"]; |
| 4986 } | 5022 } |
| 4987 if (_json.containsKey("preferredForIphone")) { | 5023 if (_json.containsKey("preferredForIphone")) { |
| 4988 preferredForIphone = _json["preferredForIphone"]; | 5024 preferredForIphone = _json["preferredForIphone"]; |
| 4989 } | 5025 } |
| 4990 if (_json.containsKey("supportIpad")) { | 5026 if (_json.containsKey("supportIpad")) { |
| 4991 supportIpad = _json["supportIpad"]; | 5027 supportIpad = _json["supportIpad"]; |
| 4992 } | 5028 } |
| 4993 if (_json.containsKey("supportIphone")) { | 5029 if (_json.containsKey("supportIphone")) { |
| 4994 supportIphone = _json["supportIphone"]; | 5030 supportIphone = _json["supportIphone"]; |
| 4995 } | 5031 } |
| 4996 } | 5032 } |
| 4997 | 5033 |
| 4998 core.Map<core.String, core.Object> toJson() { | 5034 core.Map<core.String, core.Object> toJson() { |
| 4999 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5035 final core.Map<core.String, core.Object> _json = |
| 5036 new core.Map<core.String, core.Object>(); |
| 5000 if (bundleIdentifier != null) { | 5037 if (bundleIdentifier != null) { |
| 5001 _json["bundleIdentifier"] = bundleIdentifier; | 5038 _json["bundleIdentifier"] = bundleIdentifier; |
| 5002 } | 5039 } |
| 5003 if (itunesAppId != null) { | 5040 if (itunesAppId != null) { |
| 5004 _json["itunesAppId"] = itunesAppId; | 5041 _json["itunesAppId"] = itunesAppId; |
| 5005 } | 5042 } |
| 5006 if (kind != null) { | 5043 if (kind != null) { |
| 5007 _json["kind"] = kind; | 5044 _json["kind"] = kind; |
| 5008 } | 5045 } |
| 5009 if (preferredForIpad != null) { | 5046 if (preferredForIpad != null) { |
| 5010 _json["preferredForIpad"] = preferredForIpad; | 5047 _json["preferredForIpad"] = preferredForIpad; |
| 5011 } | 5048 } |
| 5012 if (preferredForIphone != null) { | 5049 if (preferredForIphone != null) { |
| 5013 _json["preferredForIphone"] = preferredForIphone; | 5050 _json["preferredForIphone"] = preferredForIphone; |
| 5014 } | 5051 } |
| 5015 if (supportIpad != null) { | 5052 if (supportIpad != null) { |
| 5016 _json["supportIpad"] = supportIpad; | 5053 _json["supportIpad"] = supportIpad; |
| 5017 } | 5054 } |
| 5018 if (supportIphone != null) { | 5055 if (supportIphone != null) { |
| 5019 _json["supportIphone"] = supportIphone; | 5056 _json["supportIphone"] = supportIphone; |
| 5020 } | 5057 } |
| 5021 return _json; | 5058 return _json; |
| 5022 } | 5059 } |
| 5023 } | 5060 } |
| 5024 | 5061 |
| 5025 /** This is a JSON template for the Web details resource. */ | 5062 /// This is a JSON template for the Web details resource. |
| 5026 class InstanceWebDetails { | 5063 class InstanceWebDetails { |
| 5027 /** | 5064 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 5028 * Uniquely identifies the type of this resource. Value is always the fixed | 5065 /// string games#instanceWebDetails. |
| 5029 * string games#instanceWebDetails. | |
| 5030 */ | |
| 5031 core.String kind; | 5066 core.String kind; |
| 5032 /** Launch URL for the game. */ | 5067 |
| 5068 /// Launch URL for the game. |
| 5033 core.String launchUrl; | 5069 core.String launchUrl; |
| 5034 /** Indicates that this instance is the default for new installations. */ | 5070 |
| 5071 /// Indicates that this instance is the default for new installations. |
| 5035 core.bool preferred; | 5072 core.bool preferred; |
| 5036 | 5073 |
| 5037 InstanceWebDetails(); | 5074 InstanceWebDetails(); |
| 5038 | 5075 |
| 5039 InstanceWebDetails.fromJson(core.Map _json) { | 5076 InstanceWebDetails.fromJson(core.Map _json) { |
| 5040 if (_json.containsKey("kind")) { | 5077 if (_json.containsKey("kind")) { |
| 5041 kind = _json["kind"]; | 5078 kind = _json["kind"]; |
| 5042 } | 5079 } |
| 5043 if (_json.containsKey("launchUrl")) { | 5080 if (_json.containsKey("launchUrl")) { |
| 5044 launchUrl = _json["launchUrl"]; | 5081 launchUrl = _json["launchUrl"]; |
| 5045 } | 5082 } |
| 5046 if (_json.containsKey("preferred")) { | 5083 if (_json.containsKey("preferred")) { |
| 5047 preferred = _json["preferred"]; | 5084 preferred = _json["preferred"]; |
| 5048 } | 5085 } |
| 5049 } | 5086 } |
| 5050 | 5087 |
| 5051 core.Map<core.String, core.Object> toJson() { | 5088 core.Map<core.String, core.Object> toJson() { |
| 5052 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5089 final core.Map<core.String, core.Object> _json = |
| 5090 new core.Map<core.String, core.Object>(); |
| 5053 if (kind != null) { | 5091 if (kind != null) { |
| 5054 _json["kind"] = kind; | 5092 _json["kind"] = kind; |
| 5055 } | 5093 } |
| 5056 if (launchUrl != null) { | 5094 if (launchUrl != null) { |
| 5057 _json["launchUrl"] = launchUrl; | 5095 _json["launchUrl"] = launchUrl; |
| 5058 } | 5096 } |
| 5059 if (preferred != null) { | 5097 if (preferred != null) { |
| 5060 _json["preferred"] = preferred; | 5098 _json["preferred"] = preferred; |
| 5061 } | 5099 } |
| 5062 return _json; | 5100 return _json; |
| 5063 } | 5101 } |
| 5064 } | 5102 } |
| 5065 | 5103 |
| 5066 /** This is a JSON template for the Leaderboard resource. */ | 5104 /// This is a JSON template for the Leaderboard resource. |
| 5067 class Leaderboard { | 5105 class Leaderboard { |
| 5068 /** The icon for the leaderboard. */ | 5106 /// The icon for the leaderboard. |
| 5069 core.String iconUrl; | 5107 core.String iconUrl; |
| 5070 /** The leaderboard ID. */ | 5108 |
| 5109 /// The leaderboard ID. |
| 5071 core.String id; | 5110 core.String id; |
| 5072 /** | 5111 |
| 5073 * Indicates whether the icon image being returned is a default image, or is | 5112 /// Indicates whether the icon image being returned is a default image, or is |
| 5074 * game-provided. | 5113 /// game-provided. |
| 5075 */ | |
| 5076 core.bool isIconUrlDefault; | 5114 core.bool isIconUrlDefault; |
| 5077 /** | 5115 |
| 5078 * Uniquely identifies the type of this resource. Value is always the fixed | 5116 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 5079 * string games#leaderboard. | 5117 /// string games#leaderboard. |
| 5080 */ | |
| 5081 core.String kind; | 5118 core.String kind; |
| 5082 /** The name of the leaderboard. */ | 5119 |
| 5120 /// The name of the leaderboard. |
| 5083 core.String name; | 5121 core.String name; |
| 5084 /** | 5122 |
| 5085 * How scores are ordered. | 5123 /// How scores are ordered. |
| 5086 * Possible values are: | 5124 /// Possible values are: |
| 5087 * - "LARGER_IS_BETTER" - Larger values are better; scores are sorted in | 5125 /// - "LARGER_IS_BETTER" - Larger values are better; scores are sorted in |
| 5088 * descending order. | 5126 /// descending order. |
| 5089 * - "SMALLER_IS_BETTER" - Smaller values are better; scores are sorted in | 5127 /// - "SMALLER_IS_BETTER" - Smaller values are better; scores are sorted in |
| 5090 * ascending order. | 5128 /// ascending order. |
| 5091 */ | |
| 5092 core.String order; | 5129 core.String order; |
| 5093 | 5130 |
| 5094 Leaderboard(); | 5131 Leaderboard(); |
| 5095 | 5132 |
| 5096 Leaderboard.fromJson(core.Map _json) { | 5133 Leaderboard.fromJson(core.Map _json) { |
| 5097 if (_json.containsKey("iconUrl")) { | 5134 if (_json.containsKey("iconUrl")) { |
| 5098 iconUrl = _json["iconUrl"]; | 5135 iconUrl = _json["iconUrl"]; |
| 5099 } | 5136 } |
| 5100 if (_json.containsKey("id")) { | 5137 if (_json.containsKey("id")) { |
| 5101 id = _json["id"]; | 5138 id = _json["id"]; |
| 5102 } | 5139 } |
| 5103 if (_json.containsKey("isIconUrlDefault")) { | 5140 if (_json.containsKey("isIconUrlDefault")) { |
| 5104 isIconUrlDefault = _json["isIconUrlDefault"]; | 5141 isIconUrlDefault = _json["isIconUrlDefault"]; |
| 5105 } | 5142 } |
| 5106 if (_json.containsKey("kind")) { | 5143 if (_json.containsKey("kind")) { |
| 5107 kind = _json["kind"]; | 5144 kind = _json["kind"]; |
| 5108 } | 5145 } |
| 5109 if (_json.containsKey("name")) { | 5146 if (_json.containsKey("name")) { |
| 5110 name = _json["name"]; | 5147 name = _json["name"]; |
| 5111 } | 5148 } |
| 5112 if (_json.containsKey("order")) { | 5149 if (_json.containsKey("order")) { |
| 5113 order = _json["order"]; | 5150 order = _json["order"]; |
| 5114 } | 5151 } |
| 5115 } | 5152 } |
| 5116 | 5153 |
| 5117 core.Map<core.String, core.Object> toJson() { | 5154 core.Map<core.String, core.Object> toJson() { |
| 5118 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5155 final core.Map<core.String, core.Object> _json = |
| 5156 new core.Map<core.String, core.Object>(); |
| 5119 if (iconUrl != null) { | 5157 if (iconUrl != null) { |
| 5120 _json["iconUrl"] = iconUrl; | 5158 _json["iconUrl"] = iconUrl; |
| 5121 } | 5159 } |
| 5122 if (id != null) { | 5160 if (id != null) { |
| 5123 _json["id"] = id; | 5161 _json["id"] = id; |
| 5124 } | 5162 } |
| 5125 if (isIconUrlDefault != null) { | 5163 if (isIconUrlDefault != null) { |
| 5126 _json["isIconUrlDefault"] = isIconUrlDefault; | 5164 _json["isIconUrlDefault"] = isIconUrlDefault; |
| 5127 } | 5165 } |
| 5128 if (kind != null) { | 5166 if (kind != null) { |
| 5129 _json["kind"] = kind; | 5167 _json["kind"] = kind; |
| 5130 } | 5168 } |
| 5131 if (name != null) { | 5169 if (name != null) { |
| 5132 _json["name"] = name; | 5170 _json["name"] = name; |
| 5133 } | 5171 } |
| 5134 if (order != null) { | 5172 if (order != null) { |
| 5135 _json["order"] = order; | 5173 _json["order"] = order; |
| 5136 } | 5174 } |
| 5137 return _json; | 5175 return _json; |
| 5138 } | 5176 } |
| 5139 } | 5177 } |
| 5140 | 5178 |
| 5141 /** This is a JSON template for the Leaderboard Entry resource. */ | 5179 /// This is a JSON template for the Leaderboard Entry resource. |
| 5142 class LeaderboardEntry { | 5180 class LeaderboardEntry { |
| 5143 /** The localized string for the numerical value of this score. */ | 5181 /// The localized string for the numerical value of this score. |
| 5144 core.String formattedScore; | 5182 core.String formattedScore; |
| 5145 /** The localized string for the rank of this score for this leaderboard. */ | 5183 |
| 5184 /// The localized string for the rank of this score for this leaderboard. |
| 5146 core.String formattedScoreRank; | 5185 core.String formattedScoreRank; |
| 5147 /** | 5186 |
| 5148 * Uniquely identifies the type of this resource. Value is always the fixed | 5187 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 5149 * string games#leaderboardEntry. | 5188 /// string games#leaderboardEntry. |
| 5150 */ | |
| 5151 core.String kind; | 5189 core.String kind; |
| 5152 /** The player who holds this score. */ | 5190 |
| 5191 /// The player who holds this score. |
| 5153 Player player; | 5192 Player player; |
| 5154 /** The rank of this score for this leaderboard. */ | 5193 |
| 5194 /// The rank of this score for this leaderboard. |
| 5155 core.String scoreRank; | 5195 core.String scoreRank; |
| 5156 /** | 5196 |
| 5157 * Additional information about the score. Values must contain no more than 64 | 5197 /// Additional information about the score. Values must contain no more than |
| 5158 * URI-safe characters as defined by section 2.3 of RFC 3986. | 5198 /// 64 URI-safe characters as defined by section 2.3 of RFC 3986. |
| 5159 */ | |
| 5160 core.String scoreTag; | 5199 core.String scoreTag; |
| 5161 /** The numerical value of this score. */ | 5200 |
| 5201 /// The numerical value of this score. |
| 5162 core.String scoreValue; | 5202 core.String scoreValue; |
| 5163 /** | 5203 |
| 5164 * The time span of this high score. | 5204 /// The time span of this high score. |
| 5165 * Possible values are: | 5205 /// Possible values are: |
| 5166 * - "ALL_TIME" - The score is an all-time high score. | 5206 /// - "ALL_TIME" - The score is an all-time high score. |
| 5167 * - "WEEKLY" - The score is a weekly high score. | 5207 /// - "WEEKLY" - The score is a weekly high score. |
| 5168 * - "DAILY" - The score is a daily high score. | 5208 /// - "DAILY" - The score is a daily high score. |
| 5169 */ | |
| 5170 core.String timeSpan; | 5209 core.String timeSpan; |
| 5171 /** | 5210 |
| 5172 * The timestamp at which this score was recorded, in milliseconds since the | 5211 /// The timestamp at which this score was recorded, in milliseconds since the |
| 5173 * epoch in UTC. | 5212 /// epoch in UTC. |
| 5174 */ | |
| 5175 core.String writeTimestampMillis; | 5213 core.String writeTimestampMillis; |
| 5176 | 5214 |
| 5177 LeaderboardEntry(); | 5215 LeaderboardEntry(); |
| 5178 | 5216 |
| 5179 LeaderboardEntry.fromJson(core.Map _json) { | 5217 LeaderboardEntry.fromJson(core.Map _json) { |
| 5180 if (_json.containsKey("formattedScore")) { | 5218 if (_json.containsKey("formattedScore")) { |
| 5181 formattedScore = _json["formattedScore"]; | 5219 formattedScore = _json["formattedScore"]; |
| 5182 } | 5220 } |
| 5183 if (_json.containsKey("formattedScoreRank")) { | 5221 if (_json.containsKey("formattedScoreRank")) { |
| 5184 formattedScoreRank = _json["formattedScoreRank"]; | 5222 formattedScoreRank = _json["formattedScoreRank"]; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 5200 } | 5238 } |
| 5201 if (_json.containsKey("timeSpan")) { | 5239 if (_json.containsKey("timeSpan")) { |
| 5202 timeSpan = _json["timeSpan"]; | 5240 timeSpan = _json["timeSpan"]; |
| 5203 } | 5241 } |
| 5204 if (_json.containsKey("writeTimestampMillis")) { | 5242 if (_json.containsKey("writeTimestampMillis")) { |
| 5205 writeTimestampMillis = _json["writeTimestampMillis"]; | 5243 writeTimestampMillis = _json["writeTimestampMillis"]; |
| 5206 } | 5244 } |
| 5207 } | 5245 } |
| 5208 | 5246 |
| 5209 core.Map<core.String, core.Object> toJson() { | 5247 core.Map<core.String, core.Object> toJson() { |
| 5210 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5248 final core.Map<core.String, core.Object> _json = |
| 5249 new core.Map<core.String, core.Object>(); |
| 5211 if (formattedScore != null) { | 5250 if (formattedScore != null) { |
| 5212 _json["formattedScore"] = formattedScore; | 5251 _json["formattedScore"] = formattedScore; |
| 5213 } | 5252 } |
| 5214 if (formattedScoreRank != null) { | 5253 if (formattedScoreRank != null) { |
| 5215 _json["formattedScoreRank"] = formattedScoreRank; | 5254 _json["formattedScoreRank"] = formattedScoreRank; |
| 5216 } | 5255 } |
| 5217 if (kind != null) { | 5256 if (kind != null) { |
| 5218 _json["kind"] = kind; | 5257 _json["kind"] = kind; |
| 5219 } | 5258 } |
| 5220 if (player != null) { | 5259 if (player != null) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 5232 if (timeSpan != null) { | 5271 if (timeSpan != null) { |
| 5233 _json["timeSpan"] = timeSpan; | 5272 _json["timeSpan"] = timeSpan; |
| 5234 } | 5273 } |
| 5235 if (writeTimestampMillis != null) { | 5274 if (writeTimestampMillis != null) { |
| 5236 _json["writeTimestampMillis"] = writeTimestampMillis; | 5275 _json["writeTimestampMillis"] = writeTimestampMillis; |
| 5237 } | 5276 } |
| 5238 return _json; | 5277 return _json; |
| 5239 } | 5278 } |
| 5240 } | 5279 } |
| 5241 | 5280 |
| 5242 /** This is a JSON template for a list of leaderboard objects. */ | 5281 /// This is a JSON template for a list of leaderboard objects. |
| 5243 class LeaderboardListResponse { | 5282 class LeaderboardListResponse { |
| 5244 /** The leaderboards. */ | 5283 /// The leaderboards. |
| 5245 core.List<Leaderboard> items; | 5284 core.List<Leaderboard> items; |
| 5246 /** | 5285 |
| 5247 * Uniquely identifies the type of this resource. Value is always the fixed | 5286 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 5248 * string games#leaderboardListResponse. | 5287 /// string games#leaderboardListResponse. |
| 5249 */ | |
| 5250 core.String kind; | 5288 core.String kind; |
| 5251 /** Token corresponding to the next page of results. */ | 5289 |
| 5290 /// Token corresponding to the next page of results. |
| 5252 core.String nextPageToken; | 5291 core.String nextPageToken; |
| 5253 | 5292 |
| 5254 LeaderboardListResponse(); | 5293 LeaderboardListResponse(); |
| 5255 | 5294 |
| 5256 LeaderboardListResponse.fromJson(core.Map _json) { | 5295 LeaderboardListResponse.fromJson(core.Map _json) { |
| 5257 if (_json.containsKey("items")) { | 5296 if (_json.containsKey("items")) { |
| 5258 items = _json["items"].map((value) => new Leaderboard.fromJson(value)).toL
ist(); | 5297 items = _json["items"] |
| 5298 .map((value) => new Leaderboard.fromJson(value)) |
| 5299 .toList(); |
| 5259 } | 5300 } |
| 5260 if (_json.containsKey("kind")) { | 5301 if (_json.containsKey("kind")) { |
| 5261 kind = _json["kind"]; | 5302 kind = _json["kind"]; |
| 5262 } | 5303 } |
| 5263 if (_json.containsKey("nextPageToken")) { | 5304 if (_json.containsKey("nextPageToken")) { |
| 5264 nextPageToken = _json["nextPageToken"]; | 5305 nextPageToken = _json["nextPageToken"]; |
| 5265 } | 5306 } |
| 5266 } | 5307 } |
| 5267 | 5308 |
| 5268 core.Map<core.String, core.Object> toJson() { | 5309 core.Map<core.String, core.Object> toJson() { |
| 5269 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5310 final core.Map<core.String, core.Object> _json = |
| 5311 new core.Map<core.String, core.Object>(); |
| 5270 if (items != null) { | 5312 if (items != null) { |
| 5271 _json["items"] = items.map((value) => (value).toJson()).toList(); | 5313 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 5272 } | 5314 } |
| 5273 if (kind != null) { | 5315 if (kind != null) { |
| 5274 _json["kind"] = kind; | 5316 _json["kind"] = kind; |
| 5275 } | 5317 } |
| 5276 if (nextPageToken != null) { | 5318 if (nextPageToken != null) { |
| 5277 _json["nextPageToken"] = nextPageToken; | 5319 _json["nextPageToken"] = nextPageToken; |
| 5278 } | 5320 } |
| 5279 return _json; | 5321 return _json; |
| 5280 } | 5322 } |
| 5281 } | 5323 } |
| 5282 | 5324 |
| 5283 /** This is a JSON template for a score rank in a leaderboard. */ | 5325 /// This is a JSON template for a score rank in a leaderboard. |
| 5284 class LeaderboardScoreRank { | 5326 class LeaderboardScoreRank { |
| 5285 /** The number of scores in the leaderboard as a string. */ | 5327 /// The number of scores in the leaderboard as a string. |
| 5286 core.String formattedNumScores; | 5328 core.String formattedNumScores; |
| 5287 /** The rank in the leaderboard as a string. */ | 5329 |
| 5330 /// The rank in the leaderboard as a string. |
| 5288 core.String formattedRank; | 5331 core.String formattedRank; |
| 5289 /** | 5332 |
| 5290 * Uniquely identifies the type of this resource. Value is always the fixed | 5333 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 5291 * string games#leaderboardScoreRank. | 5334 /// string games#leaderboardScoreRank. |
| 5292 */ | |
| 5293 core.String kind; | 5335 core.String kind; |
| 5294 /** The number of scores in the leaderboard. */ | 5336 |
| 5337 /// The number of scores in the leaderboard. |
| 5295 core.String numScores; | 5338 core.String numScores; |
| 5296 /** The rank in the leaderboard. */ | 5339 |
| 5340 /// The rank in the leaderboard. |
| 5297 core.String rank; | 5341 core.String rank; |
| 5298 | 5342 |
| 5299 LeaderboardScoreRank(); | 5343 LeaderboardScoreRank(); |
| 5300 | 5344 |
| 5301 LeaderboardScoreRank.fromJson(core.Map _json) { | 5345 LeaderboardScoreRank.fromJson(core.Map _json) { |
| 5302 if (_json.containsKey("formattedNumScores")) { | 5346 if (_json.containsKey("formattedNumScores")) { |
| 5303 formattedNumScores = _json["formattedNumScores"]; | 5347 formattedNumScores = _json["formattedNumScores"]; |
| 5304 } | 5348 } |
| 5305 if (_json.containsKey("formattedRank")) { | 5349 if (_json.containsKey("formattedRank")) { |
| 5306 formattedRank = _json["formattedRank"]; | 5350 formattedRank = _json["formattedRank"]; |
| 5307 } | 5351 } |
| 5308 if (_json.containsKey("kind")) { | 5352 if (_json.containsKey("kind")) { |
| 5309 kind = _json["kind"]; | 5353 kind = _json["kind"]; |
| 5310 } | 5354 } |
| 5311 if (_json.containsKey("numScores")) { | 5355 if (_json.containsKey("numScores")) { |
| 5312 numScores = _json["numScores"]; | 5356 numScores = _json["numScores"]; |
| 5313 } | 5357 } |
| 5314 if (_json.containsKey("rank")) { | 5358 if (_json.containsKey("rank")) { |
| 5315 rank = _json["rank"]; | 5359 rank = _json["rank"]; |
| 5316 } | 5360 } |
| 5317 } | 5361 } |
| 5318 | 5362 |
| 5319 core.Map<core.String, core.Object> toJson() { | 5363 core.Map<core.String, core.Object> toJson() { |
| 5320 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5364 final core.Map<core.String, core.Object> _json = |
| 5365 new core.Map<core.String, core.Object>(); |
| 5321 if (formattedNumScores != null) { | 5366 if (formattedNumScores != null) { |
| 5322 _json["formattedNumScores"] = formattedNumScores; | 5367 _json["formattedNumScores"] = formattedNumScores; |
| 5323 } | 5368 } |
| 5324 if (formattedRank != null) { | 5369 if (formattedRank != null) { |
| 5325 _json["formattedRank"] = formattedRank; | 5370 _json["formattedRank"] = formattedRank; |
| 5326 } | 5371 } |
| 5327 if (kind != null) { | 5372 if (kind != null) { |
| 5328 _json["kind"] = kind; | 5373 _json["kind"] = kind; |
| 5329 } | 5374 } |
| 5330 if (numScores != null) { | 5375 if (numScores != null) { |
| 5331 _json["numScores"] = numScores; | 5376 _json["numScores"] = numScores; |
| 5332 } | 5377 } |
| 5333 if (rank != null) { | 5378 if (rank != null) { |
| 5334 _json["rank"] = rank; | 5379 _json["rank"] = rank; |
| 5335 } | 5380 } |
| 5336 return _json; | 5381 return _json; |
| 5337 } | 5382 } |
| 5338 } | 5383 } |
| 5339 | 5384 |
| 5340 /** This is a JSON template for a ListScores response. */ | 5385 /// This is a JSON template for a ListScores response. |
| 5341 class LeaderboardScores { | 5386 class LeaderboardScores { |
| 5342 /** The scores in the leaderboard. */ | 5387 /// The scores in the leaderboard. |
| 5343 core.List<LeaderboardEntry> items; | 5388 core.List<LeaderboardEntry> items; |
| 5344 /** | 5389 |
| 5345 * Uniquely identifies the type of this resource. Value is always the fixed | 5390 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 5346 * string games#leaderboardScores. | 5391 /// string games#leaderboardScores. |
| 5347 */ | |
| 5348 core.String kind; | 5392 core.String kind; |
| 5349 /** The pagination token for the next page of results. */ | 5393 |
| 5394 /// The pagination token for the next page of results. |
| 5350 core.String nextPageToken; | 5395 core.String nextPageToken; |
| 5351 /** The total number of scores in the leaderboard. */ | 5396 |
| 5397 /// The total number of scores in the leaderboard. |
| 5352 core.String numScores; | 5398 core.String numScores; |
| 5353 /** | 5399 |
| 5354 * The score of the requesting player on the leaderboard. The player's score | 5400 /// The score of the requesting player on the leaderboard. The player's score |
| 5355 * may appear both here and in the list of scores above. If you are viewing a | 5401 /// may appear both here and in the list of scores above. If you are viewing |
| 5356 * public leaderboard and the player is not sharing their gameplay information | 5402 /// a public leaderboard and the player is not sharing their gameplay |
| 5357 * publicly, the scoreRank and formattedScoreRank values will not be present. | 5403 /// information publicly, the scoreRank and formattedScoreRank values will |
| 5358 */ | 5404 /// not be present. |
| 5359 LeaderboardEntry playerScore; | 5405 LeaderboardEntry playerScore; |
| 5360 /** The pagination token for the previous page of results. */ | 5406 |
| 5407 /// The pagination token for the previous page of results. |
| 5361 core.String prevPageToken; | 5408 core.String prevPageToken; |
| 5362 | 5409 |
| 5363 LeaderboardScores(); | 5410 LeaderboardScores(); |
| 5364 | 5411 |
| 5365 LeaderboardScores.fromJson(core.Map _json) { | 5412 LeaderboardScores.fromJson(core.Map _json) { |
| 5366 if (_json.containsKey("items")) { | 5413 if (_json.containsKey("items")) { |
| 5367 items = _json["items"].map((value) => new LeaderboardEntry.fromJson(value)
).toList(); | 5414 items = _json["items"] |
| 5415 .map((value) => new LeaderboardEntry.fromJson(value)) |
| 5416 .toList(); |
| 5368 } | 5417 } |
| 5369 if (_json.containsKey("kind")) { | 5418 if (_json.containsKey("kind")) { |
| 5370 kind = _json["kind"]; | 5419 kind = _json["kind"]; |
| 5371 } | 5420 } |
| 5372 if (_json.containsKey("nextPageToken")) { | 5421 if (_json.containsKey("nextPageToken")) { |
| 5373 nextPageToken = _json["nextPageToken"]; | 5422 nextPageToken = _json["nextPageToken"]; |
| 5374 } | 5423 } |
| 5375 if (_json.containsKey("numScores")) { | 5424 if (_json.containsKey("numScores")) { |
| 5376 numScores = _json["numScores"]; | 5425 numScores = _json["numScores"]; |
| 5377 } | 5426 } |
| 5378 if (_json.containsKey("playerScore")) { | 5427 if (_json.containsKey("playerScore")) { |
| 5379 playerScore = new LeaderboardEntry.fromJson(_json["playerScore"]); | 5428 playerScore = new LeaderboardEntry.fromJson(_json["playerScore"]); |
| 5380 } | 5429 } |
| 5381 if (_json.containsKey("prevPageToken")) { | 5430 if (_json.containsKey("prevPageToken")) { |
| 5382 prevPageToken = _json["prevPageToken"]; | 5431 prevPageToken = _json["prevPageToken"]; |
| 5383 } | 5432 } |
| 5384 } | 5433 } |
| 5385 | 5434 |
| 5386 core.Map<core.String, core.Object> toJson() { | 5435 core.Map<core.String, core.Object> toJson() { |
| 5387 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5436 final core.Map<core.String, core.Object> _json = |
| 5437 new core.Map<core.String, core.Object>(); |
| 5388 if (items != null) { | 5438 if (items != null) { |
| 5389 _json["items"] = items.map((value) => (value).toJson()).toList(); | 5439 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 5390 } | 5440 } |
| 5391 if (kind != null) { | 5441 if (kind != null) { |
| 5392 _json["kind"] = kind; | 5442 _json["kind"] = kind; |
| 5393 } | 5443 } |
| 5394 if (nextPageToken != null) { | 5444 if (nextPageToken != null) { |
| 5395 _json["nextPageToken"] = nextPageToken; | 5445 _json["nextPageToken"] = nextPageToken; |
| 5396 } | 5446 } |
| 5397 if (numScores != null) { | 5447 if (numScores != null) { |
| 5398 _json["numScores"] = numScores; | 5448 _json["numScores"] = numScores; |
| 5399 } | 5449 } |
| 5400 if (playerScore != null) { | 5450 if (playerScore != null) { |
| 5401 _json["playerScore"] = (playerScore).toJson(); | 5451 _json["playerScore"] = (playerScore).toJson(); |
| 5402 } | 5452 } |
| 5403 if (prevPageToken != null) { | 5453 if (prevPageToken != null) { |
| 5404 _json["prevPageToken"] = prevPageToken; | 5454 _json["prevPageToken"] = prevPageToken; |
| 5405 } | 5455 } |
| 5406 return _json; | 5456 return _json; |
| 5407 } | 5457 } |
| 5408 } | 5458 } |
| 5409 | 5459 |
| 5410 /** This is a JSON template for the metagame config resource */ | 5460 /// This is a JSON template for the metagame config resource |
| 5411 class MetagameConfig { | 5461 class MetagameConfig { |
| 5412 /** | 5462 /// Current version of the metagame configuration data. When this data is |
| 5413 * Current version of the metagame configuration data. When this data is | 5463 /// updated, the version number will be increased by one. |
| 5414 * updated, the version number will be increased by one. | |
| 5415 */ | |
| 5416 core.int currentVersion; | 5464 core.int currentVersion; |
| 5417 /** | 5465 |
| 5418 * Uniquely identifies the type of this resource. Value is always the fixed | 5466 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 5419 * string games#metagameConfig. | 5467 /// string games#metagameConfig. |
| 5420 */ | |
| 5421 core.String kind; | 5468 core.String kind; |
| 5422 /** The list of player levels. */ | 5469 |
| 5470 /// The list of player levels. |
| 5423 core.List<PlayerLevel> playerLevels; | 5471 core.List<PlayerLevel> playerLevels; |
| 5424 | 5472 |
| 5425 MetagameConfig(); | 5473 MetagameConfig(); |
| 5426 | 5474 |
| 5427 MetagameConfig.fromJson(core.Map _json) { | 5475 MetagameConfig.fromJson(core.Map _json) { |
| 5428 if (_json.containsKey("currentVersion")) { | 5476 if (_json.containsKey("currentVersion")) { |
| 5429 currentVersion = _json["currentVersion"]; | 5477 currentVersion = _json["currentVersion"]; |
| 5430 } | 5478 } |
| 5431 if (_json.containsKey("kind")) { | 5479 if (_json.containsKey("kind")) { |
| 5432 kind = _json["kind"]; | 5480 kind = _json["kind"]; |
| 5433 } | 5481 } |
| 5434 if (_json.containsKey("playerLevels")) { | 5482 if (_json.containsKey("playerLevels")) { |
| 5435 playerLevels = _json["playerLevels"].map((value) => new PlayerLevel.fromJs
on(value)).toList(); | 5483 playerLevels = _json["playerLevels"] |
| 5484 .map((value) => new PlayerLevel.fromJson(value)) |
| 5485 .toList(); |
| 5436 } | 5486 } |
| 5437 } | 5487 } |
| 5438 | 5488 |
| 5439 core.Map<core.String, core.Object> toJson() { | 5489 core.Map<core.String, core.Object> toJson() { |
| 5440 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5490 final core.Map<core.String, core.Object> _json = |
| 5491 new core.Map<core.String, core.Object>(); |
| 5441 if (currentVersion != null) { | 5492 if (currentVersion != null) { |
| 5442 _json["currentVersion"] = currentVersion; | 5493 _json["currentVersion"] = currentVersion; |
| 5443 } | 5494 } |
| 5444 if (kind != null) { | 5495 if (kind != null) { |
| 5445 _json["kind"] = kind; | 5496 _json["kind"] = kind; |
| 5446 } | 5497 } |
| 5447 if (playerLevels != null) { | 5498 if (playerLevels != null) { |
| 5448 _json["playerLevels"] = playerLevels.map((value) => (value).toJson()).toLi
st(); | 5499 _json["playerLevels"] = |
| 5500 playerLevels.map((value) => (value).toJson()).toList(); |
| 5449 } | 5501 } |
| 5450 return _json; | 5502 return _json; |
| 5451 } | 5503 } |
| 5452 } | 5504 } |
| 5453 | 5505 |
| 5454 /** This is a JSON template for network diagnostics reported for a client. */ | 5506 /// This is a JSON template for network diagnostics reported for a client. |
| 5455 class NetworkDiagnostics { | 5507 class NetworkDiagnostics { |
| 5456 /** The Android network subtype. */ | 5508 /// The Android network subtype. |
| 5457 core.int androidNetworkSubtype; | 5509 core.int androidNetworkSubtype; |
| 5458 /** The Android network type. */ | 5510 |
| 5511 /// The Android network type. |
| 5459 core.int androidNetworkType; | 5512 core.int androidNetworkType; |
| 5460 /** iOS network type as defined in Reachability.h. */ | 5513 |
| 5514 /// iOS network type as defined in Reachability.h. |
| 5461 core.int iosNetworkType; | 5515 core.int iosNetworkType; |
| 5462 /** | 5516 |
| 5463 * Uniquely identifies the type of this resource. Value is always the fixed | 5517 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 5464 * string games#networkDiagnostics. | 5518 /// string games#networkDiagnostics. |
| 5465 */ | |
| 5466 core.String kind; | 5519 core.String kind; |
| 5467 /** | 5520 |
| 5468 * The MCC+MNC code for the client's network connection. On Android: | 5521 /// The MCC+MNC code for the client's network connection. On Android: |
| 5469 * http://developer.android.com/reference/android/telephony/TelephonyManager.h
tml#getNetworkOperator() | 5522 /// http://developer.android.com/reference/android/telephony/TelephonyManager.
html#getNetworkOperator() |
| 5470 * On iOS, see: | 5523 /// On iOS, see: |
| 5471 * https://developer.apple.com/library/ios/documentation/NetworkingInternet/Re
ference/CTCarrier/Reference/Reference.html | 5524 /// https://developer.apple.com/library/ios/documentation/NetworkingInternet/R
eference/CTCarrier/Reference/Reference.html |
| 5472 */ | |
| 5473 core.String networkOperatorCode; | 5525 core.String networkOperatorCode; |
| 5474 /** | 5526 |
| 5475 * The name of the carrier of the client's network connection. On Android: | 5527 /// The name of the carrier of the client's network connection. On Android: |
| 5476 * http://developer.android.com/reference/android/telephony/TelephonyManager.h
tml#getNetworkOperatorName() | 5528 /// http://developer.android.com/reference/android/telephony/TelephonyManager.
html#getNetworkOperatorName() |
| 5477 * On iOS: | 5529 /// On iOS: |
| 5478 * https://developer.apple.com/library/ios/documentation/NetworkingInternet/Re
ference/CTCarrier/Reference/Reference.html#//apple_ref/occ/instp/CTCarrier/carri
erName | 5530 /// https://developer.apple.com/library/ios/documentation/NetworkingInternet/R
eference/CTCarrier/Reference/Reference.html#//apple_ref/occ/instp/CTCarrier/carr
ierName |
| 5479 */ | |
| 5480 core.String networkOperatorName; | 5531 core.String networkOperatorName; |
| 5481 /** | 5532 |
| 5482 * The amount of time in milliseconds it took for the client to establish a | 5533 /// The amount of time in milliseconds it took for the client to establish a |
| 5483 * connection with the XMPP server. | 5534 /// connection with the XMPP server. |
| 5484 */ | |
| 5485 core.int registrationLatencyMillis; | 5535 core.int registrationLatencyMillis; |
| 5486 | 5536 |
| 5487 NetworkDiagnostics(); | 5537 NetworkDiagnostics(); |
| 5488 | 5538 |
| 5489 NetworkDiagnostics.fromJson(core.Map _json) { | 5539 NetworkDiagnostics.fromJson(core.Map _json) { |
| 5490 if (_json.containsKey("androidNetworkSubtype")) { | 5540 if (_json.containsKey("androidNetworkSubtype")) { |
| 5491 androidNetworkSubtype = _json["androidNetworkSubtype"]; | 5541 androidNetworkSubtype = _json["androidNetworkSubtype"]; |
| 5492 } | 5542 } |
| 5493 if (_json.containsKey("androidNetworkType")) { | 5543 if (_json.containsKey("androidNetworkType")) { |
| 5494 androidNetworkType = _json["androidNetworkType"]; | 5544 androidNetworkType = _json["androidNetworkType"]; |
| 5495 } | 5545 } |
| 5496 if (_json.containsKey("iosNetworkType")) { | 5546 if (_json.containsKey("iosNetworkType")) { |
| 5497 iosNetworkType = _json["iosNetworkType"]; | 5547 iosNetworkType = _json["iosNetworkType"]; |
| 5498 } | 5548 } |
| 5499 if (_json.containsKey("kind")) { | 5549 if (_json.containsKey("kind")) { |
| 5500 kind = _json["kind"]; | 5550 kind = _json["kind"]; |
| 5501 } | 5551 } |
| 5502 if (_json.containsKey("networkOperatorCode")) { | 5552 if (_json.containsKey("networkOperatorCode")) { |
| 5503 networkOperatorCode = _json["networkOperatorCode"]; | 5553 networkOperatorCode = _json["networkOperatorCode"]; |
| 5504 } | 5554 } |
| 5505 if (_json.containsKey("networkOperatorName")) { | 5555 if (_json.containsKey("networkOperatorName")) { |
| 5506 networkOperatorName = _json["networkOperatorName"]; | 5556 networkOperatorName = _json["networkOperatorName"]; |
| 5507 } | 5557 } |
| 5508 if (_json.containsKey("registrationLatencyMillis")) { | 5558 if (_json.containsKey("registrationLatencyMillis")) { |
| 5509 registrationLatencyMillis = _json["registrationLatencyMillis"]; | 5559 registrationLatencyMillis = _json["registrationLatencyMillis"]; |
| 5510 } | 5560 } |
| 5511 } | 5561 } |
| 5512 | 5562 |
| 5513 core.Map<core.String, core.Object> toJson() { | 5563 core.Map<core.String, core.Object> toJson() { |
| 5514 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5564 final core.Map<core.String, core.Object> _json = |
| 5565 new core.Map<core.String, core.Object>(); |
| 5515 if (androidNetworkSubtype != null) { | 5566 if (androidNetworkSubtype != null) { |
| 5516 _json["androidNetworkSubtype"] = androidNetworkSubtype; | 5567 _json["androidNetworkSubtype"] = androidNetworkSubtype; |
| 5517 } | 5568 } |
| 5518 if (androidNetworkType != null) { | 5569 if (androidNetworkType != null) { |
| 5519 _json["androidNetworkType"] = androidNetworkType; | 5570 _json["androidNetworkType"] = androidNetworkType; |
| 5520 } | 5571 } |
| 5521 if (iosNetworkType != null) { | 5572 if (iosNetworkType != null) { |
| 5522 _json["iosNetworkType"] = iosNetworkType; | 5573 _json["iosNetworkType"] = iosNetworkType; |
| 5523 } | 5574 } |
| 5524 if (kind != null) { | 5575 if (kind != null) { |
| 5525 _json["kind"] = kind; | 5576 _json["kind"] = kind; |
| 5526 } | 5577 } |
| 5527 if (networkOperatorCode != null) { | 5578 if (networkOperatorCode != null) { |
| 5528 _json["networkOperatorCode"] = networkOperatorCode; | 5579 _json["networkOperatorCode"] = networkOperatorCode; |
| 5529 } | 5580 } |
| 5530 if (networkOperatorName != null) { | 5581 if (networkOperatorName != null) { |
| 5531 _json["networkOperatorName"] = networkOperatorName; | 5582 _json["networkOperatorName"] = networkOperatorName; |
| 5532 } | 5583 } |
| 5533 if (registrationLatencyMillis != null) { | 5584 if (registrationLatencyMillis != null) { |
| 5534 _json["registrationLatencyMillis"] = registrationLatencyMillis; | 5585 _json["registrationLatencyMillis"] = registrationLatencyMillis; |
| 5535 } | 5586 } |
| 5536 return _json; | 5587 return _json; |
| 5537 } | 5588 } |
| 5538 } | 5589 } |
| 5539 | 5590 |
| 5540 /** This is a JSON template for a result for a match participant. */ | 5591 /// This is a JSON template for a result for a match participant. |
| 5541 class ParticipantResult { | 5592 class ParticipantResult { |
| 5542 /** | 5593 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 5543 * Uniquely identifies the type of this resource. Value is always the fixed | 5594 /// string games#participantResult. |
| 5544 * string games#participantResult. | |
| 5545 */ | |
| 5546 core.String kind; | 5595 core.String kind; |
| 5547 /** The ID of the participant. */ | 5596 |
| 5597 /// The ID of the participant. |
| 5548 core.String participantId; | 5598 core.String participantId; |
| 5549 /** | 5599 |
| 5550 * The placement or ranking of the participant in the match results; a number | 5600 /// The placement or ranking of the participant in the match results; a |
| 5551 * from one to the number of participants in the match. Multiple participants | 5601 /// number from one to the number of participants in the match. Multiple |
| 5552 * may have the same placing value in case of a type. | 5602 /// participants may have the same placing value in case of a type. |
| 5553 */ | |
| 5554 core.int placing; | 5603 core.int placing; |
| 5555 /** | 5604 |
| 5556 * The result of the participant for this match. | 5605 /// The result of the participant for this match. |
| 5557 * Possible values are: | 5606 /// Possible values are: |
| 5558 * - "MATCH_RESULT_WIN" - The participant won the match. | 5607 /// - "MATCH_RESULT_WIN" - The participant won the match. |
| 5559 * - "MATCH_RESULT_LOSS" - The participant lost the match. | 5608 /// - "MATCH_RESULT_LOSS" - The participant lost the match. |
| 5560 * - "MATCH_RESULT_TIE" - The participant tied the match. | 5609 /// - "MATCH_RESULT_TIE" - The participant tied the match. |
| 5561 * - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or | 5610 /// - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or |
| 5562 * loses this kind of game.) | 5611 /// loses this kind of game.) |
| 5563 * - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during | 5612 /// - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during |
| 5564 * the match. | 5613 /// the match. |
| 5565 * - "MATCH_RESULT_DISAGREED" - Different clients reported different results | 5614 /// - "MATCH_RESULT_DISAGREED" - Different clients reported different results |
| 5566 * for this participant. | 5615 /// for this participant. |
| 5567 */ | |
| 5568 core.String result; | 5616 core.String result; |
| 5569 | 5617 |
| 5570 ParticipantResult(); | 5618 ParticipantResult(); |
| 5571 | 5619 |
| 5572 ParticipantResult.fromJson(core.Map _json) { | 5620 ParticipantResult.fromJson(core.Map _json) { |
| 5573 if (_json.containsKey("kind")) { | 5621 if (_json.containsKey("kind")) { |
| 5574 kind = _json["kind"]; | 5622 kind = _json["kind"]; |
| 5575 } | 5623 } |
| 5576 if (_json.containsKey("participantId")) { | 5624 if (_json.containsKey("participantId")) { |
| 5577 participantId = _json["participantId"]; | 5625 participantId = _json["participantId"]; |
| 5578 } | 5626 } |
| 5579 if (_json.containsKey("placing")) { | 5627 if (_json.containsKey("placing")) { |
| 5580 placing = _json["placing"]; | 5628 placing = _json["placing"]; |
| 5581 } | 5629 } |
| 5582 if (_json.containsKey("result")) { | 5630 if (_json.containsKey("result")) { |
| 5583 result = _json["result"]; | 5631 result = _json["result"]; |
| 5584 } | 5632 } |
| 5585 } | 5633 } |
| 5586 | 5634 |
| 5587 core.Map<core.String, core.Object> toJson() { | 5635 core.Map<core.String, core.Object> toJson() { |
| 5588 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5636 final core.Map<core.String, core.Object> _json = |
| 5637 new core.Map<core.String, core.Object>(); |
| 5589 if (kind != null) { | 5638 if (kind != null) { |
| 5590 _json["kind"] = kind; | 5639 _json["kind"] = kind; |
| 5591 } | 5640 } |
| 5592 if (participantId != null) { | 5641 if (participantId != null) { |
| 5593 _json["participantId"] = participantId; | 5642 _json["participantId"] = participantId; |
| 5594 } | 5643 } |
| 5595 if (placing != null) { | 5644 if (placing != null) { |
| 5596 _json["placing"] = placing; | 5645 _json["placing"] = placing; |
| 5597 } | 5646 } |
| 5598 if (result != null) { | 5647 if (result != null) { |
| 5599 _json["result"] = result; | 5648 _json["result"] = result; |
| 5600 } | 5649 } |
| 5601 return _json; | 5650 return _json; |
| 5602 } | 5651 } |
| 5603 } | 5652 } |
| 5604 | 5653 |
| 5605 /** This is a JSON template for peer channel diagnostics. */ | 5654 /// This is a JSON template for peer channel diagnostics. |
| 5606 class PeerChannelDiagnostics { | 5655 class PeerChannelDiagnostics { |
| 5607 /** Number of bytes received. */ | 5656 /// Number of bytes received. |
| 5608 AggregateStats bytesReceived; | 5657 AggregateStats bytesReceived; |
| 5609 /** Number of bytes sent. */ | 5658 |
| 5659 /// Number of bytes sent. |
| 5610 AggregateStats bytesSent; | 5660 AggregateStats bytesSent; |
| 5611 /** | 5661 |
| 5612 * Uniquely identifies the type of this resource. Value is always the fixed | 5662 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 5613 * string games#peerChannelDiagnostics. | 5663 /// string games#peerChannelDiagnostics. |
| 5614 */ | |
| 5615 core.String kind; | 5664 core.String kind; |
| 5616 /** Number of messages lost. */ | 5665 |
| 5666 /// Number of messages lost. |
| 5617 core.int numMessagesLost; | 5667 core.int numMessagesLost; |
| 5618 /** Number of messages received. */ | 5668 |
| 5669 /// Number of messages received. |
| 5619 core.int numMessagesReceived; | 5670 core.int numMessagesReceived; |
| 5620 /** Number of messages sent. */ | 5671 |
| 5672 /// Number of messages sent. |
| 5621 core.int numMessagesSent; | 5673 core.int numMessagesSent; |
| 5622 /** Number of send failures. */ | 5674 |
| 5675 /// Number of send failures. |
| 5623 core.int numSendFailures; | 5676 core.int numSendFailures; |
| 5624 /** Roundtrip latency stats in milliseconds. */ | 5677 |
| 5678 /// Roundtrip latency stats in milliseconds. |
| 5625 AggregateStats roundtripLatencyMillis; | 5679 AggregateStats roundtripLatencyMillis; |
| 5626 | 5680 |
| 5627 PeerChannelDiagnostics(); | 5681 PeerChannelDiagnostics(); |
| 5628 | 5682 |
| 5629 PeerChannelDiagnostics.fromJson(core.Map _json) { | 5683 PeerChannelDiagnostics.fromJson(core.Map _json) { |
| 5630 if (_json.containsKey("bytesReceived")) { | 5684 if (_json.containsKey("bytesReceived")) { |
| 5631 bytesReceived = new AggregateStats.fromJson(_json["bytesReceived"]); | 5685 bytesReceived = new AggregateStats.fromJson(_json["bytesReceived"]); |
| 5632 } | 5686 } |
| 5633 if (_json.containsKey("bytesSent")) { | 5687 if (_json.containsKey("bytesSent")) { |
| 5634 bytesSent = new AggregateStats.fromJson(_json["bytesSent"]); | 5688 bytesSent = new AggregateStats.fromJson(_json["bytesSent"]); |
| 5635 } | 5689 } |
| 5636 if (_json.containsKey("kind")) { | 5690 if (_json.containsKey("kind")) { |
| 5637 kind = _json["kind"]; | 5691 kind = _json["kind"]; |
| 5638 } | 5692 } |
| 5639 if (_json.containsKey("numMessagesLost")) { | 5693 if (_json.containsKey("numMessagesLost")) { |
| 5640 numMessagesLost = _json["numMessagesLost"]; | 5694 numMessagesLost = _json["numMessagesLost"]; |
| 5641 } | 5695 } |
| 5642 if (_json.containsKey("numMessagesReceived")) { | 5696 if (_json.containsKey("numMessagesReceived")) { |
| 5643 numMessagesReceived = _json["numMessagesReceived"]; | 5697 numMessagesReceived = _json["numMessagesReceived"]; |
| 5644 } | 5698 } |
| 5645 if (_json.containsKey("numMessagesSent")) { | 5699 if (_json.containsKey("numMessagesSent")) { |
| 5646 numMessagesSent = _json["numMessagesSent"]; | 5700 numMessagesSent = _json["numMessagesSent"]; |
| 5647 } | 5701 } |
| 5648 if (_json.containsKey("numSendFailures")) { | 5702 if (_json.containsKey("numSendFailures")) { |
| 5649 numSendFailures = _json["numSendFailures"]; | 5703 numSendFailures = _json["numSendFailures"]; |
| 5650 } | 5704 } |
| 5651 if (_json.containsKey("roundtripLatencyMillis")) { | 5705 if (_json.containsKey("roundtripLatencyMillis")) { |
| 5652 roundtripLatencyMillis = new AggregateStats.fromJson(_json["roundtripLaten
cyMillis"]); | 5706 roundtripLatencyMillis = |
| 5707 new AggregateStats.fromJson(_json["roundtripLatencyMillis"]); |
| 5653 } | 5708 } |
| 5654 } | 5709 } |
| 5655 | 5710 |
| 5656 core.Map<core.String, core.Object> toJson() { | 5711 core.Map<core.String, core.Object> toJson() { |
| 5657 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5712 final core.Map<core.String, core.Object> _json = |
| 5713 new core.Map<core.String, core.Object>(); |
| 5658 if (bytesReceived != null) { | 5714 if (bytesReceived != null) { |
| 5659 _json["bytesReceived"] = (bytesReceived).toJson(); | 5715 _json["bytesReceived"] = (bytesReceived).toJson(); |
| 5660 } | 5716 } |
| 5661 if (bytesSent != null) { | 5717 if (bytesSent != null) { |
| 5662 _json["bytesSent"] = (bytesSent).toJson(); | 5718 _json["bytesSent"] = (bytesSent).toJson(); |
| 5663 } | 5719 } |
| 5664 if (kind != null) { | 5720 if (kind != null) { |
| 5665 _json["kind"] = kind; | 5721 _json["kind"] = kind; |
| 5666 } | 5722 } |
| 5667 if (numMessagesLost != null) { | 5723 if (numMessagesLost != null) { |
| 5668 _json["numMessagesLost"] = numMessagesLost; | 5724 _json["numMessagesLost"] = numMessagesLost; |
| 5669 } | 5725 } |
| 5670 if (numMessagesReceived != null) { | 5726 if (numMessagesReceived != null) { |
| 5671 _json["numMessagesReceived"] = numMessagesReceived; | 5727 _json["numMessagesReceived"] = numMessagesReceived; |
| 5672 } | 5728 } |
| 5673 if (numMessagesSent != null) { | 5729 if (numMessagesSent != null) { |
| 5674 _json["numMessagesSent"] = numMessagesSent; | 5730 _json["numMessagesSent"] = numMessagesSent; |
| 5675 } | 5731 } |
| 5676 if (numSendFailures != null) { | 5732 if (numSendFailures != null) { |
| 5677 _json["numSendFailures"] = numSendFailures; | 5733 _json["numSendFailures"] = numSendFailures; |
| 5678 } | 5734 } |
| 5679 if (roundtripLatencyMillis != null) { | 5735 if (roundtripLatencyMillis != null) { |
| 5680 _json["roundtripLatencyMillis"] = (roundtripLatencyMillis).toJson(); | 5736 _json["roundtripLatencyMillis"] = (roundtripLatencyMillis).toJson(); |
| 5681 } | 5737 } |
| 5682 return _json; | 5738 return _json; |
| 5683 } | 5739 } |
| 5684 } | 5740 } |
| 5685 | 5741 |
| 5686 /** This is a JSON template for peer session diagnostics. */ | 5742 /// This is a JSON template for peer session diagnostics. |
| 5687 class PeerSessionDiagnostics { | 5743 class PeerSessionDiagnostics { |
| 5688 /** Connected time in milliseconds. */ | 5744 /// Connected time in milliseconds. |
| 5689 core.String connectedTimestampMillis; | 5745 core.String connectedTimestampMillis; |
| 5690 /** | 5746 |
| 5691 * Uniquely identifies the type of this resource. Value is always the fixed | 5747 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 5692 * string games#peerSessionDiagnostics. | 5748 /// string games#peerSessionDiagnostics. |
| 5693 */ | |
| 5694 core.String kind; | 5749 core.String kind; |
| 5695 /** The participant ID of the peer. */ | 5750 |
| 5751 /// The participant ID of the peer. |
| 5696 core.String participantId; | 5752 core.String participantId; |
| 5697 /** Reliable channel diagnostics. */ | 5753 |
| 5754 /// Reliable channel diagnostics. |
| 5698 PeerChannelDiagnostics reliableChannel; | 5755 PeerChannelDiagnostics reliableChannel; |
| 5699 /** Unreliable channel diagnostics. */ | 5756 |
| 5757 /// Unreliable channel diagnostics. |
| 5700 PeerChannelDiagnostics unreliableChannel; | 5758 PeerChannelDiagnostics unreliableChannel; |
| 5701 | 5759 |
| 5702 PeerSessionDiagnostics(); | 5760 PeerSessionDiagnostics(); |
| 5703 | 5761 |
| 5704 PeerSessionDiagnostics.fromJson(core.Map _json) { | 5762 PeerSessionDiagnostics.fromJson(core.Map _json) { |
| 5705 if (_json.containsKey("connectedTimestampMillis")) { | 5763 if (_json.containsKey("connectedTimestampMillis")) { |
| 5706 connectedTimestampMillis = _json["connectedTimestampMillis"]; | 5764 connectedTimestampMillis = _json["connectedTimestampMillis"]; |
| 5707 } | 5765 } |
| 5708 if (_json.containsKey("kind")) { | 5766 if (_json.containsKey("kind")) { |
| 5709 kind = _json["kind"]; | 5767 kind = _json["kind"]; |
| 5710 } | 5768 } |
| 5711 if (_json.containsKey("participantId")) { | 5769 if (_json.containsKey("participantId")) { |
| 5712 participantId = _json["participantId"]; | 5770 participantId = _json["participantId"]; |
| 5713 } | 5771 } |
| 5714 if (_json.containsKey("reliableChannel")) { | 5772 if (_json.containsKey("reliableChannel")) { |
| 5715 reliableChannel = new PeerChannelDiagnostics.fromJson(_json["reliableChann
el"]); | 5773 reliableChannel = |
| 5774 new PeerChannelDiagnostics.fromJson(_json["reliableChannel"]); |
| 5716 } | 5775 } |
| 5717 if (_json.containsKey("unreliableChannel")) { | 5776 if (_json.containsKey("unreliableChannel")) { |
| 5718 unreliableChannel = new PeerChannelDiagnostics.fromJson(_json["unreliableC
hannel"]); | 5777 unreliableChannel = |
| 5778 new PeerChannelDiagnostics.fromJson(_json["unreliableChannel"]); |
| 5719 } | 5779 } |
| 5720 } | 5780 } |
| 5721 | 5781 |
| 5722 core.Map<core.String, core.Object> toJson() { | 5782 core.Map<core.String, core.Object> toJson() { |
| 5723 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5783 final core.Map<core.String, core.Object> _json = |
| 5784 new core.Map<core.String, core.Object>(); |
| 5724 if (connectedTimestampMillis != null) { | 5785 if (connectedTimestampMillis != null) { |
| 5725 _json["connectedTimestampMillis"] = connectedTimestampMillis; | 5786 _json["connectedTimestampMillis"] = connectedTimestampMillis; |
| 5726 } | 5787 } |
| 5727 if (kind != null) { | 5788 if (kind != null) { |
| 5728 _json["kind"] = kind; | 5789 _json["kind"] = kind; |
| 5729 } | 5790 } |
| 5730 if (participantId != null) { | 5791 if (participantId != null) { |
| 5731 _json["participantId"] = participantId; | 5792 _json["participantId"] = participantId; |
| 5732 } | 5793 } |
| 5733 if (reliableChannel != null) { | 5794 if (reliableChannel != null) { |
| 5734 _json["reliableChannel"] = (reliableChannel).toJson(); | 5795 _json["reliableChannel"] = (reliableChannel).toJson(); |
| 5735 } | 5796 } |
| 5736 if (unreliableChannel != null) { | 5797 if (unreliableChannel != null) { |
| 5737 _json["unreliableChannel"] = (unreliableChannel).toJson(); | 5798 _json["unreliableChannel"] = (unreliableChannel).toJson(); |
| 5738 } | 5799 } |
| 5739 return _json; | 5800 return _json; |
| 5740 } | 5801 } |
| 5741 } | 5802 } |
| 5742 | 5803 |
| 5743 /** | 5804 /// This is a JSON template for metadata about a player playing a game with the |
| 5744 * This is a JSON template for metadata about a player playing a game with the | 5805 /// currently authenticated user. |
| 5745 * currently authenticated user. | |
| 5746 */ | |
| 5747 class Played { | 5806 class Played { |
| 5748 /** | 5807 /// True if the player was auto-matched with the currently authenticated |
| 5749 * True if the player was auto-matched with the currently authenticated user. | 5808 /// user. |
| 5750 */ | |
| 5751 core.bool autoMatched; | 5809 core.bool autoMatched; |
| 5752 /** | 5810 |
| 5753 * Uniquely identifies the type of this resource. Value is always the fixed | 5811 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 5754 * string games#played. | 5812 /// string games#played. |
| 5755 */ | |
| 5756 core.String kind; | 5813 core.String kind; |
| 5757 /** | 5814 |
| 5758 * The last time the player played the game in milliseconds since the epoch in | 5815 /// The last time the player played the game in milliseconds since the epoch |
| 5759 * UTC. | 5816 /// in UTC. |
| 5760 */ | |
| 5761 core.String timeMillis; | 5817 core.String timeMillis; |
| 5762 | 5818 |
| 5763 Played(); | 5819 Played(); |
| 5764 | 5820 |
| 5765 Played.fromJson(core.Map _json) { | 5821 Played.fromJson(core.Map _json) { |
| 5766 if (_json.containsKey("autoMatched")) { | 5822 if (_json.containsKey("autoMatched")) { |
| 5767 autoMatched = _json["autoMatched"]; | 5823 autoMatched = _json["autoMatched"]; |
| 5768 } | 5824 } |
| 5769 if (_json.containsKey("kind")) { | 5825 if (_json.containsKey("kind")) { |
| 5770 kind = _json["kind"]; | 5826 kind = _json["kind"]; |
| 5771 } | 5827 } |
| 5772 if (_json.containsKey("timeMillis")) { | 5828 if (_json.containsKey("timeMillis")) { |
| 5773 timeMillis = _json["timeMillis"]; | 5829 timeMillis = _json["timeMillis"]; |
| 5774 } | 5830 } |
| 5775 } | 5831 } |
| 5776 | 5832 |
| 5777 core.Map<core.String, core.Object> toJson() { | 5833 core.Map<core.String, core.Object> toJson() { |
| 5778 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5834 final core.Map<core.String, core.Object> _json = |
| 5835 new core.Map<core.String, core.Object>(); |
| 5779 if (autoMatched != null) { | 5836 if (autoMatched != null) { |
| 5780 _json["autoMatched"] = autoMatched; | 5837 _json["autoMatched"] = autoMatched; |
| 5781 } | 5838 } |
| 5782 if (kind != null) { | 5839 if (kind != null) { |
| 5783 _json["kind"] = kind; | 5840 _json["kind"] = kind; |
| 5784 } | 5841 } |
| 5785 if (timeMillis != null) { | 5842 if (timeMillis != null) { |
| 5786 _json["timeMillis"] = timeMillis; | 5843 _json["timeMillis"] = timeMillis; |
| 5787 } | 5844 } |
| 5788 return _json; | 5845 return _json; |
| 5789 } | 5846 } |
| 5790 } | 5847 } |
| 5791 | 5848 |
| 5792 /** | 5849 /// An object representation of the individual components of the player's name. |
| 5793 * An object representation of the individual components of the player's name. | 5850 /// For some players, these fields may not be present. |
| 5794 * For some players, these fields may not be present. | |
| 5795 */ | |
| 5796 class PlayerName { | 5851 class PlayerName { |
| 5797 /** | 5852 /// The family name of this player. In some places, this is known as the last |
| 5798 * The family name of this player. In some places, this is known as the last | 5853 /// name. |
| 5799 * name. | |
| 5800 */ | |
| 5801 core.String familyName; | 5854 core.String familyName; |
| 5802 /** | 5855 |
| 5803 * The given name of this player. In some places, this is known as the first | 5856 /// The given name of this player. In some places, this is known as the first |
| 5804 * name. | 5857 /// name. |
| 5805 */ | |
| 5806 core.String givenName; | 5858 core.String givenName; |
| 5807 | 5859 |
| 5808 PlayerName(); | 5860 PlayerName(); |
| 5809 | 5861 |
| 5810 PlayerName.fromJson(core.Map _json) { | 5862 PlayerName.fromJson(core.Map _json) { |
| 5811 if (_json.containsKey("familyName")) { | 5863 if (_json.containsKey("familyName")) { |
| 5812 familyName = _json["familyName"]; | 5864 familyName = _json["familyName"]; |
| 5813 } | 5865 } |
| 5814 if (_json.containsKey("givenName")) { | 5866 if (_json.containsKey("givenName")) { |
| 5815 givenName = _json["givenName"]; | 5867 givenName = _json["givenName"]; |
| 5816 } | 5868 } |
| 5817 } | 5869 } |
| 5818 | 5870 |
| 5819 core.Map<core.String, core.Object> toJson() { | 5871 core.Map<core.String, core.Object> toJson() { |
| 5820 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5872 final core.Map<core.String, core.Object> _json = |
| 5873 new core.Map<core.String, core.Object>(); |
| 5821 if (familyName != null) { | 5874 if (familyName != null) { |
| 5822 _json["familyName"] = familyName; | 5875 _json["familyName"] = familyName; |
| 5823 } | 5876 } |
| 5824 if (givenName != null) { | 5877 if (givenName != null) { |
| 5825 _json["givenName"] = givenName; | 5878 _json["givenName"] = givenName; |
| 5826 } | 5879 } |
| 5827 return _json; | 5880 return _json; |
| 5828 } | 5881 } |
| 5829 } | 5882 } |
| 5830 | 5883 |
| 5831 /** This is a JSON template for a Player resource. */ | 5884 /// This is a JSON template for a Player resource. |
| 5832 class Player { | 5885 class Player { |
| 5833 /** The base URL for the image that represents the player. */ | 5886 /// The base URL for the image that represents the player. |
| 5834 core.String avatarImageUrl; | 5887 core.String avatarImageUrl; |
| 5835 /** The url to the landscape mode player banner image. */ | 5888 |
| 5889 /// The url to the landscape mode player banner image. |
| 5836 core.String bannerUrlLandscape; | 5890 core.String bannerUrlLandscape; |
| 5837 /** The url to the portrait mode player banner image. */ | 5891 |
| 5892 /// The url to the portrait mode player banner image. |
| 5838 core.String bannerUrlPortrait; | 5893 core.String bannerUrlPortrait; |
| 5839 /** The name to display for the player. */ | 5894 |
| 5895 /// The name to display for the player. |
| 5840 core.String displayName; | 5896 core.String displayName; |
| 5841 /** | 5897 |
| 5842 * An object to represent Play Game experience information for the player. | 5898 /// An object to represent Play Game experience information for the player. |
| 5843 */ | |
| 5844 PlayerExperienceInfo experienceInfo; | 5899 PlayerExperienceInfo experienceInfo; |
| 5845 /** | 5900 |
| 5846 * Uniquely identifies the type of this resource. Value is always the fixed | 5901 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 5847 * string games#player. | 5902 /// string games#player. |
| 5848 */ | |
| 5849 core.String kind; | 5903 core.String kind; |
| 5850 /** | 5904 |
| 5851 * Details about the last time this player played a multiplayer game with the | 5905 /// Details about the last time this player played a multiplayer game with |
| 5852 * currently authenticated player. Populated for PLAYED_WITH player collection | 5906 /// the currently authenticated player. Populated for PLAYED_WITH player |
| 5853 * members. | 5907 /// collection members. |
| 5854 */ | |
| 5855 Played lastPlayedWith; | 5908 Played lastPlayedWith; |
| 5856 /** | 5909 |
| 5857 * An object representation of the individual components of the player's name. | 5910 /// An object representation of the individual components of the player's |
| 5858 * For some players, these fields may not be present. | 5911 /// name. For some players, these fields may not be present. |
| 5859 */ | |
| 5860 PlayerName name; | 5912 PlayerName name; |
| 5861 /** | 5913 |
| 5862 * The player ID that was used for this player the first time they signed into | 5914 /// The player ID that was used for this player the first time they signed |
| 5863 * the game in question. This is only populated for calls to player.get for | 5915 /// into the game in question. This is only populated for calls to player.get |
| 5864 * the requesting player, only if the player ID has subsequently changed, and | 5916 /// for the requesting player, only if the player ID has subsequently |
| 5865 * only to clients that support remapping player IDs. | 5917 /// changed, and only to clients that support remapping player IDs. |
| 5866 */ | |
| 5867 core.String originalPlayerId; | 5918 core.String originalPlayerId; |
| 5868 /** The ID of the player. */ | 5919 |
| 5920 /// The ID of the player. |
| 5869 core.String playerId; | 5921 core.String playerId; |
| 5870 /** | 5922 |
| 5871 * The player's profile settings. Controls whether or not the player's profile | 5923 /// The player's profile settings. Controls whether or not the player's |
| 5872 * is visible to other players. | 5924 /// profile is visible to other players. |
| 5873 */ | |
| 5874 ProfileSettings profileSettings; | 5925 ProfileSettings profileSettings; |
| 5875 /** The player's title rewarded for their game activities. */ | 5926 |
| 5927 /// The player's title rewarded for their game activities. |
| 5876 core.String title; | 5928 core.String title; |
| 5877 | 5929 |
| 5878 Player(); | 5930 Player(); |
| 5879 | 5931 |
| 5880 Player.fromJson(core.Map _json) { | 5932 Player.fromJson(core.Map _json) { |
| 5881 if (_json.containsKey("avatarImageUrl")) { | 5933 if (_json.containsKey("avatarImageUrl")) { |
| 5882 avatarImageUrl = _json["avatarImageUrl"]; | 5934 avatarImageUrl = _json["avatarImageUrl"]; |
| 5883 } | 5935 } |
| 5884 if (_json.containsKey("bannerUrlLandscape")) { | 5936 if (_json.containsKey("bannerUrlLandscape")) { |
| 5885 bannerUrlLandscape = _json["bannerUrlLandscape"]; | 5937 bannerUrlLandscape = _json["bannerUrlLandscape"]; |
| 5886 } | 5938 } |
| 5887 if (_json.containsKey("bannerUrlPortrait")) { | 5939 if (_json.containsKey("bannerUrlPortrait")) { |
| 5888 bannerUrlPortrait = _json["bannerUrlPortrait"]; | 5940 bannerUrlPortrait = _json["bannerUrlPortrait"]; |
| 5889 } | 5941 } |
| 5890 if (_json.containsKey("displayName")) { | 5942 if (_json.containsKey("displayName")) { |
| 5891 displayName = _json["displayName"]; | 5943 displayName = _json["displayName"]; |
| 5892 } | 5944 } |
| 5893 if (_json.containsKey("experienceInfo")) { | 5945 if (_json.containsKey("experienceInfo")) { |
| 5894 experienceInfo = new PlayerExperienceInfo.fromJson(_json["experienceInfo"]
); | 5946 experienceInfo = |
| 5947 new PlayerExperienceInfo.fromJson(_json["experienceInfo"]); |
| 5895 } | 5948 } |
| 5896 if (_json.containsKey("kind")) { | 5949 if (_json.containsKey("kind")) { |
| 5897 kind = _json["kind"]; | 5950 kind = _json["kind"]; |
| 5898 } | 5951 } |
| 5899 if (_json.containsKey("lastPlayedWith")) { | 5952 if (_json.containsKey("lastPlayedWith")) { |
| 5900 lastPlayedWith = new Played.fromJson(_json["lastPlayedWith"]); | 5953 lastPlayedWith = new Played.fromJson(_json["lastPlayedWith"]); |
| 5901 } | 5954 } |
| 5902 if (_json.containsKey("name")) { | 5955 if (_json.containsKey("name")) { |
| 5903 name = new PlayerName.fromJson(_json["name"]); | 5956 name = new PlayerName.fromJson(_json["name"]); |
| 5904 } | 5957 } |
| 5905 if (_json.containsKey("originalPlayerId")) { | 5958 if (_json.containsKey("originalPlayerId")) { |
| 5906 originalPlayerId = _json["originalPlayerId"]; | 5959 originalPlayerId = _json["originalPlayerId"]; |
| 5907 } | 5960 } |
| 5908 if (_json.containsKey("playerId")) { | 5961 if (_json.containsKey("playerId")) { |
| 5909 playerId = _json["playerId"]; | 5962 playerId = _json["playerId"]; |
| 5910 } | 5963 } |
| 5911 if (_json.containsKey("profileSettings")) { | 5964 if (_json.containsKey("profileSettings")) { |
| 5912 profileSettings = new ProfileSettings.fromJson(_json["profileSettings"]); | 5965 profileSettings = new ProfileSettings.fromJson(_json["profileSettings"]); |
| 5913 } | 5966 } |
| 5914 if (_json.containsKey("title")) { | 5967 if (_json.containsKey("title")) { |
| 5915 title = _json["title"]; | 5968 title = _json["title"]; |
| 5916 } | 5969 } |
| 5917 } | 5970 } |
| 5918 | 5971 |
| 5919 core.Map<core.String, core.Object> toJson() { | 5972 core.Map<core.String, core.Object> toJson() { |
| 5920 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5973 final core.Map<core.String, core.Object> _json = |
| 5974 new core.Map<core.String, core.Object>(); |
| 5921 if (avatarImageUrl != null) { | 5975 if (avatarImageUrl != null) { |
| 5922 _json["avatarImageUrl"] = avatarImageUrl; | 5976 _json["avatarImageUrl"] = avatarImageUrl; |
| 5923 } | 5977 } |
| 5924 if (bannerUrlLandscape != null) { | 5978 if (bannerUrlLandscape != null) { |
| 5925 _json["bannerUrlLandscape"] = bannerUrlLandscape; | 5979 _json["bannerUrlLandscape"] = bannerUrlLandscape; |
| 5926 } | 5980 } |
| 5927 if (bannerUrlPortrait != null) { | 5981 if (bannerUrlPortrait != null) { |
| 5928 _json["bannerUrlPortrait"] = bannerUrlPortrait; | 5982 _json["bannerUrlPortrait"] = bannerUrlPortrait; |
| 5929 } | 5983 } |
| 5930 if (displayName != null) { | 5984 if (displayName != null) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 5951 if (profileSettings != null) { | 6005 if (profileSettings != null) { |
| 5952 _json["profileSettings"] = (profileSettings).toJson(); | 6006 _json["profileSettings"] = (profileSettings).toJson(); |
| 5953 } | 6007 } |
| 5954 if (title != null) { | 6008 if (title != null) { |
| 5955 _json["title"] = title; | 6009 _json["title"] = title; |
| 5956 } | 6010 } |
| 5957 return _json; | 6011 return _json; |
| 5958 } | 6012 } |
| 5959 } | 6013 } |
| 5960 | 6014 |
| 5961 /** This is a JSON template for an achievement object. */ | 6015 /// This is a JSON template for an achievement object. |
| 5962 class PlayerAchievement { | 6016 class PlayerAchievement { |
| 5963 /** | 6017 /// The state of the achievement. |
| 5964 * The state of the achievement. | 6018 /// Possible values are: |
| 5965 * Possible values are: | 6019 /// - "HIDDEN" - Achievement is hidden. |
| 5966 * - "HIDDEN" - Achievement is hidden. | 6020 /// - "REVEALED" - Achievement is revealed. |
| 5967 * - "REVEALED" - Achievement is revealed. | 6021 /// - "UNLOCKED" - Achievement is unlocked. |
| 5968 * - "UNLOCKED" - Achievement is unlocked. | |
| 5969 */ | |
| 5970 core.String achievementState; | 6022 core.String achievementState; |
| 5971 /** The current steps for an incremental achievement. */ | 6023 |
| 6024 /// The current steps for an incremental achievement. |
| 5972 core.int currentSteps; | 6025 core.int currentSteps; |
| 5973 /** | 6026 |
| 5974 * Experience points earned for the achievement. This field is absent for | 6027 /// Experience points earned for the achievement. This field is absent for |
| 5975 * achievements that have not yet been unlocked and 0 for achievements that | 6028 /// achievements that have not yet been unlocked and 0 for achievements that |
| 5976 * have been unlocked by testers but that are unpublished. | 6029 /// have been unlocked by testers but that are unpublished. |
| 5977 */ | |
| 5978 core.String experiencePoints; | 6030 core.String experiencePoints; |
| 5979 /** The current steps for an incremental achievement as a string. */ | 6031 |
| 6032 /// The current steps for an incremental achievement as a string. |
| 5980 core.String formattedCurrentStepsString; | 6033 core.String formattedCurrentStepsString; |
| 5981 /** The ID of the achievement. */ | 6034 |
| 6035 /// The ID of the achievement. |
| 5982 core.String id; | 6036 core.String id; |
| 5983 /** | 6037 |
| 5984 * Uniquely identifies the type of this resource. Value is always the fixed | 6038 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 5985 * string games#playerAchievement. | 6039 /// string games#playerAchievement. |
| 5986 */ | |
| 5987 core.String kind; | 6040 core.String kind; |
| 5988 /** The timestamp of the last modification to this achievement's state. */ | 6041 |
| 6042 /// The timestamp of the last modification to this achievement's state. |
| 5989 core.String lastUpdatedTimestamp; | 6043 core.String lastUpdatedTimestamp; |
| 5990 | 6044 |
| 5991 PlayerAchievement(); | 6045 PlayerAchievement(); |
| 5992 | 6046 |
| 5993 PlayerAchievement.fromJson(core.Map _json) { | 6047 PlayerAchievement.fromJson(core.Map _json) { |
| 5994 if (_json.containsKey("achievementState")) { | 6048 if (_json.containsKey("achievementState")) { |
| 5995 achievementState = _json["achievementState"]; | 6049 achievementState = _json["achievementState"]; |
| 5996 } | 6050 } |
| 5997 if (_json.containsKey("currentSteps")) { | 6051 if (_json.containsKey("currentSteps")) { |
| 5998 currentSteps = _json["currentSteps"]; | 6052 currentSteps = _json["currentSteps"]; |
| 5999 } | 6053 } |
| 6000 if (_json.containsKey("experiencePoints")) { | 6054 if (_json.containsKey("experiencePoints")) { |
| 6001 experiencePoints = _json["experiencePoints"]; | 6055 experiencePoints = _json["experiencePoints"]; |
| 6002 } | 6056 } |
| 6003 if (_json.containsKey("formattedCurrentStepsString")) { | 6057 if (_json.containsKey("formattedCurrentStepsString")) { |
| 6004 formattedCurrentStepsString = _json["formattedCurrentStepsString"]; | 6058 formattedCurrentStepsString = _json["formattedCurrentStepsString"]; |
| 6005 } | 6059 } |
| 6006 if (_json.containsKey("id")) { | 6060 if (_json.containsKey("id")) { |
| 6007 id = _json["id"]; | 6061 id = _json["id"]; |
| 6008 } | 6062 } |
| 6009 if (_json.containsKey("kind")) { | 6063 if (_json.containsKey("kind")) { |
| 6010 kind = _json["kind"]; | 6064 kind = _json["kind"]; |
| 6011 } | 6065 } |
| 6012 if (_json.containsKey("lastUpdatedTimestamp")) { | 6066 if (_json.containsKey("lastUpdatedTimestamp")) { |
| 6013 lastUpdatedTimestamp = _json["lastUpdatedTimestamp"]; | 6067 lastUpdatedTimestamp = _json["lastUpdatedTimestamp"]; |
| 6014 } | 6068 } |
| 6015 } | 6069 } |
| 6016 | 6070 |
| 6017 core.Map<core.String, core.Object> toJson() { | 6071 core.Map<core.String, core.Object> toJson() { |
| 6018 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6072 final core.Map<core.String, core.Object> _json = |
| 6073 new core.Map<core.String, core.Object>(); |
| 6019 if (achievementState != null) { | 6074 if (achievementState != null) { |
| 6020 _json["achievementState"] = achievementState; | 6075 _json["achievementState"] = achievementState; |
| 6021 } | 6076 } |
| 6022 if (currentSteps != null) { | 6077 if (currentSteps != null) { |
| 6023 _json["currentSteps"] = currentSteps; | 6078 _json["currentSteps"] = currentSteps; |
| 6024 } | 6079 } |
| 6025 if (experiencePoints != null) { | 6080 if (experiencePoints != null) { |
| 6026 _json["experiencePoints"] = experiencePoints; | 6081 _json["experiencePoints"] = experiencePoints; |
| 6027 } | 6082 } |
| 6028 if (formattedCurrentStepsString != null) { | 6083 if (formattedCurrentStepsString != null) { |
| 6029 _json["formattedCurrentStepsString"] = formattedCurrentStepsString; | 6084 _json["formattedCurrentStepsString"] = formattedCurrentStepsString; |
| 6030 } | 6085 } |
| 6031 if (id != null) { | 6086 if (id != null) { |
| 6032 _json["id"] = id; | 6087 _json["id"] = id; |
| 6033 } | 6088 } |
| 6034 if (kind != null) { | 6089 if (kind != null) { |
| 6035 _json["kind"] = kind; | 6090 _json["kind"] = kind; |
| 6036 } | 6091 } |
| 6037 if (lastUpdatedTimestamp != null) { | 6092 if (lastUpdatedTimestamp != null) { |
| 6038 _json["lastUpdatedTimestamp"] = lastUpdatedTimestamp; | 6093 _json["lastUpdatedTimestamp"] = lastUpdatedTimestamp; |
| 6039 } | 6094 } |
| 6040 return _json; | 6095 return _json; |
| 6041 } | 6096 } |
| 6042 } | 6097 } |
| 6043 | 6098 |
| 6044 /** This is a JSON template for a list of achievement objects. */ | 6099 /// This is a JSON template for a list of achievement objects. |
| 6045 class PlayerAchievementListResponse { | 6100 class PlayerAchievementListResponse { |
| 6046 /** The achievements. */ | 6101 /// The achievements. |
| 6047 core.List<PlayerAchievement> items; | 6102 core.List<PlayerAchievement> items; |
| 6048 /** | 6103 |
| 6049 * Uniquely identifies the type of this resource. Value is always the fixed | 6104 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6050 * string games#playerAchievementListResponse. | 6105 /// string games#playerAchievementListResponse. |
| 6051 */ | |
| 6052 core.String kind; | 6106 core.String kind; |
| 6053 /** Token corresponding to the next page of results. */ | 6107 |
| 6108 /// Token corresponding to the next page of results. |
| 6054 core.String nextPageToken; | 6109 core.String nextPageToken; |
| 6055 | 6110 |
| 6056 PlayerAchievementListResponse(); | 6111 PlayerAchievementListResponse(); |
| 6057 | 6112 |
| 6058 PlayerAchievementListResponse.fromJson(core.Map _json) { | 6113 PlayerAchievementListResponse.fromJson(core.Map _json) { |
| 6059 if (_json.containsKey("items")) { | 6114 if (_json.containsKey("items")) { |
| 6060 items = _json["items"].map((value) => new PlayerAchievement.fromJson(value
)).toList(); | 6115 items = _json["items"] |
| 6116 .map((value) => new PlayerAchievement.fromJson(value)) |
| 6117 .toList(); |
| 6061 } | 6118 } |
| 6062 if (_json.containsKey("kind")) { | 6119 if (_json.containsKey("kind")) { |
| 6063 kind = _json["kind"]; | 6120 kind = _json["kind"]; |
| 6064 } | 6121 } |
| 6065 if (_json.containsKey("nextPageToken")) { | 6122 if (_json.containsKey("nextPageToken")) { |
| 6066 nextPageToken = _json["nextPageToken"]; | 6123 nextPageToken = _json["nextPageToken"]; |
| 6067 } | 6124 } |
| 6068 } | 6125 } |
| 6069 | 6126 |
| 6070 core.Map<core.String, core.Object> toJson() { | 6127 core.Map<core.String, core.Object> toJson() { |
| 6071 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6128 final core.Map<core.String, core.Object> _json = |
| 6129 new core.Map<core.String, core.Object>(); |
| 6072 if (items != null) { | 6130 if (items != null) { |
| 6073 _json["items"] = items.map((value) => (value).toJson()).toList(); | 6131 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 6074 } | 6132 } |
| 6075 if (kind != null) { | 6133 if (kind != null) { |
| 6076 _json["kind"] = kind; | 6134 _json["kind"] = kind; |
| 6077 } | 6135 } |
| 6078 if (nextPageToken != null) { | 6136 if (nextPageToken != null) { |
| 6079 _json["nextPageToken"] = nextPageToken; | 6137 _json["nextPageToken"] = nextPageToken; |
| 6080 } | 6138 } |
| 6081 return _json; | 6139 return _json; |
| 6082 } | 6140 } |
| 6083 } | 6141 } |
| 6084 | 6142 |
| 6085 /** This is a JSON template for an event status resource. */ | 6143 /// This is a JSON template for an event status resource. |
| 6086 class PlayerEvent { | 6144 class PlayerEvent { |
| 6087 /** The ID of the event definition. */ | 6145 /// The ID of the event definition. |
| 6088 core.String definitionId; | 6146 core.String definitionId; |
| 6089 /** | 6147 |
| 6090 * The current number of times this event has occurred, as a string. The | 6148 /// The current number of times this event has occurred, as a string. The |
| 6091 * formatting of this string depends on the configuration of your event in the | 6149 /// formatting of this string depends on the configuration of your event in |
| 6092 * Play Games Developer Console. | 6150 /// the Play Games Developer Console. |
| 6093 */ | |
| 6094 core.String formattedNumEvents; | 6151 core.String formattedNumEvents; |
| 6095 /** | 6152 |
| 6096 * Uniquely identifies the type of this resource. Value is always the fixed | 6153 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6097 * string games#playerEvent. | 6154 /// string games#playerEvent. |
| 6098 */ | |
| 6099 core.String kind; | 6155 core.String kind; |
| 6100 /** The current number of times this event has occurred. */ | 6156 |
| 6157 /// The current number of times this event has occurred. |
| 6101 core.String numEvents; | 6158 core.String numEvents; |
| 6102 /** The ID of the player. */ | 6159 |
| 6160 /// The ID of the player. |
| 6103 core.String playerId; | 6161 core.String playerId; |
| 6104 | 6162 |
| 6105 PlayerEvent(); | 6163 PlayerEvent(); |
| 6106 | 6164 |
| 6107 PlayerEvent.fromJson(core.Map _json) { | 6165 PlayerEvent.fromJson(core.Map _json) { |
| 6108 if (_json.containsKey("definitionId")) { | 6166 if (_json.containsKey("definitionId")) { |
| 6109 definitionId = _json["definitionId"]; | 6167 definitionId = _json["definitionId"]; |
| 6110 } | 6168 } |
| 6111 if (_json.containsKey("formattedNumEvents")) { | 6169 if (_json.containsKey("formattedNumEvents")) { |
| 6112 formattedNumEvents = _json["formattedNumEvents"]; | 6170 formattedNumEvents = _json["formattedNumEvents"]; |
| 6113 } | 6171 } |
| 6114 if (_json.containsKey("kind")) { | 6172 if (_json.containsKey("kind")) { |
| 6115 kind = _json["kind"]; | 6173 kind = _json["kind"]; |
| 6116 } | 6174 } |
| 6117 if (_json.containsKey("numEvents")) { | 6175 if (_json.containsKey("numEvents")) { |
| 6118 numEvents = _json["numEvents"]; | 6176 numEvents = _json["numEvents"]; |
| 6119 } | 6177 } |
| 6120 if (_json.containsKey("playerId")) { | 6178 if (_json.containsKey("playerId")) { |
| 6121 playerId = _json["playerId"]; | 6179 playerId = _json["playerId"]; |
| 6122 } | 6180 } |
| 6123 } | 6181 } |
| 6124 | 6182 |
| 6125 core.Map<core.String, core.Object> toJson() { | 6183 core.Map<core.String, core.Object> toJson() { |
| 6126 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6184 final core.Map<core.String, core.Object> _json = |
| 6185 new core.Map<core.String, core.Object>(); |
| 6127 if (definitionId != null) { | 6186 if (definitionId != null) { |
| 6128 _json["definitionId"] = definitionId; | 6187 _json["definitionId"] = definitionId; |
| 6129 } | 6188 } |
| 6130 if (formattedNumEvents != null) { | 6189 if (formattedNumEvents != null) { |
| 6131 _json["formattedNumEvents"] = formattedNumEvents; | 6190 _json["formattedNumEvents"] = formattedNumEvents; |
| 6132 } | 6191 } |
| 6133 if (kind != null) { | 6192 if (kind != null) { |
| 6134 _json["kind"] = kind; | 6193 _json["kind"] = kind; |
| 6135 } | 6194 } |
| 6136 if (numEvents != null) { | 6195 if (numEvents != null) { |
| 6137 _json["numEvents"] = numEvents; | 6196 _json["numEvents"] = numEvents; |
| 6138 } | 6197 } |
| 6139 if (playerId != null) { | 6198 if (playerId != null) { |
| 6140 _json["playerId"] = playerId; | 6199 _json["playerId"] = playerId; |
| 6141 } | 6200 } |
| 6142 return _json; | 6201 return _json; |
| 6143 } | 6202 } |
| 6144 } | 6203 } |
| 6145 | 6204 |
| 6146 /** This is a JSON template for a ListByPlayer response. */ | 6205 /// This is a JSON template for a ListByPlayer response. |
| 6147 class PlayerEventListResponse { | 6206 class PlayerEventListResponse { |
| 6148 /** The player events. */ | 6207 /// The player events. |
| 6149 core.List<PlayerEvent> items; | 6208 core.List<PlayerEvent> items; |
| 6150 /** | 6209 |
| 6151 * Uniquely identifies the type of this resource. Value is always the fixed | 6210 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6152 * string games#playerEventListResponse. | 6211 /// string games#playerEventListResponse. |
| 6153 */ | |
| 6154 core.String kind; | 6212 core.String kind; |
| 6155 /** The pagination token for the next page of results. */ | 6213 |
| 6214 /// The pagination token for the next page of results. |
| 6156 core.String nextPageToken; | 6215 core.String nextPageToken; |
| 6157 | 6216 |
| 6158 PlayerEventListResponse(); | 6217 PlayerEventListResponse(); |
| 6159 | 6218 |
| 6160 PlayerEventListResponse.fromJson(core.Map _json) { | 6219 PlayerEventListResponse.fromJson(core.Map _json) { |
| 6161 if (_json.containsKey("items")) { | 6220 if (_json.containsKey("items")) { |
| 6162 items = _json["items"].map((value) => new PlayerEvent.fromJson(value)).toL
ist(); | 6221 items = _json["items"] |
| 6222 .map((value) => new PlayerEvent.fromJson(value)) |
| 6223 .toList(); |
| 6163 } | 6224 } |
| 6164 if (_json.containsKey("kind")) { | 6225 if (_json.containsKey("kind")) { |
| 6165 kind = _json["kind"]; | 6226 kind = _json["kind"]; |
| 6166 } | 6227 } |
| 6167 if (_json.containsKey("nextPageToken")) { | 6228 if (_json.containsKey("nextPageToken")) { |
| 6168 nextPageToken = _json["nextPageToken"]; | 6229 nextPageToken = _json["nextPageToken"]; |
| 6169 } | 6230 } |
| 6170 } | 6231 } |
| 6171 | 6232 |
| 6172 core.Map<core.String, core.Object> toJson() { | 6233 core.Map<core.String, core.Object> toJson() { |
| 6173 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6234 final core.Map<core.String, core.Object> _json = |
| 6235 new core.Map<core.String, core.Object>(); |
| 6174 if (items != null) { | 6236 if (items != null) { |
| 6175 _json["items"] = items.map((value) => (value).toJson()).toList(); | 6237 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 6176 } | 6238 } |
| 6177 if (kind != null) { | 6239 if (kind != null) { |
| 6178 _json["kind"] = kind; | 6240 _json["kind"] = kind; |
| 6179 } | 6241 } |
| 6180 if (nextPageToken != null) { | 6242 if (nextPageToken != null) { |
| 6181 _json["nextPageToken"] = nextPageToken; | 6243 _json["nextPageToken"] = nextPageToken; |
| 6182 } | 6244 } |
| 6183 return _json; | 6245 return _json; |
| 6184 } | 6246 } |
| 6185 } | 6247 } |
| 6186 | 6248 |
| 6187 /** | 6249 /// This is a JSON template for 1P/3P metadata about the player's experience. |
| 6188 * This is a JSON template for 1P/3P metadata about the player's experience. | |
| 6189 */ | |
| 6190 class PlayerExperienceInfo { | 6250 class PlayerExperienceInfo { |
| 6191 /** The current number of experience points for the player. */ | 6251 /// The current number of experience points for the player. |
| 6192 core.String currentExperiencePoints; | 6252 core.String currentExperiencePoints; |
| 6193 /** The current level of the player. */ | 6253 |
| 6254 /// The current level of the player. |
| 6194 PlayerLevel currentLevel; | 6255 PlayerLevel currentLevel; |
| 6195 /** | 6256 |
| 6196 * Uniquely identifies the type of this resource. Value is always the fixed | 6257 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6197 * string games#playerExperienceInfo. | 6258 /// string games#playerExperienceInfo. |
| 6198 */ | |
| 6199 core.String kind; | 6259 core.String kind; |
| 6200 /** | 6260 |
| 6201 * The timestamp when the player was leveled up, in millis since Unix epoch | 6261 /// The timestamp when the player was leveled up, in millis since Unix epoch |
| 6202 * UTC. | 6262 /// UTC. |
| 6203 */ | |
| 6204 core.String lastLevelUpTimestampMillis; | 6263 core.String lastLevelUpTimestampMillis; |
| 6205 /** | 6264 |
| 6206 * The next level of the player. If the current level is the maximum level, | 6265 /// The next level of the player. If the current level is the maximum level, |
| 6207 * this should be same as the current level. | 6266 /// this should be same as the current level. |
| 6208 */ | |
| 6209 PlayerLevel nextLevel; | 6267 PlayerLevel nextLevel; |
| 6210 | 6268 |
| 6211 PlayerExperienceInfo(); | 6269 PlayerExperienceInfo(); |
| 6212 | 6270 |
| 6213 PlayerExperienceInfo.fromJson(core.Map _json) { | 6271 PlayerExperienceInfo.fromJson(core.Map _json) { |
| 6214 if (_json.containsKey("currentExperiencePoints")) { | 6272 if (_json.containsKey("currentExperiencePoints")) { |
| 6215 currentExperiencePoints = _json["currentExperiencePoints"]; | 6273 currentExperiencePoints = _json["currentExperiencePoints"]; |
| 6216 } | 6274 } |
| 6217 if (_json.containsKey("currentLevel")) { | 6275 if (_json.containsKey("currentLevel")) { |
| 6218 currentLevel = new PlayerLevel.fromJson(_json["currentLevel"]); | 6276 currentLevel = new PlayerLevel.fromJson(_json["currentLevel"]); |
| 6219 } | 6277 } |
| 6220 if (_json.containsKey("kind")) { | 6278 if (_json.containsKey("kind")) { |
| 6221 kind = _json["kind"]; | 6279 kind = _json["kind"]; |
| 6222 } | 6280 } |
| 6223 if (_json.containsKey("lastLevelUpTimestampMillis")) { | 6281 if (_json.containsKey("lastLevelUpTimestampMillis")) { |
| 6224 lastLevelUpTimestampMillis = _json["lastLevelUpTimestampMillis"]; | 6282 lastLevelUpTimestampMillis = _json["lastLevelUpTimestampMillis"]; |
| 6225 } | 6283 } |
| 6226 if (_json.containsKey("nextLevel")) { | 6284 if (_json.containsKey("nextLevel")) { |
| 6227 nextLevel = new PlayerLevel.fromJson(_json["nextLevel"]); | 6285 nextLevel = new PlayerLevel.fromJson(_json["nextLevel"]); |
| 6228 } | 6286 } |
| 6229 } | 6287 } |
| 6230 | 6288 |
| 6231 core.Map<core.String, core.Object> toJson() { | 6289 core.Map<core.String, core.Object> toJson() { |
| 6232 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6290 final core.Map<core.String, core.Object> _json = |
| 6291 new core.Map<core.String, core.Object>(); |
| 6233 if (currentExperiencePoints != null) { | 6292 if (currentExperiencePoints != null) { |
| 6234 _json["currentExperiencePoints"] = currentExperiencePoints; | 6293 _json["currentExperiencePoints"] = currentExperiencePoints; |
| 6235 } | 6294 } |
| 6236 if (currentLevel != null) { | 6295 if (currentLevel != null) { |
| 6237 _json["currentLevel"] = (currentLevel).toJson(); | 6296 _json["currentLevel"] = (currentLevel).toJson(); |
| 6238 } | 6297 } |
| 6239 if (kind != null) { | 6298 if (kind != null) { |
| 6240 _json["kind"] = kind; | 6299 _json["kind"] = kind; |
| 6241 } | 6300 } |
| 6242 if (lastLevelUpTimestampMillis != null) { | 6301 if (lastLevelUpTimestampMillis != null) { |
| 6243 _json["lastLevelUpTimestampMillis"] = lastLevelUpTimestampMillis; | 6302 _json["lastLevelUpTimestampMillis"] = lastLevelUpTimestampMillis; |
| 6244 } | 6303 } |
| 6245 if (nextLevel != null) { | 6304 if (nextLevel != null) { |
| 6246 _json["nextLevel"] = (nextLevel).toJson(); | 6305 _json["nextLevel"] = (nextLevel).toJson(); |
| 6247 } | 6306 } |
| 6248 return _json; | 6307 return _json; |
| 6249 } | 6308 } |
| 6250 } | 6309 } |
| 6251 | 6310 |
| 6252 /** This is a JSON template for a player leaderboard score object. */ | 6311 /// This is a JSON template for a player leaderboard score object. |
| 6253 class PlayerLeaderboardScore { | 6312 class PlayerLeaderboardScore { |
| 6254 /** | 6313 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6255 * Uniquely identifies the type of this resource. Value is always the fixed | 6314 /// string games#playerLeaderboardScore. |
| 6256 * string games#playerLeaderboardScore. | |
| 6257 */ | |
| 6258 core.String kind; | 6315 core.String kind; |
| 6259 /** The ID of the leaderboard this score is in. */ | 6316 |
| 6317 /// The ID of the leaderboard this score is in. |
| 6260 core.String leaderboardId; | 6318 core.String leaderboardId; |
| 6261 /** | 6319 |
| 6262 * The public rank of the score in this leaderboard. This object will not be | 6320 /// The public rank of the score in this leaderboard. This object will not be |
| 6263 * present if the user is not sharing their scores publicly. | 6321 /// present if the user is not sharing their scores publicly. |
| 6264 */ | |
| 6265 LeaderboardScoreRank publicRank; | 6322 LeaderboardScoreRank publicRank; |
| 6266 /** The formatted value of this score. */ | 6323 |
| 6324 /// The formatted value of this score. |
| 6267 core.String scoreString; | 6325 core.String scoreString; |
| 6268 /** | 6326 |
| 6269 * Additional information about the score. Values must contain no more than 64 | 6327 /// Additional information about the score. Values must contain no more than |
| 6270 * URI-safe characters as defined by section 2.3 of RFC 3986. | 6328 /// 64 URI-safe characters as defined by section 2.3 of RFC 3986. |
| 6271 */ | |
| 6272 core.String scoreTag; | 6329 core.String scoreTag; |
| 6273 /** The numerical value of this score. */ | 6330 |
| 6331 /// The numerical value of this score. |
| 6274 core.String scoreValue; | 6332 core.String scoreValue; |
| 6275 /** The social rank of the score in this leaderboard. */ | 6333 |
| 6334 /// The social rank of the score in this leaderboard. |
| 6276 LeaderboardScoreRank socialRank; | 6335 LeaderboardScoreRank socialRank; |
| 6277 /** | 6336 |
| 6278 * The time span of this score. | 6337 /// The time span of this score. |
| 6279 * Possible values are: | 6338 /// Possible values are: |
| 6280 * - "ALL_TIME" - The score is an all-time score. | 6339 /// - "ALL_TIME" - The score is an all-time score. |
| 6281 * - "WEEKLY" - The score is a weekly score. | 6340 /// - "WEEKLY" - The score is a weekly score. |
| 6282 * - "DAILY" - The score is a daily score. | 6341 /// - "DAILY" - The score is a daily score. |
| 6283 */ | |
| 6284 core.String timeSpan; | 6342 core.String timeSpan; |
| 6285 /** | 6343 |
| 6286 * The timestamp at which this score was recorded, in milliseconds since the | 6344 /// The timestamp at which this score was recorded, in milliseconds since the |
| 6287 * epoch in UTC. | 6345 /// epoch in UTC. |
| 6288 */ | |
| 6289 core.String writeTimestamp; | 6346 core.String writeTimestamp; |
| 6290 | 6347 |
| 6291 PlayerLeaderboardScore(); | 6348 PlayerLeaderboardScore(); |
| 6292 | 6349 |
| 6293 PlayerLeaderboardScore.fromJson(core.Map _json) { | 6350 PlayerLeaderboardScore.fromJson(core.Map _json) { |
| 6294 if (_json.containsKey("kind")) { | 6351 if (_json.containsKey("kind")) { |
| 6295 kind = _json["kind"]; | 6352 kind = _json["kind"]; |
| 6296 } | 6353 } |
| 6297 if (_json.containsKey("leaderboard_id")) { | 6354 if (_json.containsKey("leaderboard_id")) { |
| 6298 leaderboardId = _json["leaderboard_id"]; | 6355 leaderboardId = _json["leaderboard_id"]; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 6314 } | 6371 } |
| 6315 if (_json.containsKey("timeSpan")) { | 6372 if (_json.containsKey("timeSpan")) { |
| 6316 timeSpan = _json["timeSpan"]; | 6373 timeSpan = _json["timeSpan"]; |
| 6317 } | 6374 } |
| 6318 if (_json.containsKey("writeTimestamp")) { | 6375 if (_json.containsKey("writeTimestamp")) { |
| 6319 writeTimestamp = _json["writeTimestamp"]; | 6376 writeTimestamp = _json["writeTimestamp"]; |
| 6320 } | 6377 } |
| 6321 } | 6378 } |
| 6322 | 6379 |
| 6323 core.Map<core.String, core.Object> toJson() { | 6380 core.Map<core.String, core.Object> toJson() { |
| 6324 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6381 final core.Map<core.String, core.Object> _json = |
| 6382 new core.Map<core.String, core.Object>(); |
| 6325 if (kind != null) { | 6383 if (kind != null) { |
| 6326 _json["kind"] = kind; | 6384 _json["kind"] = kind; |
| 6327 } | 6385 } |
| 6328 if (leaderboardId != null) { | 6386 if (leaderboardId != null) { |
| 6329 _json["leaderboard_id"] = leaderboardId; | 6387 _json["leaderboard_id"] = leaderboardId; |
| 6330 } | 6388 } |
| 6331 if (publicRank != null) { | 6389 if (publicRank != null) { |
| 6332 _json["publicRank"] = (publicRank).toJson(); | 6390 _json["publicRank"] = (publicRank).toJson(); |
| 6333 } | 6391 } |
| 6334 if (scoreString != null) { | 6392 if (scoreString != null) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 6346 if (timeSpan != null) { | 6404 if (timeSpan != null) { |
| 6347 _json["timeSpan"] = timeSpan; | 6405 _json["timeSpan"] = timeSpan; |
| 6348 } | 6406 } |
| 6349 if (writeTimestamp != null) { | 6407 if (writeTimestamp != null) { |
| 6350 _json["writeTimestamp"] = writeTimestamp; | 6408 _json["writeTimestamp"] = writeTimestamp; |
| 6351 } | 6409 } |
| 6352 return _json; | 6410 return _json; |
| 6353 } | 6411 } |
| 6354 } | 6412 } |
| 6355 | 6413 |
| 6356 /** This is a JSON template for a list of player leaderboard scores. */ | 6414 /// This is a JSON template for a list of player leaderboard scores. |
| 6357 class PlayerLeaderboardScoreListResponse { | 6415 class PlayerLeaderboardScoreListResponse { |
| 6358 /** The leaderboard scores. */ | 6416 /// The leaderboard scores. |
| 6359 core.List<PlayerLeaderboardScore> items; | 6417 core.List<PlayerLeaderboardScore> items; |
| 6360 /** | 6418 |
| 6361 * Uniquely identifies the type of this resource. Value is always the fixed | 6419 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6362 * string games#playerLeaderboardScoreListResponse. | 6420 /// string games#playerLeaderboardScoreListResponse. |
| 6363 */ | |
| 6364 core.String kind; | 6421 core.String kind; |
| 6365 /** The pagination token for the next page of results. */ | 6422 |
| 6423 /// The pagination token for the next page of results. |
| 6366 core.String nextPageToken; | 6424 core.String nextPageToken; |
| 6367 /** The Player resources for the owner of this score. */ | 6425 |
| 6426 /// The Player resources for the owner of this score. |
| 6368 Player player; | 6427 Player player; |
| 6369 | 6428 |
| 6370 PlayerLeaderboardScoreListResponse(); | 6429 PlayerLeaderboardScoreListResponse(); |
| 6371 | 6430 |
| 6372 PlayerLeaderboardScoreListResponse.fromJson(core.Map _json) { | 6431 PlayerLeaderboardScoreListResponse.fromJson(core.Map _json) { |
| 6373 if (_json.containsKey("items")) { | 6432 if (_json.containsKey("items")) { |
| 6374 items = _json["items"].map((value) => new PlayerLeaderboardScore.fromJson(
value)).toList(); | 6433 items = _json["items"] |
| 6434 .map((value) => new PlayerLeaderboardScore.fromJson(value)) |
| 6435 .toList(); |
| 6375 } | 6436 } |
| 6376 if (_json.containsKey("kind")) { | 6437 if (_json.containsKey("kind")) { |
| 6377 kind = _json["kind"]; | 6438 kind = _json["kind"]; |
| 6378 } | 6439 } |
| 6379 if (_json.containsKey("nextPageToken")) { | 6440 if (_json.containsKey("nextPageToken")) { |
| 6380 nextPageToken = _json["nextPageToken"]; | 6441 nextPageToken = _json["nextPageToken"]; |
| 6381 } | 6442 } |
| 6382 if (_json.containsKey("player")) { | 6443 if (_json.containsKey("player")) { |
| 6383 player = new Player.fromJson(_json["player"]); | 6444 player = new Player.fromJson(_json["player"]); |
| 6384 } | 6445 } |
| 6385 } | 6446 } |
| 6386 | 6447 |
| 6387 core.Map<core.String, core.Object> toJson() { | 6448 core.Map<core.String, core.Object> toJson() { |
| 6388 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6449 final core.Map<core.String, core.Object> _json = |
| 6450 new core.Map<core.String, core.Object>(); |
| 6389 if (items != null) { | 6451 if (items != null) { |
| 6390 _json["items"] = items.map((value) => (value).toJson()).toList(); | 6452 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 6391 } | 6453 } |
| 6392 if (kind != null) { | 6454 if (kind != null) { |
| 6393 _json["kind"] = kind; | 6455 _json["kind"] = kind; |
| 6394 } | 6456 } |
| 6395 if (nextPageToken != null) { | 6457 if (nextPageToken != null) { |
| 6396 _json["nextPageToken"] = nextPageToken; | 6458 _json["nextPageToken"] = nextPageToken; |
| 6397 } | 6459 } |
| 6398 if (player != null) { | 6460 if (player != null) { |
| 6399 _json["player"] = (player).toJson(); | 6461 _json["player"] = (player).toJson(); |
| 6400 } | 6462 } |
| 6401 return _json; | 6463 return _json; |
| 6402 } | 6464 } |
| 6403 } | 6465 } |
| 6404 | 6466 |
| 6405 /** This is a JSON template for 1P/3P metadata about a user's level. */ | 6467 /// This is a JSON template for 1P/3P metadata about a user's level. |
| 6406 class PlayerLevel { | 6468 class PlayerLevel { |
| 6407 /** | 6469 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6408 * Uniquely identifies the type of this resource. Value is always the fixed | 6470 /// string games#playerLevel. |
| 6409 * string games#playerLevel. | |
| 6410 */ | |
| 6411 core.String kind; | 6471 core.String kind; |
| 6412 /** The level for the user. */ | 6472 |
| 6473 /// The level for the user. |
| 6413 core.int level; | 6474 core.int level; |
| 6414 /** The maximum experience points for this level. */ | 6475 |
| 6476 /// The maximum experience points for this level. |
| 6415 core.String maxExperiencePoints; | 6477 core.String maxExperiencePoints; |
| 6416 /** The minimum experience points for this level. */ | 6478 |
| 6479 /// The minimum experience points for this level. |
| 6417 core.String minExperiencePoints; | 6480 core.String minExperiencePoints; |
| 6418 | 6481 |
| 6419 PlayerLevel(); | 6482 PlayerLevel(); |
| 6420 | 6483 |
| 6421 PlayerLevel.fromJson(core.Map _json) { | 6484 PlayerLevel.fromJson(core.Map _json) { |
| 6422 if (_json.containsKey("kind")) { | 6485 if (_json.containsKey("kind")) { |
| 6423 kind = _json["kind"]; | 6486 kind = _json["kind"]; |
| 6424 } | 6487 } |
| 6425 if (_json.containsKey("level")) { | 6488 if (_json.containsKey("level")) { |
| 6426 level = _json["level"]; | 6489 level = _json["level"]; |
| 6427 } | 6490 } |
| 6428 if (_json.containsKey("maxExperiencePoints")) { | 6491 if (_json.containsKey("maxExperiencePoints")) { |
| 6429 maxExperiencePoints = _json["maxExperiencePoints"]; | 6492 maxExperiencePoints = _json["maxExperiencePoints"]; |
| 6430 } | 6493 } |
| 6431 if (_json.containsKey("minExperiencePoints")) { | 6494 if (_json.containsKey("minExperiencePoints")) { |
| 6432 minExperiencePoints = _json["minExperiencePoints"]; | 6495 minExperiencePoints = _json["minExperiencePoints"]; |
| 6433 } | 6496 } |
| 6434 } | 6497 } |
| 6435 | 6498 |
| 6436 core.Map<core.String, core.Object> toJson() { | 6499 core.Map<core.String, core.Object> toJson() { |
| 6437 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6500 final core.Map<core.String, core.Object> _json = |
| 6501 new core.Map<core.String, core.Object>(); |
| 6438 if (kind != null) { | 6502 if (kind != null) { |
| 6439 _json["kind"] = kind; | 6503 _json["kind"] = kind; |
| 6440 } | 6504 } |
| 6441 if (level != null) { | 6505 if (level != null) { |
| 6442 _json["level"] = level; | 6506 _json["level"] = level; |
| 6443 } | 6507 } |
| 6444 if (maxExperiencePoints != null) { | 6508 if (maxExperiencePoints != null) { |
| 6445 _json["maxExperiencePoints"] = maxExperiencePoints; | 6509 _json["maxExperiencePoints"] = maxExperiencePoints; |
| 6446 } | 6510 } |
| 6447 if (minExperiencePoints != null) { | 6511 if (minExperiencePoints != null) { |
| 6448 _json["minExperiencePoints"] = minExperiencePoints; | 6512 _json["minExperiencePoints"] = minExperiencePoints; |
| 6449 } | 6513 } |
| 6450 return _json; | 6514 return _json; |
| 6451 } | 6515 } |
| 6452 } | 6516 } |
| 6453 | 6517 |
| 6454 /** This is a JSON template for a third party player list response. */ | 6518 /// This is a JSON template for a third party player list response. |
| 6455 class PlayerListResponse { | 6519 class PlayerListResponse { |
| 6456 /** The players. */ | 6520 /// The players. |
| 6457 core.List<Player> items; | 6521 core.List<Player> items; |
| 6458 /** | 6522 |
| 6459 * Uniquely identifies the type of this resource. Value is always the fixed | 6523 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6460 * string games#playerListResponse. | 6524 /// string games#playerListResponse. |
| 6461 */ | |
| 6462 core.String kind; | 6525 core.String kind; |
| 6463 /** Token corresponding to the next page of results. */ | 6526 |
| 6527 /// Token corresponding to the next page of results. |
| 6464 core.String nextPageToken; | 6528 core.String nextPageToken; |
| 6465 | 6529 |
| 6466 PlayerListResponse(); | 6530 PlayerListResponse(); |
| 6467 | 6531 |
| 6468 PlayerListResponse.fromJson(core.Map _json) { | 6532 PlayerListResponse.fromJson(core.Map _json) { |
| 6469 if (_json.containsKey("items")) { | 6533 if (_json.containsKey("items")) { |
| 6470 items = _json["items"].map((value) => new Player.fromJson(value)).toList()
; | 6534 items = |
| 6535 _json["items"].map((value) => new Player.fromJson(value)).toList(); |
| 6471 } | 6536 } |
| 6472 if (_json.containsKey("kind")) { | 6537 if (_json.containsKey("kind")) { |
| 6473 kind = _json["kind"]; | 6538 kind = _json["kind"]; |
| 6474 } | 6539 } |
| 6475 if (_json.containsKey("nextPageToken")) { | 6540 if (_json.containsKey("nextPageToken")) { |
| 6476 nextPageToken = _json["nextPageToken"]; | 6541 nextPageToken = _json["nextPageToken"]; |
| 6477 } | 6542 } |
| 6478 } | 6543 } |
| 6479 | 6544 |
| 6480 core.Map<core.String, core.Object> toJson() { | 6545 core.Map<core.String, core.Object> toJson() { |
| 6481 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6546 final core.Map<core.String, core.Object> _json = |
| 6547 new core.Map<core.String, core.Object>(); |
| 6482 if (items != null) { | 6548 if (items != null) { |
| 6483 _json["items"] = items.map((value) => (value).toJson()).toList(); | 6549 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 6484 } | 6550 } |
| 6485 if (kind != null) { | 6551 if (kind != null) { |
| 6486 _json["kind"] = kind; | 6552 _json["kind"] = kind; |
| 6487 } | 6553 } |
| 6488 if (nextPageToken != null) { | 6554 if (nextPageToken != null) { |
| 6489 _json["nextPageToken"] = nextPageToken; | 6555 _json["nextPageToken"] = nextPageToken; |
| 6490 } | 6556 } |
| 6491 return _json; | 6557 return _json; |
| 6492 } | 6558 } |
| 6493 } | 6559 } |
| 6494 | 6560 |
| 6495 /** This is a JSON template for a player score. */ | 6561 /// This is a JSON template for a player score. |
| 6496 class PlayerScore { | 6562 class PlayerScore { |
| 6497 /** The formatted score for this player score. */ | 6563 /// The formatted score for this player score. |
| 6498 core.String formattedScore; | 6564 core.String formattedScore; |
| 6499 /** | 6565 |
| 6500 * Uniquely identifies the type of this resource. Value is always the fixed | 6566 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6501 * string games#playerScore. | 6567 /// string games#playerScore. |
| 6502 */ | |
| 6503 core.String kind; | 6568 core.String kind; |
| 6504 /** The numerical value for this player score. */ | 6569 |
| 6570 /// The numerical value for this player score. |
| 6505 core.String score; | 6571 core.String score; |
| 6506 /** | 6572 |
| 6507 * Additional information about this score. Values will contain no more than | 6573 /// Additional information about this score. Values will contain no more than |
| 6508 * 64 URI-safe characters as defined by section 2.3 of RFC 3986. | 6574 /// 64 URI-safe characters as defined by section 2.3 of RFC 3986. |
| 6509 */ | |
| 6510 core.String scoreTag; | 6575 core.String scoreTag; |
| 6511 /** | 6576 |
| 6512 * The time span for this player score. | 6577 /// The time span for this player score. |
| 6513 * Possible values are: | 6578 /// Possible values are: |
| 6514 * - "ALL_TIME" - The score is an all-time score. | 6579 /// - "ALL_TIME" - The score is an all-time score. |
| 6515 * - "WEEKLY" - The score is a weekly score. | 6580 /// - "WEEKLY" - The score is a weekly score. |
| 6516 * - "DAILY" - The score is a daily score. | 6581 /// - "DAILY" - The score is a daily score. |
| 6517 */ | |
| 6518 core.String timeSpan; | 6582 core.String timeSpan; |
| 6519 | 6583 |
| 6520 PlayerScore(); | 6584 PlayerScore(); |
| 6521 | 6585 |
| 6522 PlayerScore.fromJson(core.Map _json) { | 6586 PlayerScore.fromJson(core.Map _json) { |
| 6523 if (_json.containsKey("formattedScore")) { | 6587 if (_json.containsKey("formattedScore")) { |
| 6524 formattedScore = _json["formattedScore"]; | 6588 formattedScore = _json["formattedScore"]; |
| 6525 } | 6589 } |
| 6526 if (_json.containsKey("kind")) { | 6590 if (_json.containsKey("kind")) { |
| 6527 kind = _json["kind"]; | 6591 kind = _json["kind"]; |
| 6528 } | 6592 } |
| 6529 if (_json.containsKey("score")) { | 6593 if (_json.containsKey("score")) { |
| 6530 score = _json["score"]; | 6594 score = _json["score"]; |
| 6531 } | 6595 } |
| 6532 if (_json.containsKey("scoreTag")) { | 6596 if (_json.containsKey("scoreTag")) { |
| 6533 scoreTag = _json["scoreTag"]; | 6597 scoreTag = _json["scoreTag"]; |
| 6534 } | 6598 } |
| 6535 if (_json.containsKey("timeSpan")) { | 6599 if (_json.containsKey("timeSpan")) { |
| 6536 timeSpan = _json["timeSpan"]; | 6600 timeSpan = _json["timeSpan"]; |
| 6537 } | 6601 } |
| 6538 } | 6602 } |
| 6539 | 6603 |
| 6540 core.Map<core.String, core.Object> toJson() { | 6604 core.Map<core.String, core.Object> toJson() { |
| 6541 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6605 final core.Map<core.String, core.Object> _json = |
| 6606 new core.Map<core.String, core.Object>(); |
| 6542 if (formattedScore != null) { | 6607 if (formattedScore != null) { |
| 6543 _json["formattedScore"] = formattedScore; | 6608 _json["formattedScore"] = formattedScore; |
| 6544 } | 6609 } |
| 6545 if (kind != null) { | 6610 if (kind != null) { |
| 6546 _json["kind"] = kind; | 6611 _json["kind"] = kind; |
| 6547 } | 6612 } |
| 6548 if (score != null) { | 6613 if (score != null) { |
| 6549 _json["score"] = score; | 6614 _json["score"] = score; |
| 6550 } | 6615 } |
| 6551 if (scoreTag != null) { | 6616 if (scoreTag != null) { |
| 6552 _json["scoreTag"] = scoreTag; | 6617 _json["scoreTag"] = scoreTag; |
| 6553 } | 6618 } |
| 6554 if (timeSpan != null) { | 6619 if (timeSpan != null) { |
| 6555 _json["timeSpan"] = timeSpan; | 6620 _json["timeSpan"] = timeSpan; |
| 6556 } | 6621 } |
| 6557 return _json; | 6622 return _json; |
| 6558 } | 6623 } |
| 6559 } | 6624 } |
| 6560 | 6625 |
| 6561 /** This is a JSON template for a list of score submission statuses. */ | 6626 /// This is a JSON template for a list of score submission statuses. |
| 6562 class PlayerScoreListResponse { | 6627 class PlayerScoreListResponse { |
| 6563 /** | 6628 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6564 * Uniquely identifies the type of this resource. Value is always the fixed | 6629 /// string games#playerScoreListResponse. |
| 6565 * string games#playerScoreListResponse. | |
| 6566 */ | |
| 6567 core.String kind; | 6630 core.String kind; |
| 6568 /** The score submissions statuses. */ | 6631 |
| 6632 /// The score submissions statuses. |
| 6569 core.List<PlayerScoreResponse> submittedScores; | 6633 core.List<PlayerScoreResponse> submittedScores; |
| 6570 | 6634 |
| 6571 PlayerScoreListResponse(); | 6635 PlayerScoreListResponse(); |
| 6572 | 6636 |
| 6573 PlayerScoreListResponse.fromJson(core.Map _json) { | 6637 PlayerScoreListResponse.fromJson(core.Map _json) { |
| 6574 if (_json.containsKey("kind")) { | 6638 if (_json.containsKey("kind")) { |
| 6575 kind = _json["kind"]; | 6639 kind = _json["kind"]; |
| 6576 } | 6640 } |
| 6577 if (_json.containsKey("submittedScores")) { | 6641 if (_json.containsKey("submittedScores")) { |
| 6578 submittedScores = _json["submittedScores"].map((value) => new PlayerScoreR
esponse.fromJson(value)).toList(); | 6642 submittedScores = _json["submittedScores"] |
| 6643 .map((value) => new PlayerScoreResponse.fromJson(value)) |
| 6644 .toList(); |
| 6579 } | 6645 } |
| 6580 } | 6646 } |
| 6581 | 6647 |
| 6582 core.Map<core.String, core.Object> toJson() { | 6648 core.Map<core.String, core.Object> toJson() { |
| 6583 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6649 final core.Map<core.String, core.Object> _json = |
| 6650 new core.Map<core.String, core.Object>(); |
| 6584 if (kind != null) { | 6651 if (kind != null) { |
| 6585 _json["kind"] = kind; | 6652 _json["kind"] = kind; |
| 6586 } | 6653 } |
| 6587 if (submittedScores != null) { | 6654 if (submittedScores != null) { |
| 6588 _json["submittedScores"] = submittedScores.map((value) => (value).toJson()
).toList(); | 6655 _json["submittedScores"] = |
| 6656 submittedScores.map((value) => (value).toJson()).toList(); |
| 6589 } | 6657 } |
| 6590 return _json; | 6658 return _json; |
| 6591 } | 6659 } |
| 6592 } | 6660 } |
| 6593 | 6661 |
| 6594 /** This is a JSON template for a list of leaderboard entry resources. */ | 6662 /// This is a JSON template for a list of leaderboard entry resources. |
| 6595 class PlayerScoreResponse { | 6663 class PlayerScoreResponse { |
| 6596 /** | 6664 /// The time spans where the submitted score is better than the existing |
| 6597 * The time spans where the submitted score is better than the existing score | 6665 /// score for that time span. |
| 6598 * for that time span. | 6666 /// Possible values are: |
| 6599 * Possible values are: | 6667 /// - "ALL_TIME" - The score is an all-time score. |
| 6600 * - "ALL_TIME" - The score is an all-time score. | 6668 /// - "WEEKLY" - The score is a weekly score. |
| 6601 * - "WEEKLY" - The score is a weekly score. | 6669 /// - "DAILY" - The score is a daily score. |
| 6602 * - "DAILY" - The score is a daily score. | |
| 6603 */ | |
| 6604 core.List<core.String> beatenScoreTimeSpans; | 6670 core.List<core.String> beatenScoreTimeSpans; |
| 6605 /** The formatted value of the submitted score. */ | 6671 |
| 6672 /// The formatted value of the submitted score. |
| 6606 core.String formattedScore; | 6673 core.String formattedScore; |
| 6607 /** | 6674 |
| 6608 * Uniquely identifies the type of this resource. Value is always the fixed | 6675 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6609 * string games#playerScoreResponse. | 6676 /// string games#playerScoreResponse. |
| 6610 */ | |
| 6611 core.String kind; | 6677 core.String kind; |
| 6612 /** The leaderboard ID that this score was submitted to. */ | 6678 |
| 6679 /// The leaderboard ID that this score was submitted to. |
| 6613 core.String leaderboardId; | 6680 core.String leaderboardId; |
| 6614 /** | 6681 |
| 6615 * Additional information about this score. Values will contain no more than | 6682 /// Additional information about this score. Values will contain no more than |
| 6616 * 64 URI-safe characters as defined by section 2.3 of RFC 3986. | 6683 /// 64 URI-safe characters as defined by section 2.3 of RFC 3986. |
| 6617 */ | |
| 6618 core.String scoreTag; | 6684 core.String scoreTag; |
| 6619 /** | 6685 |
| 6620 * The scores in time spans that have not been beaten. As an example, the | 6686 /// The scores in time spans that have not been beaten. As an example, the |
| 6621 * submitted score may be better than the player's DAILY score, but not better | 6687 /// submitted score may be better than the player's DAILY score, but not |
| 6622 * than the player's scores for the WEEKLY or ALL_TIME time spans. | 6688 /// better than the player's scores for the WEEKLY or ALL_TIME time spans. |
| 6623 */ | |
| 6624 core.List<PlayerScore> unbeatenScores; | 6689 core.List<PlayerScore> unbeatenScores; |
| 6625 | 6690 |
| 6626 PlayerScoreResponse(); | 6691 PlayerScoreResponse(); |
| 6627 | 6692 |
| 6628 PlayerScoreResponse.fromJson(core.Map _json) { | 6693 PlayerScoreResponse.fromJson(core.Map _json) { |
| 6629 if (_json.containsKey("beatenScoreTimeSpans")) { | 6694 if (_json.containsKey("beatenScoreTimeSpans")) { |
| 6630 beatenScoreTimeSpans = _json["beatenScoreTimeSpans"]; | 6695 beatenScoreTimeSpans = _json["beatenScoreTimeSpans"]; |
| 6631 } | 6696 } |
| 6632 if (_json.containsKey("formattedScore")) { | 6697 if (_json.containsKey("formattedScore")) { |
| 6633 formattedScore = _json["formattedScore"]; | 6698 formattedScore = _json["formattedScore"]; |
| 6634 } | 6699 } |
| 6635 if (_json.containsKey("kind")) { | 6700 if (_json.containsKey("kind")) { |
| 6636 kind = _json["kind"]; | 6701 kind = _json["kind"]; |
| 6637 } | 6702 } |
| 6638 if (_json.containsKey("leaderboardId")) { | 6703 if (_json.containsKey("leaderboardId")) { |
| 6639 leaderboardId = _json["leaderboardId"]; | 6704 leaderboardId = _json["leaderboardId"]; |
| 6640 } | 6705 } |
| 6641 if (_json.containsKey("scoreTag")) { | 6706 if (_json.containsKey("scoreTag")) { |
| 6642 scoreTag = _json["scoreTag"]; | 6707 scoreTag = _json["scoreTag"]; |
| 6643 } | 6708 } |
| 6644 if (_json.containsKey("unbeatenScores")) { | 6709 if (_json.containsKey("unbeatenScores")) { |
| 6645 unbeatenScores = _json["unbeatenScores"].map((value) => new PlayerScore.fr
omJson(value)).toList(); | 6710 unbeatenScores = _json["unbeatenScores"] |
| 6711 .map((value) => new PlayerScore.fromJson(value)) |
| 6712 .toList(); |
| 6646 } | 6713 } |
| 6647 } | 6714 } |
| 6648 | 6715 |
| 6649 core.Map<core.String, core.Object> toJson() { | 6716 core.Map<core.String, core.Object> toJson() { |
| 6650 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6717 final core.Map<core.String, core.Object> _json = |
| 6718 new core.Map<core.String, core.Object>(); |
| 6651 if (beatenScoreTimeSpans != null) { | 6719 if (beatenScoreTimeSpans != null) { |
| 6652 _json["beatenScoreTimeSpans"] = beatenScoreTimeSpans; | 6720 _json["beatenScoreTimeSpans"] = beatenScoreTimeSpans; |
| 6653 } | 6721 } |
| 6654 if (formattedScore != null) { | 6722 if (formattedScore != null) { |
| 6655 _json["formattedScore"] = formattedScore; | 6723 _json["formattedScore"] = formattedScore; |
| 6656 } | 6724 } |
| 6657 if (kind != null) { | 6725 if (kind != null) { |
| 6658 _json["kind"] = kind; | 6726 _json["kind"] = kind; |
| 6659 } | 6727 } |
| 6660 if (leaderboardId != null) { | 6728 if (leaderboardId != null) { |
| 6661 _json["leaderboardId"] = leaderboardId; | 6729 _json["leaderboardId"] = leaderboardId; |
| 6662 } | 6730 } |
| 6663 if (scoreTag != null) { | 6731 if (scoreTag != null) { |
| 6664 _json["scoreTag"] = scoreTag; | 6732 _json["scoreTag"] = scoreTag; |
| 6665 } | 6733 } |
| 6666 if (unbeatenScores != null) { | 6734 if (unbeatenScores != null) { |
| 6667 _json["unbeatenScores"] = unbeatenScores.map((value) => (value).toJson()).
toList(); | 6735 _json["unbeatenScores"] = |
| 6736 unbeatenScores.map((value) => (value).toJson()).toList(); |
| 6668 } | 6737 } |
| 6669 return _json; | 6738 return _json; |
| 6670 } | 6739 } |
| 6671 } | 6740 } |
| 6672 | 6741 |
| 6673 /** This is a JSON template for a list of score submission requests */ | 6742 /// This is a JSON template for a list of score submission requests |
| 6674 class PlayerScoreSubmissionList { | 6743 class PlayerScoreSubmissionList { |
| 6675 /** | 6744 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6676 * Uniquely identifies the type of this resource. Value is always the fixed | 6745 /// string games#playerScoreSubmissionList. |
| 6677 * string games#playerScoreSubmissionList. | |
| 6678 */ | |
| 6679 core.String kind; | 6746 core.String kind; |
| 6680 /** The score submissions. */ | 6747 |
| 6748 /// The score submissions. |
| 6681 core.List<ScoreSubmission> scores; | 6749 core.List<ScoreSubmission> scores; |
| 6682 | 6750 |
| 6683 PlayerScoreSubmissionList(); | 6751 PlayerScoreSubmissionList(); |
| 6684 | 6752 |
| 6685 PlayerScoreSubmissionList.fromJson(core.Map _json) { | 6753 PlayerScoreSubmissionList.fromJson(core.Map _json) { |
| 6686 if (_json.containsKey("kind")) { | 6754 if (_json.containsKey("kind")) { |
| 6687 kind = _json["kind"]; | 6755 kind = _json["kind"]; |
| 6688 } | 6756 } |
| 6689 if (_json.containsKey("scores")) { | 6757 if (_json.containsKey("scores")) { |
| 6690 scores = _json["scores"].map((value) => new ScoreSubmission.fromJson(value
)).toList(); | 6758 scores = _json["scores"] |
| 6759 .map((value) => new ScoreSubmission.fromJson(value)) |
| 6760 .toList(); |
| 6691 } | 6761 } |
| 6692 } | 6762 } |
| 6693 | 6763 |
| 6694 core.Map<core.String, core.Object> toJson() { | 6764 core.Map<core.String, core.Object> toJson() { |
| 6695 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6765 final core.Map<core.String, core.Object> _json = |
| 6766 new core.Map<core.String, core.Object>(); |
| 6696 if (kind != null) { | 6767 if (kind != null) { |
| 6697 _json["kind"] = kind; | 6768 _json["kind"] = kind; |
| 6698 } | 6769 } |
| 6699 if (scores != null) { | 6770 if (scores != null) { |
| 6700 _json["scores"] = scores.map((value) => (value).toJson()).toList(); | 6771 _json["scores"] = scores.map((value) => (value).toJson()).toList(); |
| 6701 } | 6772 } |
| 6702 return _json; | 6773 return _json; |
| 6703 } | 6774 } |
| 6704 } | 6775 } |
| 6705 | 6776 |
| 6706 /** This is a JSON template for profile settings */ | 6777 /// This is a JSON template for profile settings |
| 6707 class ProfileSettings { | 6778 class ProfileSettings { |
| 6708 /** | 6779 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6709 * Uniquely identifies the type of this resource. Value is always the fixed | 6780 /// string games#profileSettings. |
| 6710 * string games#profileSettings. | |
| 6711 */ | |
| 6712 core.String kind; | 6781 core.String kind; |
| 6713 /** | 6782 |
| 6714 * The player's current profile visibility. This field is visible to both 1P | 6783 /// The player's current profile visibility. This field is visible to both 1P |
| 6715 * and 3P APIs. | 6784 /// and 3P APIs. |
| 6716 */ | |
| 6717 core.bool profileVisible; | 6785 core.bool profileVisible; |
| 6718 | 6786 |
| 6719 ProfileSettings(); | 6787 ProfileSettings(); |
| 6720 | 6788 |
| 6721 ProfileSettings.fromJson(core.Map _json) { | 6789 ProfileSettings.fromJson(core.Map _json) { |
| 6722 if (_json.containsKey("kind")) { | 6790 if (_json.containsKey("kind")) { |
| 6723 kind = _json["kind"]; | 6791 kind = _json["kind"]; |
| 6724 } | 6792 } |
| 6725 if (_json.containsKey("profileVisible")) { | 6793 if (_json.containsKey("profileVisible")) { |
| 6726 profileVisible = _json["profileVisible"]; | 6794 profileVisible = _json["profileVisible"]; |
| 6727 } | 6795 } |
| 6728 } | 6796 } |
| 6729 | 6797 |
| 6730 core.Map<core.String, core.Object> toJson() { | 6798 core.Map<core.String, core.Object> toJson() { |
| 6731 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6799 final core.Map<core.String, core.Object> _json = |
| 6800 new core.Map<core.String, core.Object>(); |
| 6732 if (kind != null) { | 6801 if (kind != null) { |
| 6733 _json["kind"] = kind; | 6802 _json["kind"] = kind; |
| 6734 } | 6803 } |
| 6735 if (profileVisible != null) { | 6804 if (profileVisible != null) { |
| 6736 _json["profileVisible"] = profileVisible; | 6805 _json["profileVisible"] = profileVisible; |
| 6737 } | 6806 } |
| 6738 return _json; | 6807 return _json; |
| 6739 } | 6808 } |
| 6740 } | 6809 } |
| 6741 | 6810 |
| 6742 /** This is a JSON template for a push token resource. */ | 6811 /// This is a JSON template for a push token resource. |
| 6743 class PushToken { | 6812 class PushToken { |
| 6744 /** | 6813 /// The revision of the client SDK used by your application, in the same |
| 6745 * The revision of the client SDK used by your application, in the same format | 6814 /// format that's used by revisions.check. Used to send backward compatible |
| 6746 * that's used by revisions.check. Used to send backward compatible messages. | 6815 /// messages. Format: [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of |
| 6747 * Format: [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE | 6816 /// PLATFORM_TYPE are: |
| 6748 * are: | 6817 /// - IOS - Push token is for iOS |
| 6749 * - IOS - Push token is for iOS | |
| 6750 */ | |
| 6751 core.String clientRevision; | 6818 core.String clientRevision; |
| 6752 /** Unique identifier for this push token. */ | 6819 |
| 6820 /// Unique identifier for this push token. |
| 6753 PushTokenId id; | 6821 PushTokenId id; |
| 6754 /** | 6822 |
| 6755 * Uniquely identifies the type of this resource. Value is always the fixed | 6823 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6756 * string games#pushToken. | 6824 /// string games#pushToken. |
| 6757 */ | |
| 6758 core.String kind; | 6825 core.String kind; |
| 6759 /** | 6826 |
| 6760 * The preferred language for notifications that are sent using this token. | 6827 /// The preferred language for notifications that are sent using this token. |
| 6761 */ | |
| 6762 core.String language; | 6828 core.String language; |
| 6763 | 6829 |
| 6764 PushToken(); | 6830 PushToken(); |
| 6765 | 6831 |
| 6766 PushToken.fromJson(core.Map _json) { | 6832 PushToken.fromJson(core.Map _json) { |
| 6767 if (_json.containsKey("clientRevision")) { | 6833 if (_json.containsKey("clientRevision")) { |
| 6768 clientRevision = _json["clientRevision"]; | 6834 clientRevision = _json["clientRevision"]; |
| 6769 } | 6835 } |
| 6770 if (_json.containsKey("id")) { | 6836 if (_json.containsKey("id")) { |
| 6771 id = new PushTokenId.fromJson(_json["id"]); | 6837 id = new PushTokenId.fromJson(_json["id"]); |
| 6772 } | 6838 } |
| 6773 if (_json.containsKey("kind")) { | 6839 if (_json.containsKey("kind")) { |
| 6774 kind = _json["kind"]; | 6840 kind = _json["kind"]; |
| 6775 } | 6841 } |
| 6776 if (_json.containsKey("language")) { | 6842 if (_json.containsKey("language")) { |
| 6777 language = _json["language"]; | 6843 language = _json["language"]; |
| 6778 } | 6844 } |
| 6779 } | 6845 } |
| 6780 | 6846 |
| 6781 core.Map<core.String, core.Object> toJson() { | 6847 core.Map<core.String, core.Object> toJson() { |
| 6782 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6848 final core.Map<core.String, core.Object> _json = |
| 6849 new core.Map<core.String, core.Object>(); |
| 6783 if (clientRevision != null) { | 6850 if (clientRevision != null) { |
| 6784 _json["clientRevision"] = clientRevision; | 6851 _json["clientRevision"] = clientRevision; |
| 6785 } | 6852 } |
| 6786 if (id != null) { | 6853 if (id != null) { |
| 6787 _json["id"] = (id).toJson(); | 6854 _json["id"] = (id).toJson(); |
| 6788 } | 6855 } |
| 6789 if (kind != null) { | 6856 if (kind != null) { |
| 6790 _json["kind"] = kind; | 6857 _json["kind"] = kind; |
| 6791 } | 6858 } |
| 6792 if (language != null) { | 6859 if (language != null) { |
| 6793 _json["language"] = language; | 6860 _json["language"] = language; |
| 6794 } | 6861 } |
| 6795 return _json; | 6862 return _json; |
| 6796 } | 6863 } |
| 6797 } | 6864 } |
| 6798 | 6865 |
| 6799 /** A push token ID for iOS devices. */ | 6866 /// A push token ID for iOS devices. |
| 6800 class PushTokenIdIos { | 6867 class PushTokenIdIos { |
| 6801 /** | 6868 /// Device token supplied by an iOS system call to register for remote |
| 6802 * Device token supplied by an iOS system call to register for remote | 6869 /// notifications. Encode this field as web-safe base64. |
| 6803 * notifications. Encode this field as web-safe base64. | |
| 6804 */ | |
| 6805 core.String apnsDeviceToken; | 6870 core.String apnsDeviceToken; |
| 6806 core.List<core.int> get apnsDeviceTokenAsBytes { | 6871 core.List<core.int> get apnsDeviceTokenAsBytes { |
| 6807 return convert.BASE64.decode(apnsDeviceToken); | 6872 return convert.BASE64.decode(apnsDeviceToken); |
| 6808 } | 6873 } |
| 6809 | 6874 |
| 6810 void set apnsDeviceTokenAsBytes(core.List<core.int> _bytes) { | 6875 void set apnsDeviceTokenAsBytes(core.List<core.int> _bytes) { |
| 6811 apnsDeviceToken = convert.BASE64.encode(_bytes).replaceAll("/", "_").replace
All("+", "-"); | 6876 apnsDeviceToken = |
| 6877 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
| 6812 } | 6878 } |
| 6813 /** | 6879 |
| 6814 * Indicates whether this token should be used for the production or sandbox | 6880 /// Indicates whether this token should be used for the production or sandbox |
| 6815 * APNS server. | 6881 /// APNS server. |
| 6816 */ | |
| 6817 core.String apnsEnvironment; | 6882 core.String apnsEnvironment; |
| 6818 | 6883 |
| 6819 PushTokenIdIos(); | 6884 PushTokenIdIos(); |
| 6820 | 6885 |
| 6821 PushTokenIdIos.fromJson(core.Map _json) { | 6886 PushTokenIdIos.fromJson(core.Map _json) { |
| 6822 if (_json.containsKey("apns_device_token")) { | 6887 if (_json.containsKey("apns_device_token")) { |
| 6823 apnsDeviceToken = _json["apns_device_token"]; | 6888 apnsDeviceToken = _json["apns_device_token"]; |
| 6824 } | 6889 } |
| 6825 if (_json.containsKey("apns_environment")) { | 6890 if (_json.containsKey("apns_environment")) { |
| 6826 apnsEnvironment = _json["apns_environment"]; | 6891 apnsEnvironment = _json["apns_environment"]; |
| 6827 } | 6892 } |
| 6828 } | 6893 } |
| 6829 | 6894 |
| 6830 core.Map<core.String, core.Object> toJson() { | 6895 core.Map<core.String, core.Object> toJson() { |
| 6831 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6896 final core.Map<core.String, core.Object> _json = |
| 6897 new core.Map<core.String, core.Object>(); |
| 6832 if (apnsDeviceToken != null) { | 6898 if (apnsDeviceToken != null) { |
| 6833 _json["apns_device_token"] = apnsDeviceToken; | 6899 _json["apns_device_token"] = apnsDeviceToken; |
| 6834 } | 6900 } |
| 6835 if (apnsEnvironment != null) { | 6901 if (apnsEnvironment != null) { |
| 6836 _json["apns_environment"] = apnsEnvironment; | 6902 _json["apns_environment"] = apnsEnvironment; |
| 6837 } | 6903 } |
| 6838 return _json; | 6904 return _json; |
| 6839 } | 6905 } |
| 6840 } | 6906 } |
| 6841 | 6907 |
| 6842 /** This is a JSON template for a push token ID resource. */ | 6908 /// This is a JSON template for a push token ID resource. |
| 6843 class PushTokenId { | 6909 class PushTokenId { |
| 6844 /** A push token ID for iOS devices. */ | 6910 /// A push token ID for iOS devices. |
| 6845 PushTokenIdIos ios; | 6911 PushTokenIdIos ios; |
| 6846 /** | 6912 |
| 6847 * Uniquely identifies the type of this resource. Value is always the fixed | 6913 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6848 * string games#pushTokenId. | 6914 /// string games#pushTokenId. |
| 6849 */ | |
| 6850 core.String kind; | 6915 core.String kind; |
| 6851 | 6916 |
| 6852 PushTokenId(); | 6917 PushTokenId(); |
| 6853 | 6918 |
| 6854 PushTokenId.fromJson(core.Map _json) { | 6919 PushTokenId.fromJson(core.Map _json) { |
| 6855 if (_json.containsKey("ios")) { | 6920 if (_json.containsKey("ios")) { |
| 6856 ios = new PushTokenIdIos.fromJson(_json["ios"]); | 6921 ios = new PushTokenIdIos.fromJson(_json["ios"]); |
| 6857 } | 6922 } |
| 6858 if (_json.containsKey("kind")) { | 6923 if (_json.containsKey("kind")) { |
| 6859 kind = _json["kind"]; | 6924 kind = _json["kind"]; |
| 6860 } | 6925 } |
| 6861 } | 6926 } |
| 6862 | 6927 |
| 6863 core.Map<core.String, core.Object> toJson() { | 6928 core.Map<core.String, core.Object> toJson() { |
| 6864 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6929 final core.Map<core.String, core.Object> _json = |
| 6930 new core.Map<core.String, core.Object>(); |
| 6865 if (ios != null) { | 6931 if (ios != null) { |
| 6866 _json["ios"] = (ios).toJson(); | 6932 _json["ios"] = (ios).toJson(); |
| 6867 } | 6933 } |
| 6868 if (kind != null) { | 6934 if (kind != null) { |
| 6869 _json["kind"] = kind; | 6935 _json["kind"] = kind; |
| 6870 } | 6936 } |
| 6871 return _json; | 6937 return _json; |
| 6872 } | 6938 } |
| 6873 } | 6939 } |
| 6874 | 6940 |
| 6875 /** This is a JSON template for a Quest resource. */ | 6941 /// This is a JSON template for a Quest resource. |
| 6876 class Quest { | 6942 class Quest { |
| 6877 /** | 6943 /// The timestamp at which the user accepted the quest in milliseconds since |
| 6878 * The timestamp at which the user accepted the quest in milliseconds since | 6944 /// the epoch in UTC. Only present if the player has accepted the quest. |
| 6879 * the epoch in UTC. Only present if the player has accepted the quest. | |
| 6880 */ | |
| 6881 core.String acceptedTimestampMillis; | 6945 core.String acceptedTimestampMillis; |
| 6882 /** The ID of the application this quest is part of. */ | 6946 |
| 6947 /// The ID of the application this quest is part of. |
| 6883 core.String applicationId; | 6948 core.String applicationId; |
| 6884 /** The banner image URL for the quest. */ | 6949 |
| 6950 /// The banner image URL for the quest. |
| 6885 core.String bannerUrl; | 6951 core.String bannerUrl; |
| 6886 /** The description of the quest. */ | 6952 |
| 6953 /// The description of the quest. |
| 6887 core.String description; | 6954 core.String description; |
| 6888 /** | 6955 |
| 6889 * The timestamp at which the quest ceases to be active in milliseconds since | 6956 /// The timestamp at which the quest ceases to be active in milliseconds |
| 6890 * the epoch in UTC. | 6957 /// since the epoch in UTC. |
| 6891 */ | |
| 6892 core.String endTimestampMillis; | 6958 core.String endTimestampMillis; |
| 6893 /** The icon image URL for the quest. */ | 6959 |
| 6960 /// The icon image URL for the quest. |
| 6894 core.String iconUrl; | 6961 core.String iconUrl; |
| 6895 /** The ID of the quest. */ | 6962 |
| 6963 /// The ID of the quest. |
| 6896 core.String id; | 6964 core.String id; |
| 6897 /** | 6965 |
| 6898 * Indicates whether the banner image being returned is a default image, or is | 6966 /// Indicates whether the banner image being returned is a default image, or |
| 6899 * game-provided. | 6967 /// is game-provided. |
| 6900 */ | |
| 6901 core.bool isDefaultBannerUrl; | 6968 core.bool isDefaultBannerUrl; |
| 6902 /** | 6969 |
| 6903 * Indicates whether the icon image being returned is a default image, or is | 6970 /// Indicates whether the icon image being returned is a default image, or is |
| 6904 * game-provided. | 6971 /// game-provided. |
| 6905 */ | |
| 6906 core.bool isDefaultIconUrl; | 6972 core.bool isDefaultIconUrl; |
| 6907 /** | 6973 |
| 6908 * Uniquely identifies the type of this resource. Value is always the fixed | 6974 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 6909 * string games#quest. | 6975 /// string games#quest. |
| 6910 */ | |
| 6911 core.String kind; | 6976 core.String kind; |
| 6912 /** | 6977 |
| 6913 * The timestamp at which the quest was last updated by the user in | 6978 /// The timestamp at which the quest was last updated by the user in |
| 6914 * milliseconds since the epoch in UTC. Only present if the player has | 6979 /// milliseconds since the epoch in UTC. Only present if the player has |
| 6915 * accepted the quest. | 6980 /// accepted the quest. |
| 6916 */ | |
| 6917 core.String lastUpdatedTimestampMillis; | 6981 core.String lastUpdatedTimestampMillis; |
| 6918 /** The quest milestones. */ | 6982 |
| 6983 /// The quest milestones. |
| 6919 core.List<QuestMilestone> milestones; | 6984 core.List<QuestMilestone> milestones; |
| 6920 /** The name of the quest. */ | 6985 |
| 6986 /// The name of the quest. |
| 6921 core.String name; | 6987 core.String name; |
| 6922 /** | 6988 |
| 6923 * The timestamp at which the user should be notified that the quest will end | 6989 /// The timestamp at which the user should be notified that the quest will |
| 6924 * soon in milliseconds since the epoch in UTC. | 6990 /// end soon in milliseconds since the epoch in UTC. |
| 6925 */ | |
| 6926 core.String notifyTimestampMillis; | 6991 core.String notifyTimestampMillis; |
| 6927 /** | 6992 |
| 6928 * The timestamp at which the quest becomes active in milliseconds since the | 6993 /// The timestamp at which the quest becomes active in milliseconds since the |
| 6929 * epoch in UTC. | 6994 /// epoch in UTC. |
| 6930 */ | |
| 6931 core.String startTimestampMillis; | 6995 core.String startTimestampMillis; |
| 6932 /** | 6996 |
| 6933 * The state of the quest. | 6997 /// The state of the quest. |
| 6934 * Possible values are: | 6998 /// Possible values are: |
| 6935 * - "UPCOMING": The quest is upcoming. The user can see the quest, but cannot | 6999 /// - "UPCOMING": The quest is upcoming. The user can see the quest, but |
| 6936 * accept it until it is open. | 7000 /// cannot accept it until it is open. |
| 6937 * - "OPEN": The quest is currently open and may be accepted at this time. | 7001 /// - "OPEN": The quest is currently open and may be accepted at this time. |
| 6938 * - "ACCEPTED": The user is currently participating in this quest. | 7002 /// - "ACCEPTED": The user is currently participating in this quest. |
| 6939 * - "COMPLETED": The user has completed the quest. | 7003 /// - "COMPLETED": The user has completed the quest. |
| 6940 * - "FAILED": The quest was attempted but was not completed before the | 7004 /// - "FAILED": The quest was attempted but was not completed before the |
| 6941 * deadline expired. | 7005 /// deadline expired. |
| 6942 * - "EXPIRED": The quest has expired and was not accepted. | 7006 /// - "EXPIRED": The quest has expired and was not accepted. |
| 6943 * - "DELETED": The quest should be deleted from the local database. | 7007 /// - "DELETED": The quest should be deleted from the local database. |
| 6944 */ | |
| 6945 core.String state; | 7008 core.String state; |
| 6946 | 7009 |
| 6947 Quest(); | 7010 Quest(); |
| 6948 | 7011 |
| 6949 Quest.fromJson(core.Map _json) { | 7012 Quest.fromJson(core.Map _json) { |
| 6950 if (_json.containsKey("acceptedTimestampMillis")) { | 7013 if (_json.containsKey("acceptedTimestampMillis")) { |
| 6951 acceptedTimestampMillis = _json["acceptedTimestampMillis"]; | 7014 acceptedTimestampMillis = _json["acceptedTimestampMillis"]; |
| 6952 } | 7015 } |
| 6953 if (_json.containsKey("applicationId")) { | 7016 if (_json.containsKey("applicationId")) { |
| 6954 applicationId = _json["applicationId"]; | 7017 applicationId = _json["applicationId"]; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 6974 if (_json.containsKey("isDefaultIconUrl")) { | 7037 if (_json.containsKey("isDefaultIconUrl")) { |
| 6975 isDefaultIconUrl = _json["isDefaultIconUrl"]; | 7038 isDefaultIconUrl = _json["isDefaultIconUrl"]; |
| 6976 } | 7039 } |
| 6977 if (_json.containsKey("kind")) { | 7040 if (_json.containsKey("kind")) { |
| 6978 kind = _json["kind"]; | 7041 kind = _json["kind"]; |
| 6979 } | 7042 } |
| 6980 if (_json.containsKey("lastUpdatedTimestampMillis")) { | 7043 if (_json.containsKey("lastUpdatedTimestampMillis")) { |
| 6981 lastUpdatedTimestampMillis = _json["lastUpdatedTimestampMillis"]; | 7044 lastUpdatedTimestampMillis = _json["lastUpdatedTimestampMillis"]; |
| 6982 } | 7045 } |
| 6983 if (_json.containsKey("milestones")) { | 7046 if (_json.containsKey("milestones")) { |
| 6984 milestones = _json["milestones"].map((value) => new QuestMilestone.fromJso
n(value)).toList(); | 7047 milestones = _json["milestones"] |
| 7048 .map((value) => new QuestMilestone.fromJson(value)) |
| 7049 .toList(); |
| 6985 } | 7050 } |
| 6986 if (_json.containsKey("name")) { | 7051 if (_json.containsKey("name")) { |
| 6987 name = _json["name"]; | 7052 name = _json["name"]; |
| 6988 } | 7053 } |
| 6989 if (_json.containsKey("notifyTimestampMillis")) { | 7054 if (_json.containsKey("notifyTimestampMillis")) { |
| 6990 notifyTimestampMillis = _json["notifyTimestampMillis"]; | 7055 notifyTimestampMillis = _json["notifyTimestampMillis"]; |
| 6991 } | 7056 } |
| 6992 if (_json.containsKey("startTimestampMillis")) { | 7057 if (_json.containsKey("startTimestampMillis")) { |
| 6993 startTimestampMillis = _json["startTimestampMillis"]; | 7058 startTimestampMillis = _json["startTimestampMillis"]; |
| 6994 } | 7059 } |
| 6995 if (_json.containsKey("state")) { | 7060 if (_json.containsKey("state")) { |
| 6996 state = _json["state"]; | 7061 state = _json["state"]; |
| 6997 } | 7062 } |
| 6998 } | 7063 } |
| 6999 | 7064 |
| 7000 core.Map<core.String, core.Object> toJson() { | 7065 core.Map<core.String, core.Object> toJson() { |
| 7001 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7066 final core.Map<core.String, core.Object> _json = |
| 7067 new core.Map<core.String, core.Object>(); |
| 7002 if (acceptedTimestampMillis != null) { | 7068 if (acceptedTimestampMillis != null) { |
| 7003 _json["acceptedTimestampMillis"] = acceptedTimestampMillis; | 7069 _json["acceptedTimestampMillis"] = acceptedTimestampMillis; |
| 7004 } | 7070 } |
| 7005 if (applicationId != null) { | 7071 if (applicationId != null) { |
| 7006 _json["applicationId"] = applicationId; | 7072 _json["applicationId"] = applicationId; |
| 7007 } | 7073 } |
| 7008 if (bannerUrl != null) { | 7074 if (bannerUrl != null) { |
| 7009 _json["bannerUrl"] = bannerUrl; | 7075 _json["bannerUrl"] = bannerUrl; |
| 7010 } | 7076 } |
| 7011 if (description != null) { | 7077 if (description != null) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 7026 if (isDefaultIconUrl != null) { | 7092 if (isDefaultIconUrl != null) { |
| 7027 _json["isDefaultIconUrl"] = isDefaultIconUrl; | 7093 _json["isDefaultIconUrl"] = isDefaultIconUrl; |
| 7028 } | 7094 } |
| 7029 if (kind != null) { | 7095 if (kind != null) { |
| 7030 _json["kind"] = kind; | 7096 _json["kind"] = kind; |
| 7031 } | 7097 } |
| 7032 if (lastUpdatedTimestampMillis != null) { | 7098 if (lastUpdatedTimestampMillis != null) { |
| 7033 _json["lastUpdatedTimestampMillis"] = lastUpdatedTimestampMillis; | 7099 _json["lastUpdatedTimestampMillis"] = lastUpdatedTimestampMillis; |
| 7034 } | 7100 } |
| 7035 if (milestones != null) { | 7101 if (milestones != null) { |
| 7036 _json["milestones"] = milestones.map((value) => (value).toJson()).toList()
; | 7102 _json["milestones"] = |
| 7103 milestones.map((value) => (value).toJson()).toList(); |
| 7037 } | 7104 } |
| 7038 if (name != null) { | 7105 if (name != null) { |
| 7039 _json["name"] = name; | 7106 _json["name"] = name; |
| 7040 } | 7107 } |
| 7041 if (notifyTimestampMillis != null) { | 7108 if (notifyTimestampMillis != null) { |
| 7042 _json["notifyTimestampMillis"] = notifyTimestampMillis; | 7109 _json["notifyTimestampMillis"] = notifyTimestampMillis; |
| 7043 } | 7110 } |
| 7044 if (startTimestampMillis != null) { | 7111 if (startTimestampMillis != null) { |
| 7045 _json["startTimestampMillis"] = startTimestampMillis; | 7112 _json["startTimestampMillis"] = startTimestampMillis; |
| 7046 } | 7113 } |
| 7047 if (state != null) { | 7114 if (state != null) { |
| 7048 _json["state"] = state; | 7115 _json["state"] = state; |
| 7049 } | 7116 } |
| 7050 return _json; | 7117 return _json; |
| 7051 } | 7118 } |
| 7052 } | 7119 } |
| 7053 | 7120 |
| 7054 /** This is a JSON template for a Quest Criterion Contribution resource. */ | 7121 /// This is a JSON template for a Quest Criterion Contribution resource. |
| 7055 class QuestContribution { | 7122 class QuestContribution { |
| 7056 /** | 7123 /// The formatted value of the contribution as a string. Format depends on |
| 7057 * The formatted value of the contribution as a string. Format depends on the | 7124 /// the configuration for the associated event definition in the Play Games |
| 7058 * configuration for the associated event definition in the Play Games | 7125 /// Developer Console. |
| 7059 * Developer Console. | |
| 7060 */ | |
| 7061 core.String formattedValue; | 7126 core.String formattedValue; |
| 7062 /** | 7127 |
| 7063 * Uniquely identifies the type of this resource. Value is always the fixed | 7128 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7064 * string games#questContribution. | 7129 /// string games#questContribution. |
| 7065 */ | |
| 7066 core.String kind; | 7130 core.String kind; |
| 7067 /** The value of the contribution. */ | 7131 |
| 7132 /// The value of the contribution. |
| 7068 core.String value; | 7133 core.String value; |
| 7069 | 7134 |
| 7070 QuestContribution(); | 7135 QuestContribution(); |
| 7071 | 7136 |
| 7072 QuestContribution.fromJson(core.Map _json) { | 7137 QuestContribution.fromJson(core.Map _json) { |
| 7073 if (_json.containsKey("formattedValue")) { | 7138 if (_json.containsKey("formattedValue")) { |
| 7074 formattedValue = _json["formattedValue"]; | 7139 formattedValue = _json["formattedValue"]; |
| 7075 } | 7140 } |
| 7076 if (_json.containsKey("kind")) { | 7141 if (_json.containsKey("kind")) { |
| 7077 kind = _json["kind"]; | 7142 kind = _json["kind"]; |
| 7078 } | 7143 } |
| 7079 if (_json.containsKey("value")) { | 7144 if (_json.containsKey("value")) { |
| 7080 value = _json["value"]; | 7145 value = _json["value"]; |
| 7081 } | 7146 } |
| 7082 } | 7147 } |
| 7083 | 7148 |
| 7084 core.Map<core.String, core.Object> toJson() { | 7149 core.Map<core.String, core.Object> toJson() { |
| 7085 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7150 final core.Map<core.String, core.Object> _json = |
| 7151 new core.Map<core.String, core.Object>(); |
| 7086 if (formattedValue != null) { | 7152 if (formattedValue != null) { |
| 7087 _json["formattedValue"] = formattedValue; | 7153 _json["formattedValue"] = formattedValue; |
| 7088 } | 7154 } |
| 7089 if (kind != null) { | 7155 if (kind != null) { |
| 7090 _json["kind"] = kind; | 7156 _json["kind"] = kind; |
| 7091 } | 7157 } |
| 7092 if (value != null) { | 7158 if (value != null) { |
| 7093 _json["value"] = value; | 7159 _json["value"] = value; |
| 7094 } | 7160 } |
| 7095 return _json; | 7161 return _json; |
| 7096 } | 7162 } |
| 7097 } | 7163 } |
| 7098 | 7164 |
| 7099 /** This is a JSON template for a Quest Criterion resource. */ | 7165 /// This is a JSON template for a Quest Criterion resource. |
| 7100 class QuestCriterion { | 7166 class QuestCriterion { |
| 7101 /** | 7167 /// The total number of times the associated event must be incremented for |
| 7102 * The total number of times the associated event must be incremented for the | 7168 /// the player to complete this quest. |
| 7103 * player to complete this quest. | |
| 7104 */ | |
| 7105 QuestContribution completionContribution; | 7169 QuestContribution completionContribution; |
| 7106 /** | 7170 |
| 7107 * The number of increments the player has made toward the completion count | 7171 /// The number of increments the player has made toward the completion count |
| 7108 * event increments required to complete the quest. This value will not exceed | 7172 /// event increments required to complete the quest. This value will not |
| 7109 * the completion contribution. | 7173 /// exceed the completion contribution. |
| 7110 * There will be no currentContribution until the player has accepted the | 7174 /// There will be no currentContribution until the player has accepted the |
| 7111 * quest. | 7175 /// quest. |
| 7112 */ | |
| 7113 QuestContribution currentContribution; | 7176 QuestContribution currentContribution; |
| 7114 /** The ID of the event the criterion corresponds to. */ | 7177 |
| 7178 /// The ID of the event the criterion corresponds to. |
| 7115 core.String eventId; | 7179 core.String eventId; |
| 7116 /** | 7180 |
| 7117 * The value of the event associated with this quest at the time that the | 7181 /// The value of the event associated with this quest at the time that the |
| 7118 * quest was accepted. This value may change if event increments that took | 7182 /// quest was accepted. This value may change if event increments that took |
| 7119 * place before the start of quest are uploaded after the quest starts. | 7183 /// place before the start of quest are uploaded after the quest starts. |
| 7120 * There will be no initialPlayerProgress until the player has accepted the | 7184 /// There will be no initialPlayerProgress until the player has accepted the |
| 7121 * quest. | 7185 /// quest. |
| 7122 */ | |
| 7123 QuestContribution initialPlayerProgress; | 7186 QuestContribution initialPlayerProgress; |
| 7124 /** | 7187 |
| 7125 * Uniquely identifies the type of this resource. Value is always the fixed | 7188 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7126 * string games#questCriterion. | 7189 /// string games#questCriterion. |
| 7127 */ | |
| 7128 core.String kind; | 7190 core.String kind; |
| 7129 | 7191 |
| 7130 QuestCriterion(); | 7192 QuestCriterion(); |
| 7131 | 7193 |
| 7132 QuestCriterion.fromJson(core.Map _json) { | 7194 QuestCriterion.fromJson(core.Map _json) { |
| 7133 if (_json.containsKey("completionContribution")) { | 7195 if (_json.containsKey("completionContribution")) { |
| 7134 completionContribution = new QuestContribution.fromJson(_json["completionC
ontribution"]); | 7196 completionContribution = |
| 7197 new QuestContribution.fromJson(_json["completionContribution"]); |
| 7135 } | 7198 } |
| 7136 if (_json.containsKey("currentContribution")) { | 7199 if (_json.containsKey("currentContribution")) { |
| 7137 currentContribution = new QuestContribution.fromJson(_json["currentContrib
ution"]); | 7200 currentContribution = |
| 7201 new QuestContribution.fromJson(_json["currentContribution"]); |
| 7138 } | 7202 } |
| 7139 if (_json.containsKey("eventId")) { | 7203 if (_json.containsKey("eventId")) { |
| 7140 eventId = _json["eventId"]; | 7204 eventId = _json["eventId"]; |
| 7141 } | 7205 } |
| 7142 if (_json.containsKey("initialPlayerProgress")) { | 7206 if (_json.containsKey("initialPlayerProgress")) { |
| 7143 initialPlayerProgress = new QuestContribution.fromJson(_json["initialPlaye
rProgress"]); | 7207 initialPlayerProgress = |
| 7208 new QuestContribution.fromJson(_json["initialPlayerProgress"]); |
| 7144 } | 7209 } |
| 7145 if (_json.containsKey("kind")) { | 7210 if (_json.containsKey("kind")) { |
| 7146 kind = _json["kind"]; | 7211 kind = _json["kind"]; |
| 7147 } | 7212 } |
| 7148 } | 7213 } |
| 7149 | 7214 |
| 7150 core.Map<core.String, core.Object> toJson() { | 7215 core.Map<core.String, core.Object> toJson() { |
| 7151 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7216 final core.Map<core.String, core.Object> _json = |
| 7217 new core.Map<core.String, core.Object>(); |
| 7152 if (completionContribution != null) { | 7218 if (completionContribution != null) { |
| 7153 _json["completionContribution"] = (completionContribution).toJson(); | 7219 _json["completionContribution"] = (completionContribution).toJson(); |
| 7154 } | 7220 } |
| 7155 if (currentContribution != null) { | 7221 if (currentContribution != null) { |
| 7156 _json["currentContribution"] = (currentContribution).toJson(); | 7222 _json["currentContribution"] = (currentContribution).toJson(); |
| 7157 } | 7223 } |
| 7158 if (eventId != null) { | 7224 if (eventId != null) { |
| 7159 _json["eventId"] = eventId; | 7225 _json["eventId"] = eventId; |
| 7160 } | 7226 } |
| 7161 if (initialPlayerProgress != null) { | 7227 if (initialPlayerProgress != null) { |
| 7162 _json["initialPlayerProgress"] = (initialPlayerProgress).toJson(); | 7228 _json["initialPlayerProgress"] = (initialPlayerProgress).toJson(); |
| 7163 } | 7229 } |
| 7164 if (kind != null) { | 7230 if (kind != null) { |
| 7165 _json["kind"] = kind; | 7231 _json["kind"] = kind; |
| 7166 } | 7232 } |
| 7167 return _json; | 7233 return _json; |
| 7168 } | 7234 } |
| 7169 } | 7235 } |
| 7170 | 7236 |
| 7171 /** This is a JSON template for a list of quest objects. */ | 7237 /// This is a JSON template for a list of quest objects. |
| 7172 class QuestListResponse { | 7238 class QuestListResponse { |
| 7173 /** The quests. */ | 7239 /// The quests. |
| 7174 core.List<Quest> items; | 7240 core.List<Quest> items; |
| 7175 /** | 7241 |
| 7176 * Uniquely identifies the type of this resource. Value is always the fixed | 7242 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7177 * string games#questListResponse. | 7243 /// string games#questListResponse. |
| 7178 */ | |
| 7179 core.String kind; | 7244 core.String kind; |
| 7180 /** Token corresponding to the next page of results. */ | 7245 |
| 7246 /// Token corresponding to the next page of results. |
| 7181 core.String nextPageToken; | 7247 core.String nextPageToken; |
| 7182 | 7248 |
| 7183 QuestListResponse(); | 7249 QuestListResponse(); |
| 7184 | 7250 |
| 7185 QuestListResponse.fromJson(core.Map _json) { | 7251 QuestListResponse.fromJson(core.Map _json) { |
| 7186 if (_json.containsKey("items")) { | 7252 if (_json.containsKey("items")) { |
| 7187 items = _json["items"].map((value) => new Quest.fromJson(value)).toList(); | 7253 items = _json["items"].map((value) => new Quest.fromJson(value)).toList(); |
| 7188 } | 7254 } |
| 7189 if (_json.containsKey("kind")) { | 7255 if (_json.containsKey("kind")) { |
| 7190 kind = _json["kind"]; | 7256 kind = _json["kind"]; |
| 7191 } | 7257 } |
| 7192 if (_json.containsKey("nextPageToken")) { | 7258 if (_json.containsKey("nextPageToken")) { |
| 7193 nextPageToken = _json["nextPageToken"]; | 7259 nextPageToken = _json["nextPageToken"]; |
| 7194 } | 7260 } |
| 7195 } | 7261 } |
| 7196 | 7262 |
| 7197 core.Map<core.String, core.Object> toJson() { | 7263 core.Map<core.String, core.Object> toJson() { |
| 7198 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7264 final core.Map<core.String, core.Object> _json = |
| 7265 new core.Map<core.String, core.Object>(); |
| 7199 if (items != null) { | 7266 if (items != null) { |
| 7200 _json["items"] = items.map((value) => (value).toJson()).toList(); | 7267 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 7201 } | 7268 } |
| 7202 if (kind != null) { | 7269 if (kind != null) { |
| 7203 _json["kind"] = kind; | 7270 _json["kind"] = kind; |
| 7204 } | 7271 } |
| 7205 if (nextPageToken != null) { | 7272 if (nextPageToken != null) { |
| 7206 _json["nextPageToken"] = nextPageToken; | 7273 _json["nextPageToken"] = nextPageToken; |
| 7207 } | 7274 } |
| 7208 return _json; | 7275 return _json; |
| 7209 } | 7276 } |
| 7210 } | 7277 } |
| 7211 | 7278 |
| 7212 /** This is a JSON template for a Quest Milestone resource. */ | 7279 /// This is a JSON template for a Quest Milestone resource. |
| 7213 class QuestMilestone { | 7280 class QuestMilestone { |
| 7214 /** | 7281 /// The completion reward data of the milestone, represented as a |
| 7215 * The completion reward data of the milestone, represented as a | 7282 /// Base64-encoded string. This is a developer-specified binary blob with |
| 7216 * Base64-encoded string. This is a developer-specified binary blob with size | 7283 /// size between 0 and 2 KB before encoding. |
| 7217 * between 0 and 2 KB before encoding. | |
| 7218 */ | |
| 7219 core.String completionRewardData; | 7284 core.String completionRewardData; |
| 7220 core.List<core.int> get completionRewardDataAsBytes { | 7285 core.List<core.int> get completionRewardDataAsBytes { |
| 7221 return convert.BASE64.decode(completionRewardData); | 7286 return convert.BASE64.decode(completionRewardData); |
| 7222 } | 7287 } |
| 7223 | 7288 |
| 7224 void set completionRewardDataAsBytes(core.List<core.int> _bytes) { | 7289 void set completionRewardDataAsBytes(core.List<core.int> _bytes) { |
| 7225 completionRewardData = convert.BASE64.encode(_bytes).replaceAll("/", "_").re
placeAll("+", "-"); | 7290 completionRewardData = |
| 7291 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
| 7226 } | 7292 } |
| 7227 /** The criteria of the milestone. */ | 7293 |
| 7294 /// The criteria of the milestone. |
| 7228 core.List<QuestCriterion> criteria; | 7295 core.List<QuestCriterion> criteria; |
| 7229 /** The milestone ID. */ | 7296 |
| 7297 /// The milestone ID. |
| 7230 core.String id; | 7298 core.String id; |
| 7231 /** | 7299 |
| 7232 * Uniquely identifies the type of this resource. Value is always the fixed | 7300 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7233 * string games#questMilestone. | 7301 /// string games#questMilestone. |
| 7234 */ | |
| 7235 core.String kind; | 7302 core.String kind; |
| 7236 /** | 7303 |
| 7237 * The current state of the milestone. | 7304 /// The current state of the milestone. |
| 7238 * Possible values are: | 7305 /// Possible values are: |
| 7239 * - "COMPLETED_NOT_CLAIMED" - The milestone is complete, but has not yet been | 7306 /// - "COMPLETED_NOT_CLAIMED" - The milestone is complete, but has not yet |
| 7240 * claimed. | 7307 /// been claimed. |
| 7241 * - "CLAIMED" - The milestone is complete and has been claimed. | 7308 /// - "CLAIMED" - The milestone is complete and has been claimed. |
| 7242 * - "NOT_COMPLETED" - The milestone has not yet been completed. | 7309 /// - "NOT_COMPLETED" - The milestone has not yet been completed. |
| 7243 * - "NOT_STARTED" - The milestone is for a quest that has not yet been | 7310 /// - "NOT_STARTED" - The milestone is for a quest that has not yet been |
| 7244 * accepted. | 7311 /// accepted. |
| 7245 */ | |
| 7246 core.String state; | 7312 core.String state; |
| 7247 | 7313 |
| 7248 QuestMilestone(); | 7314 QuestMilestone(); |
| 7249 | 7315 |
| 7250 QuestMilestone.fromJson(core.Map _json) { | 7316 QuestMilestone.fromJson(core.Map _json) { |
| 7251 if (_json.containsKey("completionRewardData")) { | 7317 if (_json.containsKey("completionRewardData")) { |
| 7252 completionRewardData = _json["completionRewardData"]; | 7318 completionRewardData = _json["completionRewardData"]; |
| 7253 } | 7319 } |
| 7254 if (_json.containsKey("criteria")) { | 7320 if (_json.containsKey("criteria")) { |
| 7255 criteria = _json["criteria"].map((value) => new QuestCriterion.fromJson(va
lue)).toList(); | 7321 criteria = _json["criteria"] |
| 7322 .map((value) => new QuestCriterion.fromJson(value)) |
| 7323 .toList(); |
| 7256 } | 7324 } |
| 7257 if (_json.containsKey("id")) { | 7325 if (_json.containsKey("id")) { |
| 7258 id = _json["id"]; | 7326 id = _json["id"]; |
| 7259 } | 7327 } |
| 7260 if (_json.containsKey("kind")) { | 7328 if (_json.containsKey("kind")) { |
| 7261 kind = _json["kind"]; | 7329 kind = _json["kind"]; |
| 7262 } | 7330 } |
| 7263 if (_json.containsKey("state")) { | 7331 if (_json.containsKey("state")) { |
| 7264 state = _json["state"]; | 7332 state = _json["state"]; |
| 7265 } | 7333 } |
| 7266 } | 7334 } |
| 7267 | 7335 |
| 7268 core.Map<core.String, core.Object> toJson() { | 7336 core.Map<core.String, core.Object> toJson() { |
| 7269 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7337 final core.Map<core.String, core.Object> _json = |
| 7338 new core.Map<core.String, core.Object>(); |
| 7270 if (completionRewardData != null) { | 7339 if (completionRewardData != null) { |
| 7271 _json["completionRewardData"] = completionRewardData; | 7340 _json["completionRewardData"] = completionRewardData; |
| 7272 } | 7341 } |
| 7273 if (criteria != null) { | 7342 if (criteria != null) { |
| 7274 _json["criteria"] = criteria.map((value) => (value).toJson()).toList(); | 7343 _json["criteria"] = criteria.map((value) => (value).toJson()).toList(); |
| 7275 } | 7344 } |
| 7276 if (id != null) { | 7345 if (id != null) { |
| 7277 _json["id"] = id; | 7346 _json["id"] = id; |
| 7278 } | 7347 } |
| 7279 if (kind != null) { | 7348 if (kind != null) { |
| 7280 _json["kind"] = kind; | 7349 _json["kind"] = kind; |
| 7281 } | 7350 } |
| 7282 if (state != null) { | 7351 if (state != null) { |
| 7283 _json["state"] = state; | 7352 _json["state"] = state; |
| 7284 } | 7353 } |
| 7285 return _json; | 7354 return _json; |
| 7286 } | 7355 } |
| 7287 } | 7356 } |
| 7288 | 7357 |
| 7289 /** This is a JSON template for the result of checking a revision. */ | 7358 /// This is a JSON template for the result of checking a revision. |
| 7290 class RevisionCheckResponse { | 7359 class RevisionCheckResponse { |
| 7291 /** | 7360 /// The version of the API this client revision should use when calling API |
| 7292 * The version of the API this client revision should use when calling API | 7361 /// methods. |
| 7293 * methods. | |
| 7294 */ | |
| 7295 core.String apiVersion; | 7362 core.String apiVersion; |
| 7296 /** | 7363 |
| 7297 * Uniquely identifies the type of this resource. Value is always the fixed | 7364 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7298 * string games#revisionCheckResponse. | 7365 /// string games#revisionCheckResponse. |
| 7299 */ | |
| 7300 core.String kind; | 7366 core.String kind; |
| 7301 /** | 7367 |
| 7302 * The result of the revision check. | 7368 /// The result of the revision check. |
| 7303 * Possible values are: | 7369 /// Possible values are: |
| 7304 * - "OK" - The revision being used is current. | 7370 /// - "OK" - The revision being used is current. |
| 7305 * - "DEPRECATED" - There is currently a newer version available, but the | 7371 /// - "DEPRECATED" - There is currently a newer version available, but the |
| 7306 * revision being used still works. | 7372 /// revision being used still works. |
| 7307 * - "INVALID" - The revision being used is not supported in any released | 7373 /// - "INVALID" - The revision being used is not supported in any released |
| 7308 * version. | 7374 /// version. |
| 7309 */ | |
| 7310 core.String revisionStatus; | 7375 core.String revisionStatus; |
| 7311 | 7376 |
| 7312 RevisionCheckResponse(); | 7377 RevisionCheckResponse(); |
| 7313 | 7378 |
| 7314 RevisionCheckResponse.fromJson(core.Map _json) { | 7379 RevisionCheckResponse.fromJson(core.Map _json) { |
| 7315 if (_json.containsKey("apiVersion")) { | 7380 if (_json.containsKey("apiVersion")) { |
| 7316 apiVersion = _json["apiVersion"]; | 7381 apiVersion = _json["apiVersion"]; |
| 7317 } | 7382 } |
| 7318 if (_json.containsKey("kind")) { | 7383 if (_json.containsKey("kind")) { |
| 7319 kind = _json["kind"]; | 7384 kind = _json["kind"]; |
| 7320 } | 7385 } |
| 7321 if (_json.containsKey("revisionStatus")) { | 7386 if (_json.containsKey("revisionStatus")) { |
| 7322 revisionStatus = _json["revisionStatus"]; | 7387 revisionStatus = _json["revisionStatus"]; |
| 7323 } | 7388 } |
| 7324 } | 7389 } |
| 7325 | 7390 |
| 7326 core.Map<core.String, core.Object> toJson() { | 7391 core.Map<core.String, core.Object> toJson() { |
| 7327 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7392 final core.Map<core.String, core.Object> _json = |
| 7393 new core.Map<core.String, core.Object>(); |
| 7328 if (apiVersion != null) { | 7394 if (apiVersion != null) { |
| 7329 _json["apiVersion"] = apiVersion; | 7395 _json["apiVersion"] = apiVersion; |
| 7330 } | 7396 } |
| 7331 if (kind != null) { | 7397 if (kind != null) { |
| 7332 _json["kind"] = kind; | 7398 _json["kind"] = kind; |
| 7333 } | 7399 } |
| 7334 if (revisionStatus != null) { | 7400 if (revisionStatus != null) { |
| 7335 _json["revisionStatus"] = revisionStatus; | 7401 _json["revisionStatus"] = revisionStatus; |
| 7336 } | 7402 } |
| 7337 return _json; | 7403 return _json; |
| 7338 } | 7404 } |
| 7339 } | 7405 } |
| 7340 | 7406 |
| 7341 /** This is a JSON template for a room resource object. */ | 7407 /// This is a JSON template for a room resource object. |
| 7342 class Room { | 7408 class Room { |
| 7343 /** The ID of the application being played. */ | 7409 /// The ID of the application being played. |
| 7344 core.String applicationId; | 7410 core.String applicationId; |
| 7345 /** Criteria for auto-matching players into this room. */ | 7411 |
| 7412 /// Criteria for auto-matching players into this room. |
| 7346 RoomAutoMatchingCriteria autoMatchingCriteria; | 7413 RoomAutoMatchingCriteria autoMatchingCriteria; |
| 7347 /** | 7414 |
| 7348 * Auto-matching status for this room. Not set if the room is not currently in | 7415 /// Auto-matching status for this room. Not set if the room is not currently |
| 7349 * the auto-matching queue. | 7416 /// in the auto-matching queue. |
| 7350 */ | |
| 7351 RoomAutoMatchStatus autoMatchingStatus; | 7417 RoomAutoMatchStatus autoMatchingStatus; |
| 7352 /** Details about the room creation. */ | 7418 |
| 7419 /// Details about the room creation. |
| 7353 RoomModification creationDetails; | 7420 RoomModification creationDetails; |
| 7354 /** | 7421 |
| 7355 * This short description is generated by our servers and worded relative to | 7422 /// This short description is generated by our servers and worded relative to |
| 7356 * the player requesting the room. It is intended to be displayed when the | 7423 /// the player requesting the room. It is intended to be displayed when the |
| 7357 * room is shown in a list (that is, an invitation to a room.) | 7424 /// room is shown in a list (that is, an invitation to a room.) |
| 7358 */ | |
| 7359 core.String description; | 7425 core.String description; |
| 7360 /** | 7426 |
| 7361 * The ID of the participant that invited the user to the room. Not set if the | 7427 /// The ID of the participant that invited the user to the room. Not set if |
| 7362 * user was not invited to the room. | 7428 /// the user was not invited to the room. |
| 7363 */ | |
| 7364 core.String inviterId; | 7429 core.String inviterId; |
| 7365 /** | 7430 |
| 7366 * Uniquely identifies the type of this resource. Value is always the fixed | 7431 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7367 * string games#room. | 7432 /// string games#room. |
| 7368 */ | |
| 7369 core.String kind; | 7433 core.String kind; |
| 7370 /** Details about the last update to the room. */ | 7434 |
| 7435 /// Details about the last update to the room. |
| 7371 RoomModification lastUpdateDetails; | 7436 RoomModification lastUpdateDetails; |
| 7372 /** | 7437 |
| 7373 * The participants involved in the room, along with their statuses. Includes | 7438 /// The participants involved in the room, along with their statuses. |
| 7374 * participants who have left or declined invitations. | 7439 /// Includes participants who have left or declined invitations. |
| 7375 */ | |
| 7376 core.List<RoomParticipant> participants; | 7440 core.List<RoomParticipant> participants; |
| 7377 /** Globally unique ID for a room. */ | 7441 |
| 7442 /// Globally unique ID for a room. |
| 7378 core.String roomId; | 7443 core.String roomId; |
| 7379 /** | 7444 |
| 7380 * The version of the room status: an increasing counter, used by the client | 7445 /// The version of the room status: an increasing counter, used by the client |
| 7381 * to ignore out-of-order updates to room status. | 7446 /// to ignore out-of-order updates to room status. |
| 7382 */ | |
| 7383 core.int roomStatusVersion; | 7447 core.int roomStatusVersion; |
| 7384 /** | 7448 |
| 7385 * The status of the room. | 7449 /// The status of the room. |
| 7386 * Possible values are: | 7450 /// Possible values are: |
| 7387 * - "ROOM_INVITING" - One or more players have been invited and not | 7451 /// - "ROOM_INVITING" - One or more players have been invited and not |
| 7388 * responded. | 7452 /// responded. |
| 7389 * - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by | 7453 /// - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by |
| 7390 * auto-matching. | 7454 /// auto-matching. |
| 7391 * - "ROOM_CONNECTING" - Players have joined and are connecting to each other | 7455 /// - "ROOM_CONNECTING" - Players have joined and are connecting to each |
| 7392 * (either before or after auto-matching). | 7456 /// other (either before or after auto-matching). |
| 7393 * - "ROOM_ACTIVE" - All players have joined and connected to each other. | 7457 /// - "ROOM_ACTIVE" - All players have joined and connected to each other. |
| 7394 * - "ROOM_DELETED" - The room should no longer be shown on the client. | 7458 /// - "ROOM_DELETED" - The room should no longer be shown on the client. |
| 7395 * Returned in sync calls when a player joins a room (as a tombstone), or for | 7459 /// Returned in sync calls when a player joins a room (as a tombstone), or |
| 7396 * rooms where all joined participants have left. | 7460 /// for rooms where all joined participants have left. |
| 7397 */ | |
| 7398 core.String status; | 7461 core.String status; |
| 7399 /** | 7462 |
| 7400 * The variant / mode of the application being played; can be any integer | 7463 /// The variant / mode of the application being played; can be any integer |
| 7401 * value, or left blank. | 7464 /// value, or left blank. |
| 7402 */ | |
| 7403 core.int variant; | 7465 core.int variant; |
| 7404 | 7466 |
| 7405 Room(); | 7467 Room(); |
| 7406 | 7468 |
| 7407 Room.fromJson(core.Map _json) { | 7469 Room.fromJson(core.Map _json) { |
| 7408 if (_json.containsKey("applicationId")) { | 7470 if (_json.containsKey("applicationId")) { |
| 7409 applicationId = _json["applicationId"]; | 7471 applicationId = _json["applicationId"]; |
| 7410 } | 7472 } |
| 7411 if (_json.containsKey("autoMatchingCriteria")) { | 7473 if (_json.containsKey("autoMatchingCriteria")) { |
| 7412 autoMatchingCriteria = new RoomAutoMatchingCriteria.fromJson(_json["autoMa
tchingCriteria"]); | 7474 autoMatchingCriteria = |
| 7475 new RoomAutoMatchingCriteria.fromJson(_json["autoMatchingCriteria"]); |
| 7413 } | 7476 } |
| 7414 if (_json.containsKey("autoMatchingStatus")) { | 7477 if (_json.containsKey("autoMatchingStatus")) { |
| 7415 autoMatchingStatus = new RoomAutoMatchStatus.fromJson(_json["autoMatchingS
tatus"]); | 7478 autoMatchingStatus = |
| 7479 new RoomAutoMatchStatus.fromJson(_json["autoMatchingStatus"]); |
| 7416 } | 7480 } |
| 7417 if (_json.containsKey("creationDetails")) { | 7481 if (_json.containsKey("creationDetails")) { |
| 7418 creationDetails = new RoomModification.fromJson(_json["creationDetails"]); | 7482 creationDetails = new RoomModification.fromJson(_json["creationDetails"]); |
| 7419 } | 7483 } |
| 7420 if (_json.containsKey("description")) { | 7484 if (_json.containsKey("description")) { |
| 7421 description = _json["description"]; | 7485 description = _json["description"]; |
| 7422 } | 7486 } |
| 7423 if (_json.containsKey("inviterId")) { | 7487 if (_json.containsKey("inviterId")) { |
| 7424 inviterId = _json["inviterId"]; | 7488 inviterId = _json["inviterId"]; |
| 7425 } | 7489 } |
| 7426 if (_json.containsKey("kind")) { | 7490 if (_json.containsKey("kind")) { |
| 7427 kind = _json["kind"]; | 7491 kind = _json["kind"]; |
| 7428 } | 7492 } |
| 7429 if (_json.containsKey("lastUpdateDetails")) { | 7493 if (_json.containsKey("lastUpdateDetails")) { |
| 7430 lastUpdateDetails = new RoomModification.fromJson(_json["lastUpdateDetails
"]); | 7494 lastUpdateDetails = |
| 7495 new RoomModification.fromJson(_json["lastUpdateDetails"]); |
| 7431 } | 7496 } |
| 7432 if (_json.containsKey("participants")) { | 7497 if (_json.containsKey("participants")) { |
| 7433 participants = _json["participants"].map((value) => new RoomParticipant.fr
omJson(value)).toList(); | 7498 participants = _json["participants"] |
| 7499 .map((value) => new RoomParticipant.fromJson(value)) |
| 7500 .toList(); |
| 7434 } | 7501 } |
| 7435 if (_json.containsKey("roomId")) { | 7502 if (_json.containsKey("roomId")) { |
| 7436 roomId = _json["roomId"]; | 7503 roomId = _json["roomId"]; |
| 7437 } | 7504 } |
| 7438 if (_json.containsKey("roomStatusVersion")) { | 7505 if (_json.containsKey("roomStatusVersion")) { |
| 7439 roomStatusVersion = _json["roomStatusVersion"]; | 7506 roomStatusVersion = _json["roomStatusVersion"]; |
| 7440 } | 7507 } |
| 7441 if (_json.containsKey("status")) { | 7508 if (_json.containsKey("status")) { |
| 7442 status = _json["status"]; | 7509 status = _json["status"]; |
| 7443 } | 7510 } |
| 7444 if (_json.containsKey("variant")) { | 7511 if (_json.containsKey("variant")) { |
| 7445 variant = _json["variant"]; | 7512 variant = _json["variant"]; |
| 7446 } | 7513 } |
| 7447 } | 7514 } |
| 7448 | 7515 |
| 7449 core.Map<core.String, core.Object> toJson() { | 7516 core.Map<core.String, core.Object> toJson() { |
| 7450 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7517 final core.Map<core.String, core.Object> _json = |
| 7518 new core.Map<core.String, core.Object>(); |
| 7451 if (applicationId != null) { | 7519 if (applicationId != null) { |
| 7452 _json["applicationId"] = applicationId; | 7520 _json["applicationId"] = applicationId; |
| 7453 } | 7521 } |
| 7454 if (autoMatchingCriteria != null) { | 7522 if (autoMatchingCriteria != null) { |
| 7455 _json["autoMatchingCriteria"] = (autoMatchingCriteria).toJson(); | 7523 _json["autoMatchingCriteria"] = (autoMatchingCriteria).toJson(); |
| 7456 } | 7524 } |
| 7457 if (autoMatchingStatus != null) { | 7525 if (autoMatchingStatus != null) { |
| 7458 _json["autoMatchingStatus"] = (autoMatchingStatus).toJson(); | 7526 _json["autoMatchingStatus"] = (autoMatchingStatus).toJson(); |
| 7459 } | 7527 } |
| 7460 if (creationDetails != null) { | 7528 if (creationDetails != null) { |
| 7461 _json["creationDetails"] = (creationDetails).toJson(); | 7529 _json["creationDetails"] = (creationDetails).toJson(); |
| 7462 } | 7530 } |
| 7463 if (description != null) { | 7531 if (description != null) { |
| 7464 _json["description"] = description; | 7532 _json["description"] = description; |
| 7465 } | 7533 } |
| 7466 if (inviterId != null) { | 7534 if (inviterId != null) { |
| 7467 _json["inviterId"] = inviterId; | 7535 _json["inviterId"] = inviterId; |
| 7468 } | 7536 } |
| 7469 if (kind != null) { | 7537 if (kind != null) { |
| 7470 _json["kind"] = kind; | 7538 _json["kind"] = kind; |
| 7471 } | 7539 } |
| 7472 if (lastUpdateDetails != null) { | 7540 if (lastUpdateDetails != null) { |
| 7473 _json["lastUpdateDetails"] = (lastUpdateDetails).toJson(); | 7541 _json["lastUpdateDetails"] = (lastUpdateDetails).toJson(); |
| 7474 } | 7542 } |
| 7475 if (participants != null) { | 7543 if (participants != null) { |
| 7476 _json["participants"] = participants.map((value) => (value).toJson()).toLi
st(); | 7544 _json["participants"] = |
| 7545 participants.map((value) => (value).toJson()).toList(); |
| 7477 } | 7546 } |
| 7478 if (roomId != null) { | 7547 if (roomId != null) { |
| 7479 _json["roomId"] = roomId; | 7548 _json["roomId"] = roomId; |
| 7480 } | 7549 } |
| 7481 if (roomStatusVersion != null) { | 7550 if (roomStatusVersion != null) { |
| 7482 _json["roomStatusVersion"] = roomStatusVersion; | 7551 _json["roomStatusVersion"] = roomStatusVersion; |
| 7483 } | 7552 } |
| 7484 if (status != null) { | 7553 if (status != null) { |
| 7485 _json["status"] = status; | 7554 _json["status"] = status; |
| 7486 } | 7555 } |
| 7487 if (variant != null) { | 7556 if (variant != null) { |
| 7488 _json["variant"] = variant; | 7557 _json["variant"] = variant; |
| 7489 } | 7558 } |
| 7490 return _json; | 7559 return _json; |
| 7491 } | 7560 } |
| 7492 } | 7561 } |
| 7493 | 7562 |
| 7494 /** | 7563 /// This is a JSON template for status of room automatching that is in |
| 7495 * This is a JSON template for status of room automatching that is in progress. | 7564 /// progress. |
| 7496 */ | |
| 7497 class RoomAutoMatchStatus { | 7565 class RoomAutoMatchStatus { |
| 7498 /** | 7566 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7499 * Uniquely identifies the type of this resource. Value is always the fixed | 7567 /// string games#roomAutoMatchStatus. |
| 7500 * string games#roomAutoMatchStatus. | |
| 7501 */ | |
| 7502 core.String kind; | 7568 core.String kind; |
| 7503 /** | 7569 |
| 7504 * An estimate for the amount of time (in seconds) that auto-matching is | 7570 /// An estimate for the amount of time (in seconds) that auto-matching is |
| 7505 * expected to take to complete. | 7571 /// expected to take to complete. |
| 7506 */ | |
| 7507 core.int waitEstimateSeconds; | 7572 core.int waitEstimateSeconds; |
| 7508 | 7573 |
| 7509 RoomAutoMatchStatus(); | 7574 RoomAutoMatchStatus(); |
| 7510 | 7575 |
| 7511 RoomAutoMatchStatus.fromJson(core.Map _json) { | 7576 RoomAutoMatchStatus.fromJson(core.Map _json) { |
| 7512 if (_json.containsKey("kind")) { | 7577 if (_json.containsKey("kind")) { |
| 7513 kind = _json["kind"]; | 7578 kind = _json["kind"]; |
| 7514 } | 7579 } |
| 7515 if (_json.containsKey("waitEstimateSeconds")) { | 7580 if (_json.containsKey("waitEstimateSeconds")) { |
| 7516 waitEstimateSeconds = _json["waitEstimateSeconds"]; | 7581 waitEstimateSeconds = _json["waitEstimateSeconds"]; |
| 7517 } | 7582 } |
| 7518 } | 7583 } |
| 7519 | 7584 |
| 7520 core.Map<core.String, core.Object> toJson() { | 7585 core.Map<core.String, core.Object> toJson() { |
| 7521 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7586 final core.Map<core.String, core.Object> _json = |
| 7587 new core.Map<core.String, core.Object>(); |
| 7522 if (kind != null) { | 7588 if (kind != null) { |
| 7523 _json["kind"] = kind; | 7589 _json["kind"] = kind; |
| 7524 } | 7590 } |
| 7525 if (waitEstimateSeconds != null) { | 7591 if (waitEstimateSeconds != null) { |
| 7526 _json["waitEstimateSeconds"] = waitEstimateSeconds; | 7592 _json["waitEstimateSeconds"] = waitEstimateSeconds; |
| 7527 } | 7593 } |
| 7528 return _json; | 7594 return _json; |
| 7529 } | 7595 } |
| 7530 } | 7596 } |
| 7531 | 7597 |
| 7532 /** This is a JSON template for a room auto-match criteria object. */ | 7598 /// This is a JSON template for a room auto-match criteria object. |
| 7533 class RoomAutoMatchingCriteria { | 7599 class RoomAutoMatchingCriteria { |
| 7534 /** | 7600 /// A bitmask indicating when auto-matches are valid. When ANDed with other |
| 7535 * A bitmask indicating when auto-matches are valid. When ANDed with other | 7601 /// exclusive bitmasks, the result must be zero. Can be used to support |
| 7536 * exclusive bitmasks, the result must be zero. Can be used to support | 7602 /// exclusive roles within a game. |
| 7537 * exclusive roles within a game. | |
| 7538 */ | |
| 7539 core.String exclusiveBitmask; | 7603 core.String exclusiveBitmask; |
| 7540 /** | 7604 |
| 7541 * Uniquely identifies the type of this resource. Value is always the fixed | 7605 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7542 * string games#roomAutoMatchingCriteria. | 7606 /// string games#roomAutoMatchingCriteria. |
| 7543 */ | |
| 7544 core.String kind; | 7607 core.String kind; |
| 7545 /** | 7608 |
| 7546 * The maximum number of players that should be added to the room by | 7609 /// The maximum number of players that should be added to the room by |
| 7547 * auto-matching. | 7610 /// auto-matching. |
| 7548 */ | |
| 7549 core.int maxAutoMatchingPlayers; | 7611 core.int maxAutoMatchingPlayers; |
| 7550 /** | 7612 |
| 7551 * The minimum number of players that should be added to the room by | 7613 /// The minimum number of players that should be added to the room by |
| 7552 * auto-matching. | 7614 /// auto-matching. |
| 7553 */ | |
| 7554 core.int minAutoMatchingPlayers; | 7615 core.int minAutoMatchingPlayers; |
| 7555 | 7616 |
| 7556 RoomAutoMatchingCriteria(); | 7617 RoomAutoMatchingCriteria(); |
| 7557 | 7618 |
| 7558 RoomAutoMatchingCriteria.fromJson(core.Map _json) { | 7619 RoomAutoMatchingCriteria.fromJson(core.Map _json) { |
| 7559 if (_json.containsKey("exclusiveBitmask")) { | 7620 if (_json.containsKey("exclusiveBitmask")) { |
| 7560 exclusiveBitmask = _json["exclusiveBitmask"]; | 7621 exclusiveBitmask = _json["exclusiveBitmask"]; |
| 7561 } | 7622 } |
| 7562 if (_json.containsKey("kind")) { | 7623 if (_json.containsKey("kind")) { |
| 7563 kind = _json["kind"]; | 7624 kind = _json["kind"]; |
| 7564 } | 7625 } |
| 7565 if (_json.containsKey("maxAutoMatchingPlayers")) { | 7626 if (_json.containsKey("maxAutoMatchingPlayers")) { |
| 7566 maxAutoMatchingPlayers = _json["maxAutoMatchingPlayers"]; | 7627 maxAutoMatchingPlayers = _json["maxAutoMatchingPlayers"]; |
| 7567 } | 7628 } |
| 7568 if (_json.containsKey("minAutoMatchingPlayers")) { | 7629 if (_json.containsKey("minAutoMatchingPlayers")) { |
| 7569 minAutoMatchingPlayers = _json["minAutoMatchingPlayers"]; | 7630 minAutoMatchingPlayers = _json["minAutoMatchingPlayers"]; |
| 7570 } | 7631 } |
| 7571 } | 7632 } |
| 7572 | 7633 |
| 7573 core.Map<core.String, core.Object> toJson() { | 7634 core.Map<core.String, core.Object> toJson() { |
| 7574 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7635 final core.Map<core.String, core.Object> _json = |
| 7636 new core.Map<core.String, core.Object>(); |
| 7575 if (exclusiveBitmask != null) { | 7637 if (exclusiveBitmask != null) { |
| 7576 _json["exclusiveBitmask"] = exclusiveBitmask; | 7638 _json["exclusiveBitmask"] = exclusiveBitmask; |
| 7577 } | 7639 } |
| 7578 if (kind != null) { | 7640 if (kind != null) { |
| 7579 _json["kind"] = kind; | 7641 _json["kind"] = kind; |
| 7580 } | 7642 } |
| 7581 if (maxAutoMatchingPlayers != null) { | 7643 if (maxAutoMatchingPlayers != null) { |
| 7582 _json["maxAutoMatchingPlayers"] = maxAutoMatchingPlayers; | 7644 _json["maxAutoMatchingPlayers"] = maxAutoMatchingPlayers; |
| 7583 } | 7645 } |
| 7584 if (minAutoMatchingPlayers != null) { | 7646 if (minAutoMatchingPlayers != null) { |
| 7585 _json["minAutoMatchingPlayers"] = minAutoMatchingPlayers; | 7647 _json["minAutoMatchingPlayers"] = minAutoMatchingPlayers; |
| 7586 } | 7648 } |
| 7587 return _json; | 7649 return _json; |
| 7588 } | 7650 } |
| 7589 } | 7651 } |
| 7590 | 7652 |
| 7591 /** This is a JSON template for the client address when setting up a room. */ | 7653 /// This is a JSON template for the client address when setting up a room. |
| 7592 class RoomClientAddress { | 7654 class RoomClientAddress { |
| 7593 /** | 7655 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7594 * Uniquely identifies the type of this resource. Value is always the fixed | 7656 /// string games#roomClientAddress. |
| 7595 * string games#roomClientAddress. | |
| 7596 */ | |
| 7597 core.String kind; | 7657 core.String kind; |
| 7598 /** The XMPP address of the client on the Google Games XMPP network. */ | 7658 |
| 7659 /// The XMPP address of the client on the Google Games XMPP network. |
| 7599 core.String xmppAddress; | 7660 core.String xmppAddress; |
| 7600 | 7661 |
| 7601 RoomClientAddress(); | 7662 RoomClientAddress(); |
| 7602 | 7663 |
| 7603 RoomClientAddress.fromJson(core.Map _json) { | 7664 RoomClientAddress.fromJson(core.Map _json) { |
| 7604 if (_json.containsKey("kind")) { | 7665 if (_json.containsKey("kind")) { |
| 7605 kind = _json["kind"]; | 7666 kind = _json["kind"]; |
| 7606 } | 7667 } |
| 7607 if (_json.containsKey("xmppAddress")) { | 7668 if (_json.containsKey("xmppAddress")) { |
| 7608 xmppAddress = _json["xmppAddress"]; | 7669 xmppAddress = _json["xmppAddress"]; |
| 7609 } | 7670 } |
| 7610 } | 7671 } |
| 7611 | 7672 |
| 7612 core.Map<core.String, core.Object> toJson() { | 7673 core.Map<core.String, core.Object> toJson() { |
| 7613 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7674 final core.Map<core.String, core.Object> _json = |
| 7675 new core.Map<core.String, core.Object>(); |
| 7614 if (kind != null) { | 7676 if (kind != null) { |
| 7615 _json["kind"] = kind; | 7677 _json["kind"] = kind; |
| 7616 } | 7678 } |
| 7617 if (xmppAddress != null) { | 7679 if (xmppAddress != null) { |
| 7618 _json["xmppAddress"] = xmppAddress; | 7680 _json["xmppAddress"] = xmppAddress; |
| 7619 } | 7681 } |
| 7620 return _json; | 7682 return _json; |
| 7621 } | 7683 } |
| 7622 } | 7684 } |
| 7623 | 7685 |
| 7624 /** This is a JSON template for a room creation request. */ | 7686 /// This is a JSON template for a room creation request. |
| 7625 class RoomCreateRequest { | 7687 class RoomCreateRequest { |
| 7626 /** Criteria for auto-matching players into this room. */ | 7688 /// Criteria for auto-matching players into this room. |
| 7627 RoomAutoMatchingCriteria autoMatchingCriteria; | 7689 RoomAutoMatchingCriteria autoMatchingCriteria; |
| 7628 /** The capabilities that this client supports for realtime communication. */ | 7690 |
| 7691 /// The capabilities that this client supports for realtime communication. |
| 7629 core.List<core.String> capabilities; | 7692 core.List<core.String> capabilities; |
| 7630 /** Client address for the player creating the room. */ | 7693 |
| 7694 /// Client address for the player creating the room. |
| 7631 RoomClientAddress clientAddress; | 7695 RoomClientAddress clientAddress; |
| 7632 /** The player IDs to invite to the room. */ | 7696 |
| 7697 /// The player IDs to invite to the room. |
| 7633 core.List<core.String> invitedPlayerIds; | 7698 core.List<core.String> invitedPlayerIds; |
| 7634 /** | 7699 |
| 7635 * Uniquely identifies the type of this resource. Value is always the fixed | 7700 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7636 * string games#roomCreateRequest. | 7701 /// string games#roomCreateRequest. |
| 7637 */ | |
| 7638 core.String kind; | 7702 core.String kind; |
| 7639 /** Network diagnostics for the client creating the room. */ | 7703 |
| 7704 /// Network diagnostics for the client creating the room. |
| 7640 NetworkDiagnostics networkDiagnostics; | 7705 NetworkDiagnostics networkDiagnostics; |
| 7641 /** | 7706 |
| 7642 * A randomly generated numeric ID. This number is used at the server to | 7707 /// A randomly generated numeric ID. This number is used at the server to |
| 7643 * ensure that the request is handled correctly across retries. | 7708 /// ensure that the request is handled correctly across retries. |
| 7644 */ | |
| 7645 core.String requestId; | 7709 core.String requestId; |
| 7646 /** | 7710 |
| 7647 * The variant / mode of the application to be played. This can be any integer | 7711 /// The variant / mode of the application to be played. This can be any |
| 7648 * value, or left blank. You should use a small number of variants to keep the | 7712 /// integer value, or left blank. You should use a small number of variants |
| 7649 * auto-matching pool as large as possible. | 7713 /// to keep the auto-matching pool as large as possible. |
| 7650 */ | |
| 7651 core.int variant; | 7714 core.int variant; |
| 7652 | 7715 |
| 7653 RoomCreateRequest(); | 7716 RoomCreateRequest(); |
| 7654 | 7717 |
| 7655 RoomCreateRequest.fromJson(core.Map _json) { | 7718 RoomCreateRequest.fromJson(core.Map _json) { |
| 7656 if (_json.containsKey("autoMatchingCriteria")) { | 7719 if (_json.containsKey("autoMatchingCriteria")) { |
| 7657 autoMatchingCriteria = new RoomAutoMatchingCriteria.fromJson(_json["autoMa
tchingCriteria"]); | 7720 autoMatchingCriteria = |
| 7721 new RoomAutoMatchingCriteria.fromJson(_json["autoMatchingCriteria"]); |
| 7658 } | 7722 } |
| 7659 if (_json.containsKey("capabilities")) { | 7723 if (_json.containsKey("capabilities")) { |
| 7660 capabilities = _json["capabilities"]; | 7724 capabilities = _json["capabilities"]; |
| 7661 } | 7725 } |
| 7662 if (_json.containsKey("clientAddress")) { | 7726 if (_json.containsKey("clientAddress")) { |
| 7663 clientAddress = new RoomClientAddress.fromJson(_json["clientAddress"]); | 7727 clientAddress = new RoomClientAddress.fromJson(_json["clientAddress"]); |
| 7664 } | 7728 } |
| 7665 if (_json.containsKey("invitedPlayerIds")) { | 7729 if (_json.containsKey("invitedPlayerIds")) { |
| 7666 invitedPlayerIds = _json["invitedPlayerIds"]; | 7730 invitedPlayerIds = _json["invitedPlayerIds"]; |
| 7667 } | 7731 } |
| 7668 if (_json.containsKey("kind")) { | 7732 if (_json.containsKey("kind")) { |
| 7669 kind = _json["kind"]; | 7733 kind = _json["kind"]; |
| 7670 } | 7734 } |
| 7671 if (_json.containsKey("networkDiagnostics")) { | 7735 if (_json.containsKey("networkDiagnostics")) { |
| 7672 networkDiagnostics = new NetworkDiagnostics.fromJson(_json["networkDiagnos
tics"]); | 7736 networkDiagnostics = |
| 7737 new NetworkDiagnostics.fromJson(_json["networkDiagnostics"]); |
| 7673 } | 7738 } |
| 7674 if (_json.containsKey("requestId")) { | 7739 if (_json.containsKey("requestId")) { |
| 7675 requestId = _json["requestId"]; | 7740 requestId = _json["requestId"]; |
| 7676 } | 7741 } |
| 7677 if (_json.containsKey("variant")) { | 7742 if (_json.containsKey("variant")) { |
| 7678 variant = _json["variant"]; | 7743 variant = _json["variant"]; |
| 7679 } | 7744 } |
| 7680 } | 7745 } |
| 7681 | 7746 |
| 7682 core.Map<core.String, core.Object> toJson() { | 7747 core.Map<core.String, core.Object> toJson() { |
| 7683 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7748 final core.Map<core.String, core.Object> _json = |
| 7749 new core.Map<core.String, core.Object>(); |
| 7684 if (autoMatchingCriteria != null) { | 7750 if (autoMatchingCriteria != null) { |
| 7685 _json["autoMatchingCriteria"] = (autoMatchingCriteria).toJson(); | 7751 _json["autoMatchingCriteria"] = (autoMatchingCriteria).toJson(); |
| 7686 } | 7752 } |
| 7687 if (capabilities != null) { | 7753 if (capabilities != null) { |
| 7688 _json["capabilities"] = capabilities; | 7754 _json["capabilities"] = capabilities; |
| 7689 } | 7755 } |
| 7690 if (clientAddress != null) { | 7756 if (clientAddress != null) { |
| 7691 _json["clientAddress"] = (clientAddress).toJson(); | 7757 _json["clientAddress"] = (clientAddress).toJson(); |
| 7692 } | 7758 } |
| 7693 if (invitedPlayerIds != null) { | 7759 if (invitedPlayerIds != null) { |
| 7694 _json["invitedPlayerIds"] = invitedPlayerIds; | 7760 _json["invitedPlayerIds"] = invitedPlayerIds; |
| 7695 } | 7761 } |
| 7696 if (kind != null) { | 7762 if (kind != null) { |
| 7697 _json["kind"] = kind; | 7763 _json["kind"] = kind; |
| 7698 } | 7764 } |
| 7699 if (networkDiagnostics != null) { | 7765 if (networkDiagnostics != null) { |
| 7700 _json["networkDiagnostics"] = (networkDiagnostics).toJson(); | 7766 _json["networkDiagnostics"] = (networkDiagnostics).toJson(); |
| 7701 } | 7767 } |
| 7702 if (requestId != null) { | 7768 if (requestId != null) { |
| 7703 _json["requestId"] = requestId; | 7769 _json["requestId"] = requestId; |
| 7704 } | 7770 } |
| 7705 if (variant != null) { | 7771 if (variant != null) { |
| 7706 _json["variant"] = variant; | 7772 _json["variant"] = variant; |
| 7707 } | 7773 } |
| 7708 return _json; | 7774 return _json; |
| 7709 } | 7775 } |
| 7710 } | 7776 } |
| 7711 | 7777 |
| 7712 /** This is a JSON template for a join room request. */ | 7778 /// This is a JSON template for a join room request. |
| 7713 class RoomJoinRequest { | 7779 class RoomJoinRequest { |
| 7714 /** The capabilities that this client supports for realtime communication. */ | 7780 /// The capabilities that this client supports for realtime communication. |
| 7715 core.List<core.String> capabilities; | 7781 core.List<core.String> capabilities; |
| 7716 /** Client address for the player joining the room. */ | 7782 |
| 7783 /// Client address for the player joining the room. |
| 7717 RoomClientAddress clientAddress; | 7784 RoomClientAddress clientAddress; |
| 7718 /** | 7785 |
| 7719 * Uniquely identifies the type of this resource. Value is always the fixed | 7786 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7720 * string games#roomJoinRequest. | 7787 /// string games#roomJoinRequest. |
| 7721 */ | |
| 7722 core.String kind; | 7788 core.String kind; |
| 7723 /** Network diagnostics for the client joining the room. */ | 7789 |
| 7790 /// Network diagnostics for the client joining the room. |
| 7724 NetworkDiagnostics networkDiagnostics; | 7791 NetworkDiagnostics networkDiagnostics; |
| 7725 | 7792 |
| 7726 RoomJoinRequest(); | 7793 RoomJoinRequest(); |
| 7727 | 7794 |
| 7728 RoomJoinRequest.fromJson(core.Map _json) { | 7795 RoomJoinRequest.fromJson(core.Map _json) { |
| 7729 if (_json.containsKey("capabilities")) { | 7796 if (_json.containsKey("capabilities")) { |
| 7730 capabilities = _json["capabilities"]; | 7797 capabilities = _json["capabilities"]; |
| 7731 } | 7798 } |
| 7732 if (_json.containsKey("clientAddress")) { | 7799 if (_json.containsKey("clientAddress")) { |
| 7733 clientAddress = new RoomClientAddress.fromJson(_json["clientAddress"]); | 7800 clientAddress = new RoomClientAddress.fromJson(_json["clientAddress"]); |
| 7734 } | 7801 } |
| 7735 if (_json.containsKey("kind")) { | 7802 if (_json.containsKey("kind")) { |
| 7736 kind = _json["kind"]; | 7803 kind = _json["kind"]; |
| 7737 } | 7804 } |
| 7738 if (_json.containsKey("networkDiagnostics")) { | 7805 if (_json.containsKey("networkDiagnostics")) { |
| 7739 networkDiagnostics = new NetworkDiagnostics.fromJson(_json["networkDiagnos
tics"]); | 7806 networkDiagnostics = |
| 7807 new NetworkDiagnostics.fromJson(_json["networkDiagnostics"]); |
| 7740 } | 7808 } |
| 7741 } | 7809 } |
| 7742 | 7810 |
| 7743 core.Map<core.String, core.Object> toJson() { | 7811 core.Map<core.String, core.Object> toJson() { |
| 7744 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7812 final core.Map<core.String, core.Object> _json = |
| 7813 new core.Map<core.String, core.Object>(); |
| 7745 if (capabilities != null) { | 7814 if (capabilities != null) { |
| 7746 _json["capabilities"] = capabilities; | 7815 _json["capabilities"] = capabilities; |
| 7747 } | 7816 } |
| 7748 if (clientAddress != null) { | 7817 if (clientAddress != null) { |
| 7749 _json["clientAddress"] = (clientAddress).toJson(); | 7818 _json["clientAddress"] = (clientAddress).toJson(); |
| 7750 } | 7819 } |
| 7751 if (kind != null) { | 7820 if (kind != null) { |
| 7752 _json["kind"] = kind; | 7821 _json["kind"] = kind; |
| 7753 } | 7822 } |
| 7754 if (networkDiagnostics != null) { | 7823 if (networkDiagnostics != null) { |
| 7755 _json["networkDiagnostics"] = (networkDiagnostics).toJson(); | 7824 _json["networkDiagnostics"] = (networkDiagnostics).toJson(); |
| 7756 } | 7825 } |
| 7757 return _json; | 7826 return _json; |
| 7758 } | 7827 } |
| 7759 } | 7828 } |
| 7760 | 7829 |
| 7761 /** This is a JSON template for room leave diagnostics. */ | 7830 /// This is a JSON template for room leave diagnostics. |
| 7762 class RoomLeaveDiagnostics { | 7831 class RoomLeaveDiagnostics { |
| 7763 /** | 7832 /// Android network subtype. |
| 7764 * Android network subtype. | 7833 /// http://developer.android.com/reference/android/net/NetworkInfo.html#getSub
type() |
| 7765 * http://developer.android.com/reference/android/net/NetworkInfo.html#getSubt
ype() | |
| 7766 */ | |
| 7767 core.int androidNetworkSubtype; | 7834 core.int androidNetworkSubtype; |
| 7768 /** | 7835 |
| 7769 * Android network type. | 7836 /// Android network type. |
| 7770 * http://developer.android.com/reference/android/net/NetworkInfo.html#getType
() | 7837 /// http://developer.android.com/reference/android/net/NetworkInfo.html#getTyp
e() |
| 7771 */ | |
| 7772 core.int androidNetworkType; | 7838 core.int androidNetworkType; |
| 7773 /** iOS network type as defined in Reachability.h. */ | 7839 |
| 7840 /// iOS network type as defined in Reachability.h. |
| 7774 core.int iosNetworkType; | 7841 core.int iosNetworkType; |
| 7775 /** | 7842 |
| 7776 * Uniquely identifies the type of this resource. Value is always the fixed | 7843 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7777 * string games#roomLeaveDiagnostics. | 7844 /// string games#roomLeaveDiagnostics. |
| 7778 */ | |
| 7779 core.String kind; | 7845 core.String kind; |
| 7780 /** | 7846 |
| 7781 * The MCC+MNC code for the client's network connection. On Android: | 7847 /// The MCC+MNC code for the client's network connection. On Android: |
| 7782 * http://developer.android.com/reference/android/telephony/TelephonyManager.h
tml#getNetworkOperator() | 7848 /// http://developer.android.com/reference/android/telephony/TelephonyManager.
html#getNetworkOperator() |
| 7783 * On iOS, see: | 7849 /// On iOS, see: |
| 7784 * https://developer.apple.com/library/ios/documentation/NetworkingInternet/Re
ference/CTCarrier/Reference/Reference.html | 7850 /// https://developer.apple.com/library/ios/documentation/NetworkingInternet/R
eference/CTCarrier/Reference/Reference.html |
| 7785 */ | |
| 7786 core.String networkOperatorCode; | 7851 core.String networkOperatorCode; |
| 7787 /** | 7852 |
| 7788 * The name of the carrier of the client's network connection. On Android: | 7853 /// The name of the carrier of the client's network connection. On Android: |
| 7789 * http://developer.android.com/reference/android/telephony/TelephonyManager.h
tml#getNetworkOperatorName() | 7854 /// http://developer.android.com/reference/android/telephony/TelephonyManager.
html#getNetworkOperatorName() |
| 7790 * On iOS: | 7855 /// On iOS: |
| 7791 * https://developer.apple.com/library/ios/documentation/NetworkingInternet/Re
ference/CTCarrier/Reference/Reference.html#//apple_ref/occ/instp/CTCarrier/carri
erName | 7856 /// https://developer.apple.com/library/ios/documentation/NetworkingInternet/R
eference/CTCarrier/Reference/Reference.html#//apple_ref/occ/instp/CTCarrier/carr
ierName |
| 7792 */ | |
| 7793 core.String networkOperatorName; | 7857 core.String networkOperatorName; |
| 7794 /** Diagnostics about all peer sessions. */ | 7858 |
| 7859 /// Diagnostics about all peer sessions. |
| 7795 core.List<PeerSessionDiagnostics> peerSession; | 7860 core.List<PeerSessionDiagnostics> peerSession; |
| 7796 /** Whether or not sockets were used. */ | 7861 |
| 7862 /// Whether or not sockets were used. |
| 7797 core.bool socketsUsed; | 7863 core.bool socketsUsed; |
| 7798 | 7864 |
| 7799 RoomLeaveDiagnostics(); | 7865 RoomLeaveDiagnostics(); |
| 7800 | 7866 |
| 7801 RoomLeaveDiagnostics.fromJson(core.Map _json) { | 7867 RoomLeaveDiagnostics.fromJson(core.Map _json) { |
| 7802 if (_json.containsKey("androidNetworkSubtype")) { | 7868 if (_json.containsKey("androidNetworkSubtype")) { |
| 7803 androidNetworkSubtype = _json["androidNetworkSubtype"]; | 7869 androidNetworkSubtype = _json["androidNetworkSubtype"]; |
| 7804 } | 7870 } |
| 7805 if (_json.containsKey("androidNetworkType")) { | 7871 if (_json.containsKey("androidNetworkType")) { |
| 7806 androidNetworkType = _json["androidNetworkType"]; | 7872 androidNetworkType = _json["androidNetworkType"]; |
| 7807 } | 7873 } |
| 7808 if (_json.containsKey("iosNetworkType")) { | 7874 if (_json.containsKey("iosNetworkType")) { |
| 7809 iosNetworkType = _json["iosNetworkType"]; | 7875 iosNetworkType = _json["iosNetworkType"]; |
| 7810 } | 7876 } |
| 7811 if (_json.containsKey("kind")) { | 7877 if (_json.containsKey("kind")) { |
| 7812 kind = _json["kind"]; | 7878 kind = _json["kind"]; |
| 7813 } | 7879 } |
| 7814 if (_json.containsKey("networkOperatorCode")) { | 7880 if (_json.containsKey("networkOperatorCode")) { |
| 7815 networkOperatorCode = _json["networkOperatorCode"]; | 7881 networkOperatorCode = _json["networkOperatorCode"]; |
| 7816 } | 7882 } |
| 7817 if (_json.containsKey("networkOperatorName")) { | 7883 if (_json.containsKey("networkOperatorName")) { |
| 7818 networkOperatorName = _json["networkOperatorName"]; | 7884 networkOperatorName = _json["networkOperatorName"]; |
| 7819 } | 7885 } |
| 7820 if (_json.containsKey("peerSession")) { | 7886 if (_json.containsKey("peerSession")) { |
| 7821 peerSession = _json["peerSession"].map((value) => new PeerSessionDiagnosti
cs.fromJson(value)).toList(); | 7887 peerSession = _json["peerSession"] |
| 7888 .map((value) => new PeerSessionDiagnostics.fromJson(value)) |
| 7889 .toList(); |
| 7822 } | 7890 } |
| 7823 if (_json.containsKey("socketsUsed")) { | 7891 if (_json.containsKey("socketsUsed")) { |
| 7824 socketsUsed = _json["socketsUsed"]; | 7892 socketsUsed = _json["socketsUsed"]; |
| 7825 } | 7893 } |
| 7826 } | 7894 } |
| 7827 | 7895 |
| 7828 core.Map<core.String, core.Object> toJson() { | 7896 core.Map<core.String, core.Object> toJson() { |
| 7829 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7897 final core.Map<core.String, core.Object> _json = |
| 7898 new core.Map<core.String, core.Object>(); |
| 7830 if (androidNetworkSubtype != null) { | 7899 if (androidNetworkSubtype != null) { |
| 7831 _json["androidNetworkSubtype"] = androidNetworkSubtype; | 7900 _json["androidNetworkSubtype"] = androidNetworkSubtype; |
| 7832 } | 7901 } |
| 7833 if (androidNetworkType != null) { | 7902 if (androidNetworkType != null) { |
| 7834 _json["androidNetworkType"] = androidNetworkType; | 7903 _json["androidNetworkType"] = androidNetworkType; |
| 7835 } | 7904 } |
| 7836 if (iosNetworkType != null) { | 7905 if (iosNetworkType != null) { |
| 7837 _json["iosNetworkType"] = iosNetworkType; | 7906 _json["iosNetworkType"] = iosNetworkType; |
| 7838 } | 7907 } |
| 7839 if (kind != null) { | 7908 if (kind != null) { |
| 7840 _json["kind"] = kind; | 7909 _json["kind"] = kind; |
| 7841 } | 7910 } |
| 7842 if (networkOperatorCode != null) { | 7911 if (networkOperatorCode != null) { |
| 7843 _json["networkOperatorCode"] = networkOperatorCode; | 7912 _json["networkOperatorCode"] = networkOperatorCode; |
| 7844 } | 7913 } |
| 7845 if (networkOperatorName != null) { | 7914 if (networkOperatorName != null) { |
| 7846 _json["networkOperatorName"] = networkOperatorName; | 7915 _json["networkOperatorName"] = networkOperatorName; |
| 7847 } | 7916 } |
| 7848 if (peerSession != null) { | 7917 if (peerSession != null) { |
| 7849 _json["peerSession"] = peerSession.map((value) => (value).toJson()).toList
(); | 7918 _json["peerSession"] = |
| 7919 peerSession.map((value) => (value).toJson()).toList(); |
| 7850 } | 7920 } |
| 7851 if (socketsUsed != null) { | 7921 if (socketsUsed != null) { |
| 7852 _json["socketsUsed"] = socketsUsed; | 7922 _json["socketsUsed"] = socketsUsed; |
| 7853 } | 7923 } |
| 7854 return _json; | 7924 return _json; |
| 7855 } | 7925 } |
| 7856 } | 7926 } |
| 7857 | 7927 |
| 7858 /** This is a JSON template for a leave room request. */ | 7928 /// This is a JSON template for a leave room request. |
| 7859 class RoomLeaveRequest { | 7929 class RoomLeaveRequest { |
| 7860 /** | 7930 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7861 * Uniquely identifies the type of this resource. Value is always the fixed | 7931 /// string games#roomLeaveRequest. |
| 7862 * string games#roomLeaveRequest. | |
| 7863 */ | |
| 7864 core.String kind; | 7932 core.String kind; |
| 7865 /** Diagnostics for a player leaving the room. */ | 7933 |
| 7934 /// Diagnostics for a player leaving the room. |
| 7866 RoomLeaveDiagnostics leaveDiagnostics; | 7935 RoomLeaveDiagnostics leaveDiagnostics; |
| 7867 /** | 7936 |
| 7868 * Reason for leaving the match. | 7937 /// Reason for leaving the match. |
| 7869 * Possible values are: | 7938 /// Possible values are: |
| 7870 * - "PLAYER_LEFT" - The player chose to leave the room.. | 7939 /// - "PLAYER_LEFT" - The player chose to leave the room.. |
| 7871 * - "GAME_LEFT" - The game chose to remove the player from the room. | 7940 /// - "GAME_LEFT" - The game chose to remove the player from the room. |
| 7872 * - "REALTIME_ABANDONED" - The player switched to another application and | 7941 /// - "REALTIME_ABANDONED" - The player switched to another application and |
| 7873 * abandoned the room. | 7942 /// abandoned the room. |
| 7874 * - "REALTIME_PEER_CONNECTION_FAILURE" - The client was unable to establish a | 7943 /// - "REALTIME_PEER_CONNECTION_FAILURE" - The client was unable to establish |
| 7875 * connection to other peer(s). | 7944 /// a connection to other peer(s). |
| 7876 * - "REALTIME_SERVER_CONNECTION_FAILURE" - The client was unable to | 7945 /// - "REALTIME_SERVER_CONNECTION_FAILURE" - The client was unable to |
| 7877 * communicate with the server. | 7946 /// communicate with the server. |
| 7878 * - "REALTIME_SERVER_ERROR" - The client received an error response when it | 7947 /// - "REALTIME_SERVER_ERROR" - The client received an error response when it |
| 7879 * tried to communicate with the server. | 7948 /// tried to communicate with the server. |
| 7880 * - "REALTIME_TIMEOUT" - The client timed out while waiting for a room. | 7949 /// - "REALTIME_TIMEOUT" - The client timed out while waiting for a room. |
| 7881 * - "REALTIME_CLIENT_DISCONNECTING" - The client disconnects without first | 7950 /// - "REALTIME_CLIENT_DISCONNECTING" - The client disconnects without first |
| 7882 * calling Leave. | 7951 /// calling Leave. |
| 7883 * - "REALTIME_SIGN_OUT" - The user signed out of G+ while in the room. | 7952 /// - "REALTIME_SIGN_OUT" - The user signed out of G+ while in the room. |
| 7884 * - "REALTIME_GAME_CRASHED" - The game crashed. | 7953 /// - "REALTIME_GAME_CRASHED" - The game crashed. |
| 7885 * - "REALTIME_ROOM_SERVICE_CRASHED" - RoomAndroidService crashed. | 7954 /// - "REALTIME_ROOM_SERVICE_CRASHED" - RoomAndroidService crashed. |
| 7886 * - "REALTIME_DIFFERENT_CLIENT_ROOM_OPERATION" - Another client is trying to | 7955 /// - "REALTIME_DIFFERENT_CLIENT_ROOM_OPERATION" - Another client is trying |
| 7887 * enter a room. | 7956 /// to enter a room. |
| 7888 * - "REALTIME_SAME_CLIENT_ROOM_OPERATION" - The same client is trying to | 7957 /// - "REALTIME_SAME_CLIENT_ROOM_OPERATION" - The same client is trying to |
| 7889 * enter a new room. | 7958 /// enter a new room. |
| 7890 */ | |
| 7891 core.String reason; | 7959 core.String reason; |
| 7892 | 7960 |
| 7893 RoomLeaveRequest(); | 7961 RoomLeaveRequest(); |
| 7894 | 7962 |
| 7895 RoomLeaveRequest.fromJson(core.Map _json) { | 7963 RoomLeaveRequest.fromJson(core.Map _json) { |
| 7896 if (_json.containsKey("kind")) { | 7964 if (_json.containsKey("kind")) { |
| 7897 kind = _json["kind"]; | 7965 kind = _json["kind"]; |
| 7898 } | 7966 } |
| 7899 if (_json.containsKey("leaveDiagnostics")) { | 7967 if (_json.containsKey("leaveDiagnostics")) { |
| 7900 leaveDiagnostics = new RoomLeaveDiagnostics.fromJson(_json["leaveDiagnosti
cs"]); | 7968 leaveDiagnostics = |
| 7969 new RoomLeaveDiagnostics.fromJson(_json["leaveDiagnostics"]); |
| 7901 } | 7970 } |
| 7902 if (_json.containsKey("reason")) { | 7971 if (_json.containsKey("reason")) { |
| 7903 reason = _json["reason"]; | 7972 reason = _json["reason"]; |
| 7904 } | 7973 } |
| 7905 } | 7974 } |
| 7906 | 7975 |
| 7907 core.Map<core.String, core.Object> toJson() { | 7976 core.Map<core.String, core.Object> toJson() { |
| 7908 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7977 final core.Map<core.String, core.Object> _json = |
| 7978 new core.Map<core.String, core.Object>(); |
| 7909 if (kind != null) { | 7979 if (kind != null) { |
| 7910 _json["kind"] = kind; | 7980 _json["kind"] = kind; |
| 7911 } | 7981 } |
| 7912 if (leaveDiagnostics != null) { | 7982 if (leaveDiagnostics != null) { |
| 7913 _json["leaveDiagnostics"] = (leaveDiagnostics).toJson(); | 7983 _json["leaveDiagnostics"] = (leaveDiagnostics).toJson(); |
| 7914 } | 7984 } |
| 7915 if (reason != null) { | 7985 if (reason != null) { |
| 7916 _json["reason"] = reason; | 7986 _json["reason"] = reason; |
| 7917 } | 7987 } |
| 7918 return _json; | 7988 return _json; |
| 7919 } | 7989 } |
| 7920 } | 7990 } |
| 7921 | 7991 |
| 7922 /** This is a JSON template for a list of rooms. */ | 7992 /// This is a JSON template for a list of rooms. |
| 7923 class RoomList { | 7993 class RoomList { |
| 7924 /** The rooms. */ | 7994 /// The rooms. |
| 7925 core.List<Room> items; | 7995 core.List<Room> items; |
| 7926 /** | 7996 |
| 7927 * Uniquely identifies the type of this resource. Value is always the fixed | 7997 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7928 * string games#roomList. | 7998 /// string games#roomList. |
| 7929 */ | |
| 7930 core.String kind; | 7999 core.String kind; |
| 7931 /** The pagination token for the next page of results. */ | 8000 |
| 8001 /// The pagination token for the next page of results. |
| 7932 core.String nextPageToken; | 8002 core.String nextPageToken; |
| 7933 | 8003 |
| 7934 RoomList(); | 8004 RoomList(); |
| 7935 | 8005 |
| 7936 RoomList.fromJson(core.Map _json) { | 8006 RoomList.fromJson(core.Map _json) { |
| 7937 if (_json.containsKey("items")) { | 8007 if (_json.containsKey("items")) { |
| 7938 items = _json["items"].map((value) => new Room.fromJson(value)).toList(); | 8008 items = _json["items"].map((value) => new Room.fromJson(value)).toList(); |
| 7939 } | 8009 } |
| 7940 if (_json.containsKey("kind")) { | 8010 if (_json.containsKey("kind")) { |
| 7941 kind = _json["kind"]; | 8011 kind = _json["kind"]; |
| 7942 } | 8012 } |
| 7943 if (_json.containsKey("nextPageToken")) { | 8013 if (_json.containsKey("nextPageToken")) { |
| 7944 nextPageToken = _json["nextPageToken"]; | 8014 nextPageToken = _json["nextPageToken"]; |
| 7945 } | 8015 } |
| 7946 } | 8016 } |
| 7947 | 8017 |
| 7948 core.Map<core.String, core.Object> toJson() { | 8018 core.Map<core.String, core.Object> toJson() { |
| 7949 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8019 final core.Map<core.String, core.Object> _json = |
| 8020 new core.Map<core.String, core.Object>(); |
| 7950 if (items != null) { | 8021 if (items != null) { |
| 7951 _json["items"] = items.map((value) => (value).toJson()).toList(); | 8022 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 7952 } | 8023 } |
| 7953 if (kind != null) { | 8024 if (kind != null) { |
| 7954 _json["kind"] = kind; | 8025 _json["kind"] = kind; |
| 7955 } | 8026 } |
| 7956 if (nextPageToken != null) { | 8027 if (nextPageToken != null) { |
| 7957 _json["nextPageToken"] = nextPageToken; | 8028 _json["nextPageToken"] = nextPageToken; |
| 7958 } | 8029 } |
| 7959 return _json; | 8030 return _json; |
| 7960 } | 8031 } |
| 7961 } | 8032 } |
| 7962 | 8033 |
| 7963 /** This is a JSON template for room modification metadata. */ | 8034 /// This is a JSON template for room modification metadata. |
| 7964 class RoomModification { | 8035 class RoomModification { |
| 7965 /** | 8036 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 7966 * Uniquely identifies the type of this resource. Value is always the fixed | 8037 /// string games#roomModification. |
| 7967 * string games#roomModification. | |
| 7968 */ | |
| 7969 core.String kind; | 8038 core.String kind; |
| 7970 /** | 8039 |
| 7971 * The timestamp at which they modified the room, in milliseconds since the | 8040 /// The timestamp at which they modified the room, in milliseconds since the |
| 7972 * epoch in UTC. | 8041 /// epoch in UTC. |
| 7973 */ | |
| 7974 core.String modifiedTimestampMillis; | 8042 core.String modifiedTimestampMillis; |
| 7975 /** The ID of the participant that modified the room. */ | 8043 |
| 8044 /// The ID of the participant that modified the room. |
| 7976 core.String participantId; | 8045 core.String participantId; |
| 7977 | 8046 |
| 7978 RoomModification(); | 8047 RoomModification(); |
| 7979 | 8048 |
| 7980 RoomModification.fromJson(core.Map _json) { | 8049 RoomModification.fromJson(core.Map _json) { |
| 7981 if (_json.containsKey("kind")) { | 8050 if (_json.containsKey("kind")) { |
| 7982 kind = _json["kind"]; | 8051 kind = _json["kind"]; |
| 7983 } | 8052 } |
| 7984 if (_json.containsKey("modifiedTimestampMillis")) { | 8053 if (_json.containsKey("modifiedTimestampMillis")) { |
| 7985 modifiedTimestampMillis = _json["modifiedTimestampMillis"]; | 8054 modifiedTimestampMillis = _json["modifiedTimestampMillis"]; |
| 7986 } | 8055 } |
| 7987 if (_json.containsKey("participantId")) { | 8056 if (_json.containsKey("participantId")) { |
| 7988 participantId = _json["participantId"]; | 8057 participantId = _json["participantId"]; |
| 7989 } | 8058 } |
| 7990 } | 8059 } |
| 7991 | 8060 |
| 7992 core.Map<core.String, core.Object> toJson() { | 8061 core.Map<core.String, core.Object> toJson() { |
| 7993 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8062 final core.Map<core.String, core.Object> _json = |
| 8063 new core.Map<core.String, core.Object>(); |
| 7994 if (kind != null) { | 8064 if (kind != null) { |
| 7995 _json["kind"] = kind; | 8065 _json["kind"] = kind; |
| 7996 } | 8066 } |
| 7997 if (modifiedTimestampMillis != null) { | 8067 if (modifiedTimestampMillis != null) { |
| 7998 _json["modifiedTimestampMillis"] = modifiedTimestampMillis; | 8068 _json["modifiedTimestampMillis"] = modifiedTimestampMillis; |
| 7999 } | 8069 } |
| 8000 if (participantId != null) { | 8070 if (participantId != null) { |
| 8001 _json["participantId"] = participantId; | 8071 _json["participantId"] = participantId; |
| 8002 } | 8072 } |
| 8003 return _json; | 8073 return _json; |
| 8004 } | 8074 } |
| 8005 } | 8075 } |
| 8006 | 8076 |
| 8007 /** This is a JSON template for an update on the status of a peer in a room. */ | 8077 /// This is a JSON template for an update on the status of a peer in a room. |
| 8008 class RoomP2PStatus { | 8078 class RoomP2PStatus { |
| 8009 /** | 8079 /// The amount of time in milliseconds it took to establish connections with |
| 8010 * The amount of time in milliseconds it took to establish connections with | 8080 /// this peer. |
| 8011 * this peer. | |
| 8012 */ | |
| 8013 core.int connectionSetupLatencyMillis; | 8081 core.int connectionSetupLatencyMillis; |
| 8014 /** | 8082 |
| 8015 * The error code in event of a failure. | 8083 /// The error code in event of a failure. |
| 8016 * Possible values are: | 8084 /// Possible values are: |
| 8017 * - "P2P_FAILED" - The client failed to establish a P2P connection with the | 8085 /// - "P2P_FAILED" - The client failed to establish a P2P connection with the |
| 8018 * peer. | 8086 /// peer. |
| 8019 * - "PRESENCE_FAILED" - The client failed to register to receive P2P | 8087 /// - "PRESENCE_FAILED" - The client failed to register to receive P2P |
| 8020 * connections. | 8088 /// connections. |
| 8021 * - "RELAY_SERVER_FAILED" - The client received an error when trying to use | 8089 /// - "RELAY_SERVER_FAILED" - The client received an error when trying to use |
| 8022 * the relay server to establish a P2P connection with the peer. | 8090 /// the relay server to establish a P2P connection with the peer. |
| 8023 */ | |
| 8024 core.String error; | 8091 core.String error; |
| 8025 /** More detailed diagnostic message returned in event of a failure. */ | 8092 |
| 8093 /// More detailed diagnostic message returned in event of a failure. |
| 8026 core.String errorReason; | 8094 core.String errorReason; |
| 8027 /** | 8095 |
| 8028 * Uniquely identifies the type of this resource. Value is always the fixed | 8096 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 8029 * string games#roomP2PStatus. | 8097 /// string games#roomP2PStatus. |
| 8030 */ | |
| 8031 core.String kind; | 8098 core.String kind; |
| 8032 /** The ID of the participant. */ | 8099 |
| 8100 /// The ID of the participant. |
| 8033 core.String participantId; | 8101 core.String participantId; |
| 8034 /** | 8102 |
| 8035 * The status of the peer in the room. | 8103 /// The status of the peer in the room. |
| 8036 * Possible values are: | 8104 /// Possible values are: |
| 8037 * - "CONNECTION_ESTABLISHED" - The client established a P2P connection with | 8105 /// - "CONNECTION_ESTABLISHED" - The client established a P2P connection with |
| 8038 * the peer. | 8106 /// the peer. |
| 8039 * - "CONNECTION_FAILED" - The client failed to establish directed presence | 8107 /// - "CONNECTION_FAILED" - The client failed to establish directed presence |
| 8040 * with the peer. | 8108 /// with the peer. |
| 8041 */ | |
| 8042 core.String status; | 8109 core.String status; |
| 8043 /** | 8110 |
| 8044 * The amount of time in milliseconds it took to send packets back and forth | 8111 /// The amount of time in milliseconds it took to send packets back and forth |
| 8045 * on the unreliable channel with this peer. | 8112 /// on the unreliable channel with this peer. |
| 8046 */ | |
| 8047 core.int unreliableRoundtripLatencyMillis; | 8113 core.int unreliableRoundtripLatencyMillis; |
| 8048 | 8114 |
| 8049 RoomP2PStatus(); | 8115 RoomP2PStatus(); |
| 8050 | 8116 |
| 8051 RoomP2PStatus.fromJson(core.Map _json) { | 8117 RoomP2PStatus.fromJson(core.Map _json) { |
| 8052 if (_json.containsKey("connectionSetupLatencyMillis")) { | 8118 if (_json.containsKey("connectionSetupLatencyMillis")) { |
| 8053 connectionSetupLatencyMillis = _json["connectionSetupLatencyMillis"]; | 8119 connectionSetupLatencyMillis = _json["connectionSetupLatencyMillis"]; |
| 8054 } | 8120 } |
| 8055 if (_json.containsKey("error")) { | 8121 if (_json.containsKey("error")) { |
| 8056 error = _json["error"]; | 8122 error = _json["error"]; |
| 8057 } | 8123 } |
| 8058 if (_json.containsKey("error_reason")) { | 8124 if (_json.containsKey("error_reason")) { |
| 8059 errorReason = _json["error_reason"]; | 8125 errorReason = _json["error_reason"]; |
| 8060 } | 8126 } |
| 8061 if (_json.containsKey("kind")) { | 8127 if (_json.containsKey("kind")) { |
| 8062 kind = _json["kind"]; | 8128 kind = _json["kind"]; |
| 8063 } | 8129 } |
| 8064 if (_json.containsKey("participantId")) { | 8130 if (_json.containsKey("participantId")) { |
| 8065 participantId = _json["participantId"]; | 8131 participantId = _json["participantId"]; |
| 8066 } | 8132 } |
| 8067 if (_json.containsKey("status")) { | 8133 if (_json.containsKey("status")) { |
| 8068 status = _json["status"]; | 8134 status = _json["status"]; |
| 8069 } | 8135 } |
| 8070 if (_json.containsKey("unreliableRoundtripLatencyMillis")) { | 8136 if (_json.containsKey("unreliableRoundtripLatencyMillis")) { |
| 8071 unreliableRoundtripLatencyMillis = _json["unreliableRoundtripLatencyMillis
"]; | 8137 unreliableRoundtripLatencyMillis = |
| 8138 _json["unreliableRoundtripLatencyMillis"]; |
| 8072 } | 8139 } |
| 8073 } | 8140 } |
| 8074 | 8141 |
| 8075 core.Map<core.String, core.Object> toJson() { | 8142 core.Map<core.String, core.Object> toJson() { |
| 8076 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8143 final core.Map<core.String, core.Object> _json = |
| 8144 new core.Map<core.String, core.Object>(); |
| 8077 if (connectionSetupLatencyMillis != null) { | 8145 if (connectionSetupLatencyMillis != null) { |
| 8078 _json["connectionSetupLatencyMillis"] = connectionSetupLatencyMillis; | 8146 _json["connectionSetupLatencyMillis"] = connectionSetupLatencyMillis; |
| 8079 } | 8147 } |
| 8080 if (error != null) { | 8148 if (error != null) { |
| 8081 _json["error"] = error; | 8149 _json["error"] = error; |
| 8082 } | 8150 } |
| 8083 if (errorReason != null) { | 8151 if (errorReason != null) { |
| 8084 _json["error_reason"] = errorReason; | 8152 _json["error_reason"] = errorReason; |
| 8085 } | 8153 } |
| 8086 if (kind != null) { | 8154 if (kind != null) { |
| 8087 _json["kind"] = kind; | 8155 _json["kind"] = kind; |
| 8088 } | 8156 } |
| 8089 if (participantId != null) { | 8157 if (participantId != null) { |
| 8090 _json["participantId"] = participantId; | 8158 _json["participantId"] = participantId; |
| 8091 } | 8159 } |
| 8092 if (status != null) { | 8160 if (status != null) { |
| 8093 _json["status"] = status; | 8161 _json["status"] = status; |
| 8094 } | 8162 } |
| 8095 if (unreliableRoundtripLatencyMillis != null) { | 8163 if (unreliableRoundtripLatencyMillis != null) { |
| 8096 _json["unreliableRoundtripLatencyMillis"] = unreliableRoundtripLatencyMill
is; | 8164 _json["unreliableRoundtripLatencyMillis"] = |
| 8165 unreliableRoundtripLatencyMillis; |
| 8097 } | 8166 } |
| 8098 return _json; | 8167 return _json; |
| 8099 } | 8168 } |
| 8100 } | 8169 } |
| 8101 | 8170 |
| 8102 /** This is a JSON template for an update on the status of peers in a room. */ | 8171 /// This is a JSON template for an update on the status of peers in a room. |
| 8103 class RoomP2PStatuses { | 8172 class RoomP2PStatuses { |
| 8104 /** | 8173 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 8105 * Uniquely identifies the type of this resource. Value is always the fixed | 8174 /// string games#roomP2PStatuses. |
| 8106 * string games#roomP2PStatuses. | |
| 8107 */ | |
| 8108 core.String kind; | 8175 core.String kind; |
| 8109 /** The updates for the peers. */ | 8176 |
| 8177 /// The updates for the peers. |
| 8110 core.List<RoomP2PStatus> updates; | 8178 core.List<RoomP2PStatus> updates; |
| 8111 | 8179 |
| 8112 RoomP2PStatuses(); | 8180 RoomP2PStatuses(); |
| 8113 | 8181 |
| 8114 RoomP2PStatuses.fromJson(core.Map _json) { | 8182 RoomP2PStatuses.fromJson(core.Map _json) { |
| 8115 if (_json.containsKey("kind")) { | 8183 if (_json.containsKey("kind")) { |
| 8116 kind = _json["kind"]; | 8184 kind = _json["kind"]; |
| 8117 } | 8185 } |
| 8118 if (_json.containsKey("updates")) { | 8186 if (_json.containsKey("updates")) { |
| 8119 updates = _json["updates"].map((value) => new RoomP2PStatus.fromJson(value
)).toList(); | 8187 updates = _json["updates"] |
| 8188 .map((value) => new RoomP2PStatus.fromJson(value)) |
| 8189 .toList(); |
| 8120 } | 8190 } |
| 8121 } | 8191 } |
| 8122 | 8192 |
| 8123 core.Map<core.String, core.Object> toJson() { | 8193 core.Map<core.String, core.Object> toJson() { |
| 8124 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8194 final core.Map<core.String, core.Object> _json = |
| 8195 new core.Map<core.String, core.Object>(); |
| 8125 if (kind != null) { | 8196 if (kind != null) { |
| 8126 _json["kind"] = kind; | 8197 _json["kind"] = kind; |
| 8127 } | 8198 } |
| 8128 if (updates != null) { | 8199 if (updates != null) { |
| 8129 _json["updates"] = updates.map((value) => (value).toJson()).toList(); | 8200 _json["updates"] = updates.map((value) => (value).toJson()).toList(); |
| 8130 } | 8201 } |
| 8131 return _json; | 8202 return _json; |
| 8132 } | 8203 } |
| 8133 } | 8204 } |
| 8134 | 8205 |
| 8135 /** This is a JSON template for a participant in a room. */ | 8206 /// This is a JSON template for a participant in a room. |
| 8136 class RoomParticipant { | 8207 class RoomParticipant { |
| 8137 /** True if this participant was auto-matched with the requesting player. */ | 8208 /// True if this participant was auto-matched with the requesting player. |
| 8138 core.bool autoMatched; | 8209 core.bool autoMatched; |
| 8139 /** | 8210 |
| 8140 * Information about a player that has been anonymously auto-matched against | 8211 /// Information about a player that has been anonymously auto-matched against |
| 8141 * the requesting player. (Either player or autoMatchedPlayer will be set.) | 8212 /// the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 8142 */ | |
| 8143 AnonymousPlayer autoMatchedPlayer; | 8213 AnonymousPlayer autoMatchedPlayer; |
| 8144 /** | 8214 |
| 8145 * The capabilities which can be used when communicating with this | 8215 /// The capabilities which can be used when communicating with this |
| 8146 * participant. | 8216 /// participant. |
| 8147 */ | |
| 8148 core.List<core.String> capabilities; | 8217 core.List<core.String> capabilities; |
| 8149 /** Client address for the participant. */ | 8218 |
| 8219 /// Client address for the participant. |
| 8150 RoomClientAddress clientAddress; | 8220 RoomClientAddress clientAddress; |
| 8151 /** | 8221 |
| 8152 * True if this participant is in the fully connected set of peers in the | 8222 /// True if this participant is in the fully connected set of peers in the |
| 8153 * room. | 8223 /// room. |
| 8154 */ | |
| 8155 core.bool connected; | 8224 core.bool connected; |
| 8156 /** | 8225 |
| 8157 * An identifier for the participant in the scope of the room. Cannot be used | 8226 /// An identifier for the participant in the scope of the room. Cannot be |
| 8158 * to identify a player across rooms or in other contexts. | 8227 /// used to identify a player across rooms or in other contexts. |
| 8159 */ | |
| 8160 core.String id; | 8228 core.String id; |
| 8161 /** | 8229 |
| 8162 * Uniquely identifies the type of this resource. Value is always the fixed | 8230 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 8163 * string games#roomParticipant. | 8231 /// string games#roomParticipant. |
| 8164 */ | |
| 8165 core.String kind; | 8232 core.String kind; |
| 8166 /** | 8233 |
| 8167 * The reason the participant left the room; populated if the participant | 8234 /// The reason the participant left the room; populated if the participant |
| 8168 * status is PARTICIPANT_LEFT. | 8235 /// status is PARTICIPANT_LEFT. |
| 8169 * Possible values are: | 8236 /// Possible values are: |
| 8170 * - "PLAYER_LEFT" - The player explicitly chose to leave the room. | 8237 /// - "PLAYER_LEFT" - The player explicitly chose to leave the room. |
| 8171 * - "GAME_LEFT" - The game chose to remove the player from the room. | 8238 /// - "GAME_LEFT" - The game chose to remove the player from the room. |
| 8172 * - "ABANDONED" - The player switched to another application and abandoned | 8239 /// - "ABANDONED" - The player switched to another application and abandoned |
| 8173 * the room. | 8240 /// the room. |
| 8174 * - "PEER_CONNECTION_FAILURE" - The client was unable to establish or | 8241 /// - "PEER_CONNECTION_FAILURE" - The client was unable to establish or |
| 8175 * maintain a connection to other peer(s) in the room. | 8242 /// maintain a connection to other peer(s) in the room. |
| 8176 * - "SERVER_ERROR" - The client received an error response when it tried to | 8243 /// - "SERVER_ERROR" - The client received an error response when it tried to |
| 8177 * communicate with the server. | 8244 /// communicate with the server. |
| 8178 * - "TIMEOUT" - The client timed out while waiting for players to join and | 8245 /// - "TIMEOUT" - The client timed out while waiting for players to join and |
| 8179 * connect. | 8246 /// connect. |
| 8180 * - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly. | 8247 /// - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly. |
| 8181 */ | |
| 8182 core.String leaveReason; | 8248 core.String leaveReason; |
| 8183 /** | 8249 |
| 8184 * Information about the player. Not populated if this player was anonymously | 8250 /// Information about the player. Not populated if this player was |
| 8185 * auto-matched against the requesting player. (Either player or | 8251 /// anonymously auto-matched against the requesting player. (Either player or |
| 8186 * autoMatchedPlayer will be set.) | 8252 /// autoMatchedPlayer will be set.) |
| 8187 */ | |
| 8188 Player player; | 8253 Player player; |
| 8189 /** | 8254 |
| 8190 * The status of the participant with respect to the room. | 8255 /// The status of the participant with respect to the room. |
| 8191 * Possible values are: | 8256 /// Possible values are: |
| 8192 * - "PARTICIPANT_INVITED" - The participant has been invited to join the | 8257 /// - "PARTICIPANT_INVITED" - The participant has been invited to join the |
| 8193 * room, but has not yet responded. | 8258 /// room, but has not yet responded. |
| 8194 * - "PARTICIPANT_JOINED" - The participant has joined the room (either after | 8259 /// - "PARTICIPANT_JOINED" - The participant has joined the room (either |
| 8195 * creating it or accepting an invitation.) | 8260 /// after creating it or accepting an invitation.) |
| 8196 * - "PARTICIPANT_DECLINED" - The participant declined an invitation to join | 8261 /// - "PARTICIPANT_DECLINED" - The participant declined an invitation to join |
| 8197 * the room. | 8262 /// the room. |
| 8198 * - "PARTICIPANT_LEFT" - The participant joined the room and then left it. | 8263 /// - "PARTICIPANT_LEFT" - The participant joined the room and then left it. |
| 8199 */ | |
| 8200 core.String status; | 8264 core.String status; |
| 8201 | 8265 |
| 8202 RoomParticipant(); | 8266 RoomParticipant(); |
| 8203 | 8267 |
| 8204 RoomParticipant.fromJson(core.Map _json) { | 8268 RoomParticipant.fromJson(core.Map _json) { |
| 8205 if (_json.containsKey("autoMatched")) { | 8269 if (_json.containsKey("autoMatched")) { |
| 8206 autoMatched = _json["autoMatched"]; | 8270 autoMatched = _json["autoMatched"]; |
| 8207 } | 8271 } |
| 8208 if (_json.containsKey("autoMatchedPlayer")) { | 8272 if (_json.containsKey("autoMatchedPlayer")) { |
| 8209 autoMatchedPlayer = new AnonymousPlayer.fromJson(_json["autoMatchedPlayer"
]); | 8273 autoMatchedPlayer = |
| 8274 new AnonymousPlayer.fromJson(_json["autoMatchedPlayer"]); |
| 8210 } | 8275 } |
| 8211 if (_json.containsKey("capabilities")) { | 8276 if (_json.containsKey("capabilities")) { |
| 8212 capabilities = _json["capabilities"]; | 8277 capabilities = _json["capabilities"]; |
| 8213 } | 8278 } |
| 8214 if (_json.containsKey("clientAddress")) { | 8279 if (_json.containsKey("clientAddress")) { |
| 8215 clientAddress = new RoomClientAddress.fromJson(_json["clientAddress"]); | 8280 clientAddress = new RoomClientAddress.fromJson(_json["clientAddress"]); |
| 8216 } | 8281 } |
| 8217 if (_json.containsKey("connected")) { | 8282 if (_json.containsKey("connected")) { |
| 8218 connected = _json["connected"]; | 8283 connected = _json["connected"]; |
| 8219 } | 8284 } |
| 8220 if (_json.containsKey("id")) { | 8285 if (_json.containsKey("id")) { |
| 8221 id = _json["id"]; | 8286 id = _json["id"]; |
| 8222 } | 8287 } |
| 8223 if (_json.containsKey("kind")) { | 8288 if (_json.containsKey("kind")) { |
| 8224 kind = _json["kind"]; | 8289 kind = _json["kind"]; |
| 8225 } | 8290 } |
| 8226 if (_json.containsKey("leaveReason")) { | 8291 if (_json.containsKey("leaveReason")) { |
| 8227 leaveReason = _json["leaveReason"]; | 8292 leaveReason = _json["leaveReason"]; |
| 8228 } | 8293 } |
| 8229 if (_json.containsKey("player")) { | 8294 if (_json.containsKey("player")) { |
| 8230 player = new Player.fromJson(_json["player"]); | 8295 player = new Player.fromJson(_json["player"]); |
| 8231 } | 8296 } |
| 8232 if (_json.containsKey("status")) { | 8297 if (_json.containsKey("status")) { |
| 8233 status = _json["status"]; | 8298 status = _json["status"]; |
| 8234 } | 8299 } |
| 8235 } | 8300 } |
| 8236 | 8301 |
| 8237 core.Map<core.String, core.Object> toJson() { | 8302 core.Map<core.String, core.Object> toJson() { |
| 8238 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8303 final core.Map<core.String, core.Object> _json = |
| 8304 new core.Map<core.String, core.Object>(); |
| 8239 if (autoMatched != null) { | 8305 if (autoMatched != null) { |
| 8240 _json["autoMatched"] = autoMatched; | 8306 _json["autoMatched"] = autoMatched; |
| 8241 } | 8307 } |
| 8242 if (autoMatchedPlayer != null) { | 8308 if (autoMatchedPlayer != null) { |
| 8243 _json["autoMatchedPlayer"] = (autoMatchedPlayer).toJson(); | 8309 _json["autoMatchedPlayer"] = (autoMatchedPlayer).toJson(); |
| 8244 } | 8310 } |
| 8245 if (capabilities != null) { | 8311 if (capabilities != null) { |
| 8246 _json["capabilities"] = capabilities; | 8312 _json["capabilities"] = capabilities; |
| 8247 } | 8313 } |
| 8248 if (clientAddress != null) { | 8314 if (clientAddress != null) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 8263 if (player != null) { | 8329 if (player != null) { |
| 8264 _json["player"] = (player).toJson(); | 8330 _json["player"] = (player).toJson(); |
| 8265 } | 8331 } |
| 8266 if (status != null) { | 8332 if (status != null) { |
| 8267 _json["status"] = status; | 8333 _json["status"] = status; |
| 8268 } | 8334 } |
| 8269 return _json; | 8335 return _json; |
| 8270 } | 8336 } |
| 8271 } | 8337 } |
| 8272 | 8338 |
| 8273 /** | 8339 /// This is a JSON template for the status of a room that the player has |
| 8274 * This is a JSON template for the status of a room that the player has joined. | 8340 /// joined. |
| 8275 */ | |
| 8276 class RoomStatus { | 8341 class RoomStatus { |
| 8277 /** | 8342 /// Auto-matching status for this room. Not set if the room is not currently |
| 8278 * Auto-matching status for this room. Not set if the room is not currently in | 8343 /// in the automatching queue. |
| 8279 * the automatching queue. | |
| 8280 */ | |
| 8281 RoomAutoMatchStatus autoMatchingStatus; | 8344 RoomAutoMatchStatus autoMatchingStatus; |
| 8282 /** | 8345 |
| 8283 * Uniquely identifies the type of this resource. Value is always the fixed | 8346 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 8284 * string games#roomStatus. | 8347 /// string games#roomStatus. |
| 8285 */ | |
| 8286 core.String kind; | 8348 core.String kind; |
| 8287 /** | 8349 |
| 8288 * The participants involved in the room, along with their statuses. Includes | 8350 /// The participants involved in the room, along with their statuses. |
| 8289 * participants who have left or declined invitations. | 8351 /// Includes participants who have left or declined invitations. |
| 8290 */ | |
| 8291 core.List<RoomParticipant> participants; | 8352 core.List<RoomParticipant> participants; |
| 8292 /** Globally unique ID for a room. */ | 8353 |
| 8354 /// Globally unique ID for a room. |
| 8293 core.String roomId; | 8355 core.String roomId; |
| 8294 /** | 8356 |
| 8295 * The status of the room. | 8357 /// The status of the room. |
| 8296 * Possible values are: | 8358 /// Possible values are: |
| 8297 * - "ROOM_INVITING" - One or more players have been invited and not | 8359 /// - "ROOM_INVITING" - One or more players have been invited and not |
| 8298 * responded. | 8360 /// responded. |
| 8299 * - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by | 8361 /// - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by |
| 8300 * auto-matching. | 8362 /// auto-matching. |
| 8301 * - "ROOM_CONNECTING" - Players have joined are connecting to each other | 8363 /// - "ROOM_CONNECTING" - Players have joined are connecting to each other |
| 8302 * (either before or after auto-matching). | 8364 /// (either before or after auto-matching). |
| 8303 * - "ROOM_ACTIVE" - All players have joined and connected to each other. | 8365 /// - "ROOM_ACTIVE" - All players have joined and connected to each other. |
| 8304 * - "ROOM_DELETED" - All joined players have left. | 8366 /// - "ROOM_DELETED" - All joined players have left. |
| 8305 */ | |
| 8306 core.String status; | 8367 core.String status; |
| 8307 /** | 8368 |
| 8308 * The version of the status for the room: an increasing counter, used by the | 8369 /// The version of the status for the room: an increasing counter, used by |
| 8309 * client to ignore out-of-order updates to room status. | 8370 /// the client to ignore out-of-order updates to room status. |
| 8310 */ | |
| 8311 core.int statusVersion; | 8371 core.int statusVersion; |
| 8312 | 8372 |
| 8313 RoomStatus(); | 8373 RoomStatus(); |
| 8314 | 8374 |
| 8315 RoomStatus.fromJson(core.Map _json) { | 8375 RoomStatus.fromJson(core.Map _json) { |
| 8316 if (_json.containsKey("autoMatchingStatus")) { | 8376 if (_json.containsKey("autoMatchingStatus")) { |
| 8317 autoMatchingStatus = new RoomAutoMatchStatus.fromJson(_json["autoMatchingS
tatus"]); | 8377 autoMatchingStatus = |
| 8378 new RoomAutoMatchStatus.fromJson(_json["autoMatchingStatus"]); |
| 8318 } | 8379 } |
| 8319 if (_json.containsKey("kind")) { | 8380 if (_json.containsKey("kind")) { |
| 8320 kind = _json["kind"]; | 8381 kind = _json["kind"]; |
| 8321 } | 8382 } |
| 8322 if (_json.containsKey("participants")) { | 8383 if (_json.containsKey("participants")) { |
| 8323 participants = _json["participants"].map((value) => new RoomParticipant.fr
omJson(value)).toList(); | 8384 participants = _json["participants"] |
| 8385 .map((value) => new RoomParticipant.fromJson(value)) |
| 8386 .toList(); |
| 8324 } | 8387 } |
| 8325 if (_json.containsKey("roomId")) { | 8388 if (_json.containsKey("roomId")) { |
| 8326 roomId = _json["roomId"]; | 8389 roomId = _json["roomId"]; |
| 8327 } | 8390 } |
| 8328 if (_json.containsKey("status")) { | 8391 if (_json.containsKey("status")) { |
| 8329 status = _json["status"]; | 8392 status = _json["status"]; |
| 8330 } | 8393 } |
| 8331 if (_json.containsKey("statusVersion")) { | 8394 if (_json.containsKey("statusVersion")) { |
| 8332 statusVersion = _json["statusVersion"]; | 8395 statusVersion = _json["statusVersion"]; |
| 8333 } | 8396 } |
| 8334 } | 8397 } |
| 8335 | 8398 |
| 8336 core.Map<core.String, core.Object> toJson() { | 8399 core.Map<core.String, core.Object> toJson() { |
| 8337 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8400 final core.Map<core.String, core.Object> _json = |
| 8401 new core.Map<core.String, core.Object>(); |
| 8338 if (autoMatchingStatus != null) { | 8402 if (autoMatchingStatus != null) { |
| 8339 _json["autoMatchingStatus"] = (autoMatchingStatus).toJson(); | 8403 _json["autoMatchingStatus"] = (autoMatchingStatus).toJson(); |
| 8340 } | 8404 } |
| 8341 if (kind != null) { | 8405 if (kind != null) { |
| 8342 _json["kind"] = kind; | 8406 _json["kind"] = kind; |
| 8343 } | 8407 } |
| 8344 if (participants != null) { | 8408 if (participants != null) { |
| 8345 _json["participants"] = participants.map((value) => (value).toJson()).toLi
st(); | 8409 _json["participants"] = |
| 8410 participants.map((value) => (value).toJson()).toList(); |
| 8346 } | 8411 } |
| 8347 if (roomId != null) { | 8412 if (roomId != null) { |
| 8348 _json["roomId"] = roomId; | 8413 _json["roomId"] = roomId; |
| 8349 } | 8414 } |
| 8350 if (status != null) { | 8415 if (status != null) { |
| 8351 _json["status"] = status; | 8416 _json["status"] = status; |
| 8352 } | 8417 } |
| 8353 if (statusVersion != null) { | 8418 if (statusVersion != null) { |
| 8354 _json["statusVersion"] = statusVersion; | 8419 _json["statusVersion"] = statusVersion; |
| 8355 } | 8420 } |
| 8356 return _json; | 8421 return _json; |
| 8357 } | 8422 } |
| 8358 } | 8423 } |
| 8359 | 8424 |
| 8360 /** This is a JSON template for a request to submit a score to leaderboards. */ | 8425 /// This is a JSON template for a request to submit a score to leaderboards. |
| 8361 class ScoreSubmission { | 8426 class ScoreSubmission { |
| 8362 /** | 8427 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 8363 * Uniquely identifies the type of this resource. Value is always the fixed | 8428 /// string games#scoreSubmission. |
| 8364 * string games#scoreSubmission. | |
| 8365 */ | |
| 8366 core.String kind; | 8429 core.String kind; |
| 8367 /** The leaderboard this score is being submitted to. */ | 8430 |
| 8431 /// The leaderboard this score is being submitted to. |
| 8368 core.String leaderboardId; | 8432 core.String leaderboardId; |
| 8369 /** The new score being submitted. */ | 8433 |
| 8434 /// The new score being submitted. |
| 8370 core.String score; | 8435 core.String score; |
| 8371 /** | 8436 |
| 8372 * Additional information about this score. Values will contain no more than | 8437 /// Additional information about this score. Values will contain no more than |
| 8373 * 64 URI-safe characters as defined by section 2.3 of RFC 3986. | 8438 /// 64 URI-safe characters as defined by section 2.3 of RFC 3986. |
| 8374 */ | |
| 8375 core.String scoreTag; | 8439 core.String scoreTag; |
| 8376 /** | 8440 |
| 8377 * Signature Values will contain URI-safe characters as defined by section 2.3 | 8441 /// Signature Values will contain URI-safe characters as defined by section |
| 8378 * of RFC 3986. | 8442 /// 2.3 of RFC 3986. |
| 8379 */ | |
| 8380 core.String signature; | 8443 core.String signature; |
| 8381 | 8444 |
| 8382 ScoreSubmission(); | 8445 ScoreSubmission(); |
| 8383 | 8446 |
| 8384 ScoreSubmission.fromJson(core.Map _json) { | 8447 ScoreSubmission.fromJson(core.Map _json) { |
| 8385 if (_json.containsKey("kind")) { | 8448 if (_json.containsKey("kind")) { |
| 8386 kind = _json["kind"]; | 8449 kind = _json["kind"]; |
| 8387 } | 8450 } |
| 8388 if (_json.containsKey("leaderboardId")) { | 8451 if (_json.containsKey("leaderboardId")) { |
| 8389 leaderboardId = _json["leaderboardId"]; | 8452 leaderboardId = _json["leaderboardId"]; |
| 8390 } | 8453 } |
| 8391 if (_json.containsKey("score")) { | 8454 if (_json.containsKey("score")) { |
| 8392 score = _json["score"]; | 8455 score = _json["score"]; |
| 8393 } | 8456 } |
| 8394 if (_json.containsKey("scoreTag")) { | 8457 if (_json.containsKey("scoreTag")) { |
| 8395 scoreTag = _json["scoreTag"]; | 8458 scoreTag = _json["scoreTag"]; |
| 8396 } | 8459 } |
| 8397 if (_json.containsKey("signature")) { | 8460 if (_json.containsKey("signature")) { |
| 8398 signature = _json["signature"]; | 8461 signature = _json["signature"]; |
| 8399 } | 8462 } |
| 8400 } | 8463 } |
| 8401 | 8464 |
| 8402 core.Map<core.String, core.Object> toJson() { | 8465 core.Map<core.String, core.Object> toJson() { |
| 8403 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8466 final core.Map<core.String, core.Object> _json = |
| 8467 new core.Map<core.String, core.Object>(); |
| 8404 if (kind != null) { | 8468 if (kind != null) { |
| 8405 _json["kind"] = kind; | 8469 _json["kind"] = kind; |
| 8406 } | 8470 } |
| 8407 if (leaderboardId != null) { | 8471 if (leaderboardId != null) { |
| 8408 _json["leaderboardId"] = leaderboardId; | 8472 _json["leaderboardId"] = leaderboardId; |
| 8409 } | 8473 } |
| 8410 if (score != null) { | 8474 if (score != null) { |
| 8411 _json["score"] = score; | 8475 _json["score"] = score; |
| 8412 } | 8476 } |
| 8413 if (scoreTag != null) { | 8477 if (scoreTag != null) { |
| 8414 _json["scoreTag"] = scoreTag; | 8478 _json["scoreTag"] = scoreTag; |
| 8415 } | 8479 } |
| 8416 if (signature != null) { | 8480 if (signature != null) { |
| 8417 _json["signature"] = signature; | 8481 _json["signature"] = signature; |
| 8418 } | 8482 } |
| 8419 return _json; | 8483 return _json; |
| 8420 } | 8484 } |
| 8421 } | 8485 } |
| 8422 | 8486 |
| 8423 /** This is a JSON template for an snapshot object. */ | 8487 /// This is a JSON template for an snapshot object. |
| 8424 class Snapshot { | 8488 class Snapshot { |
| 8425 /** The cover image of this snapshot. May be absent if there is no image. */ | 8489 /// The cover image of this snapshot. May be absent if there is no image. |
| 8426 SnapshotImage coverImage; | 8490 SnapshotImage coverImage; |
| 8427 /** The description of this snapshot. */ | 8491 |
| 8492 /// The description of this snapshot. |
| 8428 core.String description; | 8493 core.String description; |
| 8429 /** | 8494 |
| 8430 * The ID of the file underlying this snapshot in the Drive API. Only present | 8495 /// The ID of the file underlying this snapshot in the Drive API. Only |
| 8431 * if the snapshot is a view on a Drive file and the file is owned by the | 8496 /// present if the snapshot is a view on a Drive file and the file is owned |
| 8432 * caller. | 8497 /// by the caller. |
| 8433 */ | |
| 8434 core.String driveId; | 8498 core.String driveId; |
| 8435 /** The duration associated with this snapshot, in millis. */ | 8499 |
| 8500 /// The duration associated with this snapshot, in millis. |
| 8436 core.String durationMillis; | 8501 core.String durationMillis; |
| 8437 /** The ID of the snapshot. */ | 8502 |
| 8503 /// The ID of the snapshot. |
| 8438 core.String id; | 8504 core.String id; |
| 8439 /** | 8505 |
| 8440 * Uniquely identifies the type of this resource. Value is always the fixed | 8506 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 8441 * string games#snapshot. | 8507 /// string games#snapshot. |
| 8442 */ | |
| 8443 core.String kind; | 8508 core.String kind; |
| 8444 /** | 8509 |
| 8445 * The timestamp (in millis since Unix epoch) of the last modification to this | 8510 /// The timestamp (in millis since Unix epoch) of the last modification to |
| 8446 * snapshot. | 8511 /// this snapshot. |
| 8447 */ | |
| 8448 core.String lastModifiedMillis; | 8512 core.String lastModifiedMillis; |
| 8449 /** | 8513 |
| 8450 * The progress value (64-bit integer set by developer) associated with this | 8514 /// The progress value (64-bit integer set by developer) associated with this |
| 8451 * snapshot. | 8515 /// snapshot. |
| 8452 */ | |
| 8453 core.String progressValue; | 8516 core.String progressValue; |
| 8454 /** The title of this snapshot. */ | 8517 |
| 8518 /// The title of this snapshot. |
| 8455 core.String title; | 8519 core.String title; |
| 8456 /** | 8520 |
| 8457 * The type of this snapshot. | 8521 /// The type of this snapshot. |
| 8458 * Possible values are: | 8522 /// Possible values are: |
| 8459 * - "SAVE_GAME" - A snapshot representing a save game. | 8523 /// - "SAVE_GAME" - A snapshot representing a save game. |
| 8460 */ | |
| 8461 core.String type; | 8524 core.String type; |
| 8462 /** The unique name provided when the snapshot was created. */ | 8525 |
| 8526 /// The unique name provided when the snapshot was created. |
| 8463 core.String uniqueName; | 8527 core.String uniqueName; |
| 8464 | 8528 |
| 8465 Snapshot(); | 8529 Snapshot(); |
| 8466 | 8530 |
| 8467 Snapshot.fromJson(core.Map _json) { | 8531 Snapshot.fromJson(core.Map _json) { |
| 8468 if (_json.containsKey("coverImage")) { | 8532 if (_json.containsKey("coverImage")) { |
| 8469 coverImage = new SnapshotImage.fromJson(_json["coverImage"]); | 8533 coverImage = new SnapshotImage.fromJson(_json["coverImage"]); |
| 8470 } | 8534 } |
| 8471 if (_json.containsKey("description")) { | 8535 if (_json.containsKey("description")) { |
| 8472 description = _json["description"]; | 8536 description = _json["description"]; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 8494 } | 8558 } |
| 8495 if (_json.containsKey("type")) { | 8559 if (_json.containsKey("type")) { |
| 8496 type = _json["type"]; | 8560 type = _json["type"]; |
| 8497 } | 8561 } |
| 8498 if (_json.containsKey("uniqueName")) { | 8562 if (_json.containsKey("uniqueName")) { |
| 8499 uniqueName = _json["uniqueName"]; | 8563 uniqueName = _json["uniqueName"]; |
| 8500 } | 8564 } |
| 8501 } | 8565 } |
| 8502 | 8566 |
| 8503 core.Map<core.String, core.Object> toJson() { | 8567 core.Map<core.String, core.Object> toJson() { |
| 8504 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8568 final core.Map<core.String, core.Object> _json = |
| 8569 new core.Map<core.String, core.Object>(); |
| 8505 if (coverImage != null) { | 8570 if (coverImage != null) { |
| 8506 _json["coverImage"] = (coverImage).toJson(); | 8571 _json["coverImage"] = (coverImage).toJson(); |
| 8507 } | 8572 } |
| 8508 if (description != null) { | 8573 if (description != null) { |
| 8509 _json["description"] = description; | 8574 _json["description"] = description; |
| 8510 } | 8575 } |
| 8511 if (driveId != null) { | 8576 if (driveId != null) { |
| 8512 _json["driveId"] = driveId; | 8577 _json["driveId"] = driveId; |
| 8513 } | 8578 } |
| 8514 if (durationMillis != null) { | 8579 if (durationMillis != null) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 8532 if (type != null) { | 8597 if (type != null) { |
| 8533 _json["type"] = type; | 8598 _json["type"] = type; |
| 8534 } | 8599 } |
| 8535 if (uniqueName != null) { | 8600 if (uniqueName != null) { |
| 8536 _json["uniqueName"] = uniqueName; | 8601 _json["uniqueName"] = uniqueName; |
| 8537 } | 8602 } |
| 8538 return _json; | 8603 return _json; |
| 8539 } | 8604 } |
| 8540 } | 8605 } |
| 8541 | 8606 |
| 8542 /** This is a JSON template for an image of a snapshot. */ | 8607 /// This is a JSON template for an image of a snapshot. |
| 8543 class SnapshotImage { | 8608 class SnapshotImage { |
| 8544 /** The height of the image. */ | 8609 /// The height of the image. |
| 8545 core.int height; | 8610 core.int height; |
| 8546 /** | 8611 |
| 8547 * Uniquely identifies the type of this resource. Value is always the fixed | 8612 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 8548 * string games#snapshotImage. | 8613 /// string games#snapshotImage. |
| 8549 */ | |
| 8550 core.String kind; | 8614 core.String kind; |
| 8551 /** The MIME type of the image. */ | 8615 |
| 8616 /// The MIME type of the image. |
| 8552 core.String mimeType; | 8617 core.String mimeType; |
| 8553 /** | 8618 |
| 8554 * The URL of the image. This URL may be invalidated at any time and should | 8619 /// The URL of the image. This URL may be invalidated at any time and should |
| 8555 * not be cached. | 8620 /// not be cached. |
| 8556 */ | |
| 8557 core.String url; | 8621 core.String url; |
| 8558 /** The width of the image. */ | 8622 |
| 8623 /// The width of the image. |
| 8559 core.int width; | 8624 core.int width; |
| 8560 | 8625 |
| 8561 SnapshotImage(); | 8626 SnapshotImage(); |
| 8562 | 8627 |
| 8563 SnapshotImage.fromJson(core.Map _json) { | 8628 SnapshotImage.fromJson(core.Map _json) { |
| 8564 if (_json.containsKey("height")) { | 8629 if (_json.containsKey("height")) { |
| 8565 height = _json["height"]; | 8630 height = _json["height"]; |
| 8566 } | 8631 } |
| 8567 if (_json.containsKey("kind")) { | 8632 if (_json.containsKey("kind")) { |
| 8568 kind = _json["kind"]; | 8633 kind = _json["kind"]; |
| 8569 } | 8634 } |
| 8570 if (_json.containsKey("mime_type")) { | 8635 if (_json.containsKey("mime_type")) { |
| 8571 mimeType = _json["mime_type"]; | 8636 mimeType = _json["mime_type"]; |
| 8572 } | 8637 } |
| 8573 if (_json.containsKey("url")) { | 8638 if (_json.containsKey("url")) { |
| 8574 url = _json["url"]; | 8639 url = _json["url"]; |
| 8575 } | 8640 } |
| 8576 if (_json.containsKey("width")) { | 8641 if (_json.containsKey("width")) { |
| 8577 width = _json["width"]; | 8642 width = _json["width"]; |
| 8578 } | 8643 } |
| 8579 } | 8644 } |
| 8580 | 8645 |
| 8581 core.Map<core.String, core.Object> toJson() { | 8646 core.Map<core.String, core.Object> toJson() { |
| 8582 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8647 final core.Map<core.String, core.Object> _json = |
| 8648 new core.Map<core.String, core.Object>(); |
| 8583 if (height != null) { | 8649 if (height != null) { |
| 8584 _json["height"] = height; | 8650 _json["height"] = height; |
| 8585 } | 8651 } |
| 8586 if (kind != null) { | 8652 if (kind != null) { |
| 8587 _json["kind"] = kind; | 8653 _json["kind"] = kind; |
| 8588 } | 8654 } |
| 8589 if (mimeType != null) { | 8655 if (mimeType != null) { |
| 8590 _json["mime_type"] = mimeType; | 8656 _json["mime_type"] = mimeType; |
| 8591 } | 8657 } |
| 8592 if (url != null) { | 8658 if (url != null) { |
| 8593 _json["url"] = url; | 8659 _json["url"] = url; |
| 8594 } | 8660 } |
| 8595 if (width != null) { | 8661 if (width != null) { |
| 8596 _json["width"] = width; | 8662 _json["width"] = width; |
| 8597 } | 8663 } |
| 8598 return _json; | 8664 return _json; |
| 8599 } | 8665 } |
| 8600 } | 8666 } |
| 8601 | 8667 |
| 8602 /** This is a JSON template for a list of snapshot objects. */ | 8668 /// This is a JSON template for a list of snapshot objects. |
| 8603 class SnapshotListResponse { | 8669 class SnapshotListResponse { |
| 8604 /** The snapshots. */ | 8670 /// The snapshots. |
| 8605 core.List<Snapshot> items; | 8671 core.List<Snapshot> items; |
| 8606 /** | 8672 |
| 8607 * Uniquely identifies the type of this resource. Value is always the fixed | 8673 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 8608 * string games#snapshotListResponse. | 8674 /// string games#snapshotListResponse. |
| 8609 */ | |
| 8610 core.String kind; | 8675 core.String kind; |
| 8611 /** | 8676 |
| 8612 * Token corresponding to the next page of results. If there are no more | 8677 /// Token corresponding to the next page of results. If there are no more |
| 8613 * results, the token is omitted. | 8678 /// results, the token is omitted. |
| 8614 */ | |
| 8615 core.String nextPageToken; | 8679 core.String nextPageToken; |
| 8616 | 8680 |
| 8617 SnapshotListResponse(); | 8681 SnapshotListResponse(); |
| 8618 | 8682 |
| 8619 SnapshotListResponse.fromJson(core.Map _json) { | 8683 SnapshotListResponse.fromJson(core.Map _json) { |
| 8620 if (_json.containsKey("items")) { | 8684 if (_json.containsKey("items")) { |
| 8621 items = _json["items"].map((value) => new Snapshot.fromJson(value)).toList
(); | 8685 items = |
| 8686 _json["items"].map((value) => new Snapshot.fromJson(value)).toList(); |
| 8622 } | 8687 } |
| 8623 if (_json.containsKey("kind")) { | 8688 if (_json.containsKey("kind")) { |
| 8624 kind = _json["kind"]; | 8689 kind = _json["kind"]; |
| 8625 } | 8690 } |
| 8626 if (_json.containsKey("nextPageToken")) { | 8691 if (_json.containsKey("nextPageToken")) { |
| 8627 nextPageToken = _json["nextPageToken"]; | 8692 nextPageToken = _json["nextPageToken"]; |
| 8628 } | 8693 } |
| 8629 } | 8694 } |
| 8630 | 8695 |
| 8631 core.Map<core.String, core.Object> toJson() { | 8696 core.Map<core.String, core.Object> toJson() { |
| 8632 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8697 final core.Map<core.String, core.Object> _json = |
| 8698 new core.Map<core.String, core.Object>(); |
| 8633 if (items != null) { | 8699 if (items != null) { |
| 8634 _json["items"] = items.map((value) => (value).toJson()).toList(); | 8700 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 8635 } | 8701 } |
| 8636 if (kind != null) { | 8702 if (kind != null) { |
| 8637 _json["kind"] = kind; | 8703 _json["kind"] = kind; |
| 8638 } | 8704 } |
| 8639 if (nextPageToken != null) { | 8705 if (nextPageToken != null) { |
| 8640 _json["nextPageToken"] = nextPageToken; | 8706 _json["nextPageToken"] = nextPageToken; |
| 8641 } | 8707 } |
| 8642 return _json; | 8708 return _json; |
| 8643 } | 8709 } |
| 8644 } | 8710 } |
| 8645 | 8711 |
| 8646 /** This is a JSON template for an turn-based auto-match criteria object. */ | 8712 /// This is a JSON template for an turn-based auto-match criteria object. |
| 8647 class TurnBasedAutoMatchingCriteria { | 8713 class TurnBasedAutoMatchingCriteria { |
| 8648 /** | 8714 /// A bitmask indicating when auto-matches are valid. When ANDed with other |
| 8649 * A bitmask indicating when auto-matches are valid. When ANDed with other | 8715 /// exclusive bitmasks, the result must be zero. Can be used to support |
| 8650 * exclusive bitmasks, the result must be zero. Can be used to support | 8716 /// exclusive roles within a game. |
| 8651 * exclusive roles within a game. | |
| 8652 */ | |
| 8653 core.String exclusiveBitmask; | 8717 core.String exclusiveBitmask; |
| 8654 /** | 8718 |
| 8655 * Uniquely identifies the type of this resource. Value is always the fixed | 8719 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 8656 * string games#turnBasedAutoMatchingCriteria. | 8720 /// string games#turnBasedAutoMatchingCriteria. |
| 8657 */ | |
| 8658 core.String kind; | 8721 core.String kind; |
| 8659 /** | 8722 |
| 8660 * The maximum number of players that should be added to the match by | 8723 /// The maximum number of players that should be added to the match by |
| 8661 * auto-matching. | 8724 /// auto-matching. |
| 8662 */ | |
| 8663 core.int maxAutoMatchingPlayers; | 8725 core.int maxAutoMatchingPlayers; |
| 8664 /** | 8726 |
| 8665 * The minimum number of players that should be added to the match by | 8727 /// The minimum number of players that should be added to the match by |
| 8666 * auto-matching. | 8728 /// auto-matching. |
| 8667 */ | |
| 8668 core.int minAutoMatchingPlayers; | 8729 core.int minAutoMatchingPlayers; |
| 8669 | 8730 |
| 8670 TurnBasedAutoMatchingCriteria(); | 8731 TurnBasedAutoMatchingCriteria(); |
| 8671 | 8732 |
| 8672 TurnBasedAutoMatchingCriteria.fromJson(core.Map _json) { | 8733 TurnBasedAutoMatchingCriteria.fromJson(core.Map _json) { |
| 8673 if (_json.containsKey("exclusiveBitmask")) { | 8734 if (_json.containsKey("exclusiveBitmask")) { |
| 8674 exclusiveBitmask = _json["exclusiveBitmask"]; | 8735 exclusiveBitmask = _json["exclusiveBitmask"]; |
| 8675 } | 8736 } |
| 8676 if (_json.containsKey("kind")) { | 8737 if (_json.containsKey("kind")) { |
| 8677 kind = _json["kind"]; | 8738 kind = _json["kind"]; |
| 8678 } | 8739 } |
| 8679 if (_json.containsKey("maxAutoMatchingPlayers")) { | 8740 if (_json.containsKey("maxAutoMatchingPlayers")) { |
| 8680 maxAutoMatchingPlayers = _json["maxAutoMatchingPlayers"]; | 8741 maxAutoMatchingPlayers = _json["maxAutoMatchingPlayers"]; |
| 8681 } | 8742 } |
| 8682 if (_json.containsKey("minAutoMatchingPlayers")) { | 8743 if (_json.containsKey("minAutoMatchingPlayers")) { |
| 8683 minAutoMatchingPlayers = _json["minAutoMatchingPlayers"]; | 8744 minAutoMatchingPlayers = _json["minAutoMatchingPlayers"]; |
| 8684 } | 8745 } |
| 8685 } | 8746 } |
| 8686 | 8747 |
| 8687 core.Map<core.String, core.Object> toJson() { | 8748 core.Map<core.String, core.Object> toJson() { |
| 8688 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8749 final core.Map<core.String, core.Object> _json = |
| 8750 new core.Map<core.String, core.Object>(); |
| 8689 if (exclusiveBitmask != null) { | 8751 if (exclusiveBitmask != null) { |
| 8690 _json["exclusiveBitmask"] = exclusiveBitmask; | 8752 _json["exclusiveBitmask"] = exclusiveBitmask; |
| 8691 } | 8753 } |
| 8692 if (kind != null) { | 8754 if (kind != null) { |
| 8693 _json["kind"] = kind; | 8755 _json["kind"] = kind; |
| 8694 } | 8756 } |
| 8695 if (maxAutoMatchingPlayers != null) { | 8757 if (maxAutoMatchingPlayers != null) { |
| 8696 _json["maxAutoMatchingPlayers"] = maxAutoMatchingPlayers; | 8758 _json["maxAutoMatchingPlayers"] = maxAutoMatchingPlayers; |
| 8697 } | 8759 } |
| 8698 if (minAutoMatchingPlayers != null) { | 8760 if (minAutoMatchingPlayers != null) { |
| 8699 _json["minAutoMatchingPlayers"] = minAutoMatchingPlayers; | 8761 _json["minAutoMatchingPlayers"] = minAutoMatchingPlayers; |
| 8700 } | 8762 } |
| 8701 return _json; | 8763 return _json; |
| 8702 } | 8764 } |
| 8703 } | 8765 } |
| 8704 | 8766 |
| 8705 /** This is a JSON template for a turn-based match resource object. */ | 8767 /// This is a JSON template for a turn-based match resource object. |
| 8706 class TurnBasedMatch { | 8768 class TurnBasedMatch { |
| 8707 /** The ID of the application being played. */ | 8769 /// The ID of the application being played. |
| 8708 core.String applicationId; | 8770 core.String applicationId; |
| 8709 /** Criteria for auto-matching players into this match. */ | 8771 |
| 8772 /// Criteria for auto-matching players into this match. |
| 8710 TurnBasedAutoMatchingCriteria autoMatchingCriteria; | 8773 TurnBasedAutoMatchingCriteria autoMatchingCriteria; |
| 8711 /** Details about the match creation. */ | 8774 |
| 8775 /// Details about the match creation. |
| 8712 TurnBasedMatchModification creationDetails; | 8776 TurnBasedMatchModification creationDetails; |
| 8713 /** The data / game state for this match. */ | 8777 |
| 8778 /// The data / game state for this match. |
| 8714 TurnBasedMatchData data; | 8779 TurnBasedMatchData data; |
| 8715 /** | 8780 |
| 8716 * This short description is generated by our servers based on turn state and | 8781 /// This short description is generated by our servers based on turn state |
| 8717 * is localized and worded relative to the player requesting the match. It is | 8782 /// and is localized and worded relative to the player requesting the match. |
| 8718 * intended to be displayed when the match is shown in a list. | 8783 /// It is intended to be displayed when the match is shown in a list. |
| 8719 */ | |
| 8720 core.String description; | 8784 core.String description; |
| 8721 /** | 8785 |
| 8722 * The ID of the participant that invited the user to the match. Not set if | 8786 /// The ID of the participant that invited the user to the match. Not set if |
| 8723 * the user was not invited to the match. | 8787 /// the user was not invited to the match. |
| 8724 */ | |
| 8725 core.String inviterId; | 8788 core.String inviterId; |
| 8726 /** | 8789 |
| 8727 * Uniquely identifies the type of this resource. Value is always the fixed | 8790 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 8728 * string games#turnBasedMatch. | 8791 /// string games#turnBasedMatch. |
| 8729 */ | |
| 8730 core.String kind; | 8792 core.String kind; |
| 8731 /** Details about the last update to the match. */ | 8793 |
| 8794 /// Details about the last update to the match. |
| 8732 TurnBasedMatchModification lastUpdateDetails; | 8795 TurnBasedMatchModification lastUpdateDetails; |
| 8733 /** Globally unique ID for a turn-based match. */ | 8796 |
| 8797 /// Globally unique ID for a turn-based match. |
| 8734 core.String matchId; | 8798 core.String matchId; |
| 8735 /** | 8799 |
| 8736 * The number of the match in a chain of rematches. Will be set to 1 for the | 8800 /// The number of the match in a chain of rematches. Will be set to 1 for the |
| 8737 * first match and incremented by 1 for each rematch. | 8801 /// first match and incremented by 1 for each rematch. |
| 8738 */ | |
| 8739 core.int matchNumber; | 8802 core.int matchNumber; |
| 8740 /** | 8803 |
| 8741 * The version of this match: an increasing counter, used to avoid out-of-date | 8804 /// The version of this match: an increasing counter, used to avoid |
| 8742 * updates to the match. | 8805 /// out-of-date updates to the match. |
| 8743 */ | |
| 8744 core.int matchVersion; | 8806 core.int matchVersion; |
| 8745 /** | 8807 |
| 8746 * The participants involved in the match, along with their statuses. Includes | 8808 /// The participants involved in the match, along with their statuses. |
| 8747 * participants who have left or declined invitations. | 8809 /// Includes participants who have left or declined invitations. |
| 8748 */ | |
| 8749 core.List<TurnBasedMatchParticipant> participants; | 8810 core.List<TurnBasedMatchParticipant> participants; |
| 8750 /** The ID of the participant that is taking a turn. */ | 8811 |
| 8812 /// The ID of the participant that is taking a turn. |
| 8751 core.String pendingParticipantId; | 8813 core.String pendingParticipantId; |
| 8752 /** | 8814 |
| 8753 * The data / game state for the previous match; set for the first turn of | 8815 /// The data / game state for the previous match; set for the first turn of |
| 8754 * rematches only. | 8816 /// rematches only. |
| 8755 */ | |
| 8756 TurnBasedMatchData previousMatchData; | 8817 TurnBasedMatchData previousMatchData; |
| 8757 /** | 8818 |
| 8758 * The ID of a rematch of this match. Only set for completed matches that have | 8819 /// The ID of a rematch of this match. Only set for completed matches that |
| 8759 * been rematched. | 8820 /// have been rematched. |
| 8760 */ | |
| 8761 core.String rematchId; | 8821 core.String rematchId; |
| 8762 /** The results reported for this match. */ | 8822 |
| 8823 /// The results reported for this match. |
| 8763 core.List<ParticipantResult> results; | 8824 core.List<ParticipantResult> results; |
| 8764 /** | 8825 |
| 8765 * The status of the match. | 8826 /// The status of the match. |
| 8766 * Possible values are: | 8827 /// Possible values are: |
| 8767 * - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by | 8828 /// - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by |
| 8768 * auto-matching; the match cannot be established until they are filled. | 8829 /// auto-matching; the match cannot be established until they are filled. |
| 8769 * - "MATCH_ACTIVE" - The match has started. | 8830 /// - "MATCH_ACTIVE" - The match has started. |
| 8770 * - "MATCH_COMPLETE" - The match has finished. | 8831 /// - "MATCH_COMPLETE" - The match has finished. |
| 8771 * - "MATCH_CANCELED" - The match was canceled. | 8832 /// - "MATCH_CANCELED" - The match was canceled. |
| 8772 * - "MATCH_EXPIRED" - The match expired due to inactivity. | 8833 /// - "MATCH_EXPIRED" - The match expired due to inactivity. |
| 8773 * - "MATCH_DELETED" - The match should no longer be shown on the client. | 8834 /// - "MATCH_DELETED" - The match should no longer be shown on the client. |
| 8774 * Returned only for tombstones for matches when sync is called. | 8835 /// Returned only for tombstones for matches when sync is called. |
| 8775 */ | |
| 8776 core.String status; | 8836 core.String status; |
| 8777 /** | 8837 |
| 8778 * The status of the current user in the match. Derived from the match type, | 8838 /// The status of the current user in the match. Derived from the match type, |
| 8779 * match status, the user's participant status, and the pending participant | 8839 /// match status, the user's participant status, and the pending participant |
| 8780 * for the match. | 8840 /// for the match. |
| 8781 * Possible values are: | 8841 /// Possible values are: |
| 8782 * - "USER_INVITED" - The user has been invited to join the match and has not | 8842 /// - "USER_INVITED" - The user has been invited to join the match and has |
| 8783 * responded yet. | 8843 /// not responded yet. |
| 8784 * - "USER_AWAITING_TURN" - The user is waiting for their turn. | 8844 /// - "USER_AWAITING_TURN" - The user is waiting for their turn. |
| 8785 * - "USER_TURN" - The user has an action to take in the match. | 8845 /// - "USER_TURN" - The user has an action to take in the match. |
| 8786 * - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, | 8846 /// - "USER_MATCH_COMPLETED" - The match has ended (it is completed, |
| 8787 * or expired.) | 8847 /// canceled, or expired.) |
| 8788 */ | |
| 8789 core.String userMatchStatus; | 8848 core.String userMatchStatus; |
| 8790 /** | 8849 |
| 8791 * The variant / mode of the application being played; can be any integer | 8850 /// The variant / mode of the application being played; can be any integer |
| 8792 * value, or left blank. | 8851 /// value, or left blank. |
| 8793 */ | |
| 8794 core.int variant; | 8852 core.int variant; |
| 8795 /** | 8853 |
| 8796 * The ID of another participant in the match that can be used when describing | 8854 /// The ID of another participant in the match that can be used when |
| 8797 * the participants the user is playing with. | 8855 /// describing the participants the user is playing with. |
| 8798 */ | |
| 8799 core.String withParticipantId; | 8856 core.String withParticipantId; |
| 8800 | 8857 |
| 8801 TurnBasedMatch(); | 8858 TurnBasedMatch(); |
| 8802 | 8859 |
| 8803 TurnBasedMatch.fromJson(core.Map _json) { | 8860 TurnBasedMatch.fromJson(core.Map _json) { |
| 8804 if (_json.containsKey("applicationId")) { | 8861 if (_json.containsKey("applicationId")) { |
| 8805 applicationId = _json["applicationId"]; | 8862 applicationId = _json["applicationId"]; |
| 8806 } | 8863 } |
| 8807 if (_json.containsKey("autoMatchingCriteria")) { | 8864 if (_json.containsKey("autoMatchingCriteria")) { |
| 8808 autoMatchingCriteria = new TurnBasedAutoMatchingCriteria.fromJson(_json["a
utoMatchingCriteria"]); | 8865 autoMatchingCriteria = new TurnBasedAutoMatchingCriteria.fromJson( |
| 8866 _json["autoMatchingCriteria"]); |
| 8809 } | 8867 } |
| 8810 if (_json.containsKey("creationDetails")) { | 8868 if (_json.containsKey("creationDetails")) { |
| 8811 creationDetails = new TurnBasedMatchModification.fromJson(_json["creationD
etails"]); | 8869 creationDetails = |
| 8870 new TurnBasedMatchModification.fromJson(_json["creationDetails"]); |
| 8812 } | 8871 } |
| 8813 if (_json.containsKey("data")) { | 8872 if (_json.containsKey("data")) { |
| 8814 data = new TurnBasedMatchData.fromJson(_json["data"]); | 8873 data = new TurnBasedMatchData.fromJson(_json["data"]); |
| 8815 } | 8874 } |
| 8816 if (_json.containsKey("description")) { | 8875 if (_json.containsKey("description")) { |
| 8817 description = _json["description"]; | 8876 description = _json["description"]; |
| 8818 } | 8877 } |
| 8819 if (_json.containsKey("inviterId")) { | 8878 if (_json.containsKey("inviterId")) { |
| 8820 inviterId = _json["inviterId"]; | 8879 inviterId = _json["inviterId"]; |
| 8821 } | 8880 } |
| 8822 if (_json.containsKey("kind")) { | 8881 if (_json.containsKey("kind")) { |
| 8823 kind = _json["kind"]; | 8882 kind = _json["kind"]; |
| 8824 } | 8883 } |
| 8825 if (_json.containsKey("lastUpdateDetails")) { | 8884 if (_json.containsKey("lastUpdateDetails")) { |
| 8826 lastUpdateDetails = new TurnBasedMatchModification.fromJson(_json["lastUpd
ateDetails"]); | 8885 lastUpdateDetails = |
| 8886 new TurnBasedMatchModification.fromJson(_json["lastUpdateDetails"]); |
| 8827 } | 8887 } |
| 8828 if (_json.containsKey("matchId")) { | 8888 if (_json.containsKey("matchId")) { |
| 8829 matchId = _json["matchId"]; | 8889 matchId = _json["matchId"]; |
| 8830 } | 8890 } |
| 8831 if (_json.containsKey("matchNumber")) { | 8891 if (_json.containsKey("matchNumber")) { |
| 8832 matchNumber = _json["matchNumber"]; | 8892 matchNumber = _json["matchNumber"]; |
| 8833 } | 8893 } |
| 8834 if (_json.containsKey("matchVersion")) { | 8894 if (_json.containsKey("matchVersion")) { |
| 8835 matchVersion = _json["matchVersion"]; | 8895 matchVersion = _json["matchVersion"]; |
| 8836 } | 8896 } |
| 8837 if (_json.containsKey("participants")) { | 8897 if (_json.containsKey("participants")) { |
| 8838 participants = _json["participants"].map((value) => new TurnBasedMatchPart
icipant.fromJson(value)).toList(); | 8898 participants = _json["participants"] |
| 8899 .map((value) => new TurnBasedMatchParticipant.fromJson(value)) |
| 8900 .toList(); |
| 8839 } | 8901 } |
| 8840 if (_json.containsKey("pendingParticipantId")) { | 8902 if (_json.containsKey("pendingParticipantId")) { |
| 8841 pendingParticipantId = _json["pendingParticipantId"]; | 8903 pendingParticipantId = _json["pendingParticipantId"]; |
| 8842 } | 8904 } |
| 8843 if (_json.containsKey("previousMatchData")) { | 8905 if (_json.containsKey("previousMatchData")) { |
| 8844 previousMatchData = new TurnBasedMatchData.fromJson(_json["previousMatchDa
ta"]); | 8906 previousMatchData = |
| 8907 new TurnBasedMatchData.fromJson(_json["previousMatchData"]); |
| 8845 } | 8908 } |
| 8846 if (_json.containsKey("rematchId")) { | 8909 if (_json.containsKey("rematchId")) { |
| 8847 rematchId = _json["rematchId"]; | 8910 rematchId = _json["rematchId"]; |
| 8848 } | 8911 } |
| 8849 if (_json.containsKey("results")) { | 8912 if (_json.containsKey("results")) { |
| 8850 results = _json["results"].map((value) => new ParticipantResult.fromJson(v
alue)).toList(); | 8913 results = _json["results"] |
| 8914 .map((value) => new ParticipantResult.fromJson(value)) |
| 8915 .toList(); |
| 8851 } | 8916 } |
| 8852 if (_json.containsKey("status")) { | 8917 if (_json.containsKey("status")) { |
| 8853 status = _json["status"]; | 8918 status = _json["status"]; |
| 8854 } | 8919 } |
| 8855 if (_json.containsKey("userMatchStatus")) { | 8920 if (_json.containsKey("userMatchStatus")) { |
| 8856 userMatchStatus = _json["userMatchStatus"]; | 8921 userMatchStatus = _json["userMatchStatus"]; |
| 8857 } | 8922 } |
| 8858 if (_json.containsKey("variant")) { | 8923 if (_json.containsKey("variant")) { |
| 8859 variant = _json["variant"]; | 8924 variant = _json["variant"]; |
| 8860 } | 8925 } |
| 8861 if (_json.containsKey("withParticipantId")) { | 8926 if (_json.containsKey("withParticipantId")) { |
| 8862 withParticipantId = _json["withParticipantId"]; | 8927 withParticipantId = _json["withParticipantId"]; |
| 8863 } | 8928 } |
| 8864 } | 8929 } |
| 8865 | 8930 |
| 8866 core.Map<core.String, core.Object> toJson() { | 8931 core.Map<core.String, core.Object> toJson() { |
| 8867 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8932 final core.Map<core.String, core.Object> _json = |
| 8933 new core.Map<core.String, core.Object>(); |
| 8868 if (applicationId != null) { | 8934 if (applicationId != null) { |
| 8869 _json["applicationId"] = applicationId; | 8935 _json["applicationId"] = applicationId; |
| 8870 } | 8936 } |
| 8871 if (autoMatchingCriteria != null) { | 8937 if (autoMatchingCriteria != null) { |
| 8872 _json["autoMatchingCriteria"] = (autoMatchingCriteria).toJson(); | 8938 _json["autoMatchingCriteria"] = (autoMatchingCriteria).toJson(); |
| 8873 } | 8939 } |
| 8874 if (creationDetails != null) { | 8940 if (creationDetails != null) { |
| 8875 _json["creationDetails"] = (creationDetails).toJson(); | 8941 _json["creationDetails"] = (creationDetails).toJson(); |
| 8876 } | 8942 } |
| 8877 if (data != null) { | 8943 if (data != null) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 8892 if (matchId != null) { | 8958 if (matchId != null) { |
| 8893 _json["matchId"] = matchId; | 8959 _json["matchId"] = matchId; |
| 8894 } | 8960 } |
| 8895 if (matchNumber != null) { | 8961 if (matchNumber != null) { |
| 8896 _json["matchNumber"] = matchNumber; | 8962 _json["matchNumber"] = matchNumber; |
| 8897 } | 8963 } |
| 8898 if (matchVersion != null) { | 8964 if (matchVersion != null) { |
| 8899 _json["matchVersion"] = matchVersion; | 8965 _json["matchVersion"] = matchVersion; |
| 8900 } | 8966 } |
| 8901 if (participants != null) { | 8967 if (participants != null) { |
| 8902 _json["participants"] = participants.map((value) => (value).toJson()).toLi
st(); | 8968 _json["participants"] = |
| 8969 participants.map((value) => (value).toJson()).toList(); |
| 8903 } | 8970 } |
| 8904 if (pendingParticipantId != null) { | 8971 if (pendingParticipantId != null) { |
| 8905 _json["pendingParticipantId"] = pendingParticipantId; | 8972 _json["pendingParticipantId"] = pendingParticipantId; |
| 8906 } | 8973 } |
| 8907 if (previousMatchData != null) { | 8974 if (previousMatchData != null) { |
| 8908 _json["previousMatchData"] = (previousMatchData).toJson(); | 8975 _json["previousMatchData"] = (previousMatchData).toJson(); |
| 8909 } | 8976 } |
| 8910 if (rematchId != null) { | 8977 if (rematchId != null) { |
| 8911 _json["rematchId"] = rematchId; | 8978 _json["rematchId"] = rematchId; |
| 8912 } | 8979 } |
| 8913 if (results != null) { | 8980 if (results != null) { |
| 8914 _json["results"] = results.map((value) => (value).toJson()).toList(); | 8981 _json["results"] = results.map((value) => (value).toJson()).toList(); |
| 8915 } | 8982 } |
| 8916 if (status != null) { | 8983 if (status != null) { |
| 8917 _json["status"] = status; | 8984 _json["status"] = status; |
| 8918 } | 8985 } |
| 8919 if (userMatchStatus != null) { | 8986 if (userMatchStatus != null) { |
| 8920 _json["userMatchStatus"] = userMatchStatus; | 8987 _json["userMatchStatus"] = userMatchStatus; |
| 8921 } | 8988 } |
| 8922 if (variant != null) { | 8989 if (variant != null) { |
| 8923 _json["variant"] = variant; | 8990 _json["variant"] = variant; |
| 8924 } | 8991 } |
| 8925 if (withParticipantId != null) { | 8992 if (withParticipantId != null) { |
| 8926 _json["withParticipantId"] = withParticipantId; | 8993 _json["withParticipantId"] = withParticipantId; |
| 8927 } | 8994 } |
| 8928 return _json; | 8995 return _json; |
| 8929 } | 8996 } |
| 8930 } | 8997 } |
| 8931 | 8998 |
| 8932 /** This is a JSON template for a turn-based match creation request. */ | 8999 /// This is a JSON template for a turn-based match creation request. |
| 8933 class TurnBasedMatchCreateRequest { | 9000 class TurnBasedMatchCreateRequest { |
| 8934 /** Criteria for auto-matching players into this match. */ | 9001 /// Criteria for auto-matching players into this match. |
| 8935 TurnBasedAutoMatchingCriteria autoMatchingCriteria; | 9002 TurnBasedAutoMatchingCriteria autoMatchingCriteria; |
| 8936 /** The player ids to invite to the match. */ | 9003 |
| 9004 /// The player ids to invite to the match. |
| 8937 core.List<core.String> invitedPlayerIds; | 9005 core.List<core.String> invitedPlayerIds; |
| 8938 /** | 9006 |
| 8939 * Uniquely identifies the type of this resource. Value is always the fixed | 9007 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 8940 * string games#turnBasedMatchCreateRequest. | 9008 /// string games#turnBasedMatchCreateRequest. |
| 8941 */ | |
| 8942 core.String kind; | 9009 core.String kind; |
| 8943 /** | 9010 |
| 8944 * A randomly generated numeric ID. This number is used at the server to | 9011 /// A randomly generated numeric ID. This number is used at the server to |
| 8945 * ensure that the request is handled correctly across retries. | 9012 /// ensure that the request is handled correctly across retries. |
| 8946 */ | |
| 8947 core.String requestId; | 9013 core.String requestId; |
| 8948 /** | 9014 |
| 8949 * The variant / mode of the application to be played. This can be any integer | 9015 /// The variant / mode of the application to be played. This can be any |
| 8950 * value, or left blank. You should use a small number of variants to keep the | 9016 /// integer value, or left blank. You should use a small number of variants |
| 8951 * auto-matching pool as large as possible. | 9017 /// to keep the auto-matching pool as large as possible. |
| 8952 */ | |
| 8953 core.int variant; | 9018 core.int variant; |
| 8954 | 9019 |
| 8955 TurnBasedMatchCreateRequest(); | 9020 TurnBasedMatchCreateRequest(); |
| 8956 | 9021 |
| 8957 TurnBasedMatchCreateRequest.fromJson(core.Map _json) { | 9022 TurnBasedMatchCreateRequest.fromJson(core.Map _json) { |
| 8958 if (_json.containsKey("autoMatchingCriteria")) { | 9023 if (_json.containsKey("autoMatchingCriteria")) { |
| 8959 autoMatchingCriteria = new TurnBasedAutoMatchingCriteria.fromJson(_json["a
utoMatchingCriteria"]); | 9024 autoMatchingCriteria = new TurnBasedAutoMatchingCriteria.fromJson( |
| 9025 _json["autoMatchingCriteria"]); |
| 8960 } | 9026 } |
| 8961 if (_json.containsKey("invitedPlayerIds")) { | 9027 if (_json.containsKey("invitedPlayerIds")) { |
| 8962 invitedPlayerIds = _json["invitedPlayerIds"]; | 9028 invitedPlayerIds = _json["invitedPlayerIds"]; |
| 8963 } | 9029 } |
| 8964 if (_json.containsKey("kind")) { | 9030 if (_json.containsKey("kind")) { |
| 8965 kind = _json["kind"]; | 9031 kind = _json["kind"]; |
| 8966 } | 9032 } |
| 8967 if (_json.containsKey("requestId")) { | 9033 if (_json.containsKey("requestId")) { |
| 8968 requestId = _json["requestId"]; | 9034 requestId = _json["requestId"]; |
| 8969 } | 9035 } |
| 8970 if (_json.containsKey("variant")) { | 9036 if (_json.containsKey("variant")) { |
| 8971 variant = _json["variant"]; | 9037 variant = _json["variant"]; |
| 8972 } | 9038 } |
| 8973 } | 9039 } |
| 8974 | 9040 |
| 8975 core.Map<core.String, core.Object> toJson() { | 9041 core.Map<core.String, core.Object> toJson() { |
| 8976 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9042 final core.Map<core.String, core.Object> _json = |
| 9043 new core.Map<core.String, core.Object>(); |
| 8977 if (autoMatchingCriteria != null) { | 9044 if (autoMatchingCriteria != null) { |
| 8978 _json["autoMatchingCriteria"] = (autoMatchingCriteria).toJson(); | 9045 _json["autoMatchingCriteria"] = (autoMatchingCriteria).toJson(); |
| 8979 } | 9046 } |
| 8980 if (invitedPlayerIds != null) { | 9047 if (invitedPlayerIds != null) { |
| 8981 _json["invitedPlayerIds"] = invitedPlayerIds; | 9048 _json["invitedPlayerIds"] = invitedPlayerIds; |
| 8982 } | 9049 } |
| 8983 if (kind != null) { | 9050 if (kind != null) { |
| 8984 _json["kind"] = kind; | 9051 _json["kind"] = kind; |
| 8985 } | 9052 } |
| 8986 if (requestId != null) { | 9053 if (requestId != null) { |
| 8987 _json["requestId"] = requestId; | 9054 _json["requestId"] = requestId; |
| 8988 } | 9055 } |
| 8989 if (variant != null) { | 9056 if (variant != null) { |
| 8990 _json["variant"] = variant; | 9057 _json["variant"] = variant; |
| 8991 } | 9058 } |
| 8992 return _json; | 9059 return _json; |
| 8993 } | 9060 } |
| 8994 } | 9061 } |
| 8995 | 9062 |
| 8996 /** This is a JSON template for a turn-based match data object. */ | 9063 /// This is a JSON template for a turn-based match data object. |
| 8997 class TurnBasedMatchData { | 9064 class TurnBasedMatchData { |
| 8998 /** | 9065 /// The byte representation of the data (limited to 128 kB), as a |
| 8999 * The byte representation of the data (limited to 128 kB), as a | 9066 /// Base64-encoded string with the URL_SAFE encoding option. |
| 9000 * Base64-encoded string with the URL_SAFE encoding option. | |
| 9001 */ | |
| 9002 core.String data; | 9067 core.String data; |
| 9003 core.List<core.int> get dataAsBytes { | 9068 core.List<core.int> get dataAsBytes { |
| 9004 return convert.BASE64.decode(data); | 9069 return convert.BASE64.decode(data); |
| 9005 } | 9070 } |
| 9006 | 9071 |
| 9007 void set dataAsBytes(core.List<core.int> _bytes) { | 9072 void set dataAsBytes(core.List<core.int> _bytes) { |
| 9008 data = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); | 9073 data = |
| 9074 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
| 9009 } | 9075 } |
| 9010 /** | 9076 |
| 9011 * True if this match has data available but it wasn't returned in a list | 9077 /// True if this match has data available but it wasn't returned in a list |
| 9012 * response; fetching the match individually will retrieve this data. | 9078 /// response; fetching the match individually will retrieve this data. |
| 9013 */ | |
| 9014 core.bool dataAvailable; | 9079 core.bool dataAvailable; |
| 9015 /** | 9080 |
| 9016 * Uniquely identifies the type of this resource. Value is always the fixed | 9081 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 9017 * string games#turnBasedMatchData. | 9082 /// string games#turnBasedMatchData. |
| 9018 */ | |
| 9019 core.String kind; | 9083 core.String kind; |
| 9020 | 9084 |
| 9021 TurnBasedMatchData(); | 9085 TurnBasedMatchData(); |
| 9022 | 9086 |
| 9023 TurnBasedMatchData.fromJson(core.Map _json) { | 9087 TurnBasedMatchData.fromJson(core.Map _json) { |
| 9024 if (_json.containsKey("data")) { | 9088 if (_json.containsKey("data")) { |
| 9025 data = _json["data"]; | 9089 data = _json["data"]; |
| 9026 } | 9090 } |
| 9027 if (_json.containsKey("dataAvailable")) { | 9091 if (_json.containsKey("dataAvailable")) { |
| 9028 dataAvailable = _json["dataAvailable"]; | 9092 dataAvailable = _json["dataAvailable"]; |
| 9029 } | 9093 } |
| 9030 if (_json.containsKey("kind")) { | 9094 if (_json.containsKey("kind")) { |
| 9031 kind = _json["kind"]; | 9095 kind = _json["kind"]; |
| 9032 } | 9096 } |
| 9033 } | 9097 } |
| 9034 | 9098 |
| 9035 core.Map<core.String, core.Object> toJson() { | 9099 core.Map<core.String, core.Object> toJson() { |
| 9036 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9100 final core.Map<core.String, core.Object> _json = |
| 9101 new core.Map<core.String, core.Object>(); |
| 9037 if (data != null) { | 9102 if (data != null) { |
| 9038 _json["data"] = data; | 9103 _json["data"] = data; |
| 9039 } | 9104 } |
| 9040 if (dataAvailable != null) { | 9105 if (dataAvailable != null) { |
| 9041 _json["dataAvailable"] = dataAvailable; | 9106 _json["dataAvailable"] = dataAvailable; |
| 9042 } | 9107 } |
| 9043 if (kind != null) { | 9108 if (kind != null) { |
| 9044 _json["kind"] = kind; | 9109 _json["kind"] = kind; |
| 9045 } | 9110 } |
| 9046 return _json; | 9111 return _json; |
| 9047 } | 9112 } |
| 9048 } | 9113 } |
| 9049 | 9114 |
| 9050 /** This is a JSON template for sending a turn-based match data object. */ | 9115 /// This is a JSON template for sending a turn-based match data object. |
| 9051 class TurnBasedMatchDataRequest { | 9116 class TurnBasedMatchDataRequest { |
| 9052 /** | 9117 /// The byte representation of the data (limited to 128 kB), as a |
| 9053 * The byte representation of the data (limited to 128 kB), as a | 9118 /// Base64-encoded string with the URL_SAFE encoding option. |
| 9054 * Base64-encoded string with the URL_SAFE encoding option. | |
| 9055 */ | |
| 9056 core.String data; | 9119 core.String data; |
| 9057 core.List<core.int> get dataAsBytes { | 9120 core.List<core.int> get dataAsBytes { |
| 9058 return convert.BASE64.decode(data); | 9121 return convert.BASE64.decode(data); |
| 9059 } | 9122 } |
| 9060 | 9123 |
| 9061 void set dataAsBytes(core.List<core.int> _bytes) { | 9124 void set dataAsBytes(core.List<core.int> _bytes) { |
| 9062 data = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); | 9125 data = |
| 9126 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
| 9063 } | 9127 } |
| 9064 /** | 9128 |
| 9065 * Uniquely identifies the type of this resource. Value is always the fixed | 9129 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 9066 * string games#turnBasedMatchDataRequest. | 9130 /// string games#turnBasedMatchDataRequest. |
| 9067 */ | |
| 9068 core.String kind; | 9131 core.String kind; |
| 9069 | 9132 |
| 9070 TurnBasedMatchDataRequest(); | 9133 TurnBasedMatchDataRequest(); |
| 9071 | 9134 |
| 9072 TurnBasedMatchDataRequest.fromJson(core.Map _json) { | 9135 TurnBasedMatchDataRequest.fromJson(core.Map _json) { |
| 9073 if (_json.containsKey("data")) { | 9136 if (_json.containsKey("data")) { |
| 9074 data = _json["data"]; | 9137 data = _json["data"]; |
| 9075 } | 9138 } |
| 9076 if (_json.containsKey("kind")) { | 9139 if (_json.containsKey("kind")) { |
| 9077 kind = _json["kind"]; | 9140 kind = _json["kind"]; |
| 9078 } | 9141 } |
| 9079 } | 9142 } |
| 9080 | 9143 |
| 9081 core.Map<core.String, core.Object> toJson() { | 9144 core.Map<core.String, core.Object> toJson() { |
| 9082 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9145 final core.Map<core.String, core.Object> _json = |
| 9146 new core.Map<core.String, core.Object>(); |
| 9083 if (data != null) { | 9147 if (data != null) { |
| 9084 _json["data"] = data; | 9148 _json["data"] = data; |
| 9085 } | 9149 } |
| 9086 if (kind != null) { | 9150 if (kind != null) { |
| 9087 _json["kind"] = kind; | 9151 _json["kind"] = kind; |
| 9088 } | 9152 } |
| 9089 return _json; | 9153 return _json; |
| 9090 } | 9154 } |
| 9091 } | 9155 } |
| 9092 | 9156 |
| 9093 /** This is a JSON template for a list of turn-based matches. */ | 9157 /// This is a JSON template for a list of turn-based matches. |
| 9094 class TurnBasedMatchList { | 9158 class TurnBasedMatchList { |
| 9095 /** The matches. */ | 9159 /// The matches. |
| 9096 core.List<TurnBasedMatch> items; | 9160 core.List<TurnBasedMatch> items; |
| 9097 /** | 9161 |
| 9098 * Uniquely identifies the type of this resource. Value is always the fixed | 9162 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 9099 * string games#turnBasedMatchList. | 9163 /// string games#turnBasedMatchList. |
| 9100 */ | |
| 9101 core.String kind; | 9164 core.String kind; |
| 9102 /** The pagination token for the next page of results. */ | 9165 |
| 9166 /// The pagination token for the next page of results. |
| 9103 core.String nextPageToken; | 9167 core.String nextPageToken; |
| 9104 | 9168 |
| 9105 TurnBasedMatchList(); | 9169 TurnBasedMatchList(); |
| 9106 | 9170 |
| 9107 TurnBasedMatchList.fromJson(core.Map _json) { | 9171 TurnBasedMatchList.fromJson(core.Map _json) { |
| 9108 if (_json.containsKey("items")) { | 9172 if (_json.containsKey("items")) { |
| 9109 items = _json["items"].map((value) => new TurnBasedMatch.fromJson(value)).
toList(); | 9173 items = _json["items"] |
| 9174 .map((value) => new TurnBasedMatch.fromJson(value)) |
| 9175 .toList(); |
| 9110 } | 9176 } |
| 9111 if (_json.containsKey("kind")) { | 9177 if (_json.containsKey("kind")) { |
| 9112 kind = _json["kind"]; | 9178 kind = _json["kind"]; |
| 9113 } | 9179 } |
| 9114 if (_json.containsKey("nextPageToken")) { | 9180 if (_json.containsKey("nextPageToken")) { |
| 9115 nextPageToken = _json["nextPageToken"]; | 9181 nextPageToken = _json["nextPageToken"]; |
| 9116 } | 9182 } |
| 9117 } | 9183 } |
| 9118 | 9184 |
| 9119 core.Map<core.String, core.Object> toJson() { | 9185 core.Map<core.String, core.Object> toJson() { |
| 9120 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9186 final core.Map<core.String, core.Object> _json = |
| 9187 new core.Map<core.String, core.Object>(); |
| 9121 if (items != null) { | 9188 if (items != null) { |
| 9122 _json["items"] = items.map((value) => (value).toJson()).toList(); | 9189 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 9123 } | 9190 } |
| 9124 if (kind != null) { | 9191 if (kind != null) { |
| 9125 _json["kind"] = kind; | 9192 _json["kind"] = kind; |
| 9126 } | 9193 } |
| 9127 if (nextPageToken != null) { | 9194 if (nextPageToken != null) { |
| 9128 _json["nextPageToken"] = nextPageToken; | 9195 _json["nextPageToken"] = nextPageToken; |
| 9129 } | 9196 } |
| 9130 return _json; | 9197 return _json; |
| 9131 } | 9198 } |
| 9132 } | 9199 } |
| 9133 | 9200 |
| 9134 /** This is a JSON template for turn-based match modification metadata. */ | 9201 /// This is a JSON template for turn-based match modification metadata. |
| 9135 class TurnBasedMatchModification { | 9202 class TurnBasedMatchModification { |
| 9136 /** | 9203 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 9137 * Uniquely identifies the type of this resource. Value is always the fixed | 9204 /// string games#turnBasedMatchModification. |
| 9138 * string games#turnBasedMatchModification. | |
| 9139 */ | |
| 9140 core.String kind; | 9205 core.String kind; |
| 9141 /** | 9206 |
| 9142 * The timestamp at which they modified the match, in milliseconds since the | 9207 /// The timestamp at which they modified the match, in milliseconds since the |
| 9143 * epoch in UTC. | 9208 /// epoch in UTC. |
| 9144 */ | |
| 9145 core.String modifiedTimestampMillis; | 9209 core.String modifiedTimestampMillis; |
| 9146 /** The ID of the participant that modified the match. */ | 9210 |
| 9211 /// The ID of the participant that modified the match. |
| 9147 core.String participantId; | 9212 core.String participantId; |
| 9148 | 9213 |
| 9149 TurnBasedMatchModification(); | 9214 TurnBasedMatchModification(); |
| 9150 | 9215 |
| 9151 TurnBasedMatchModification.fromJson(core.Map _json) { | 9216 TurnBasedMatchModification.fromJson(core.Map _json) { |
| 9152 if (_json.containsKey("kind")) { | 9217 if (_json.containsKey("kind")) { |
| 9153 kind = _json["kind"]; | 9218 kind = _json["kind"]; |
| 9154 } | 9219 } |
| 9155 if (_json.containsKey("modifiedTimestampMillis")) { | 9220 if (_json.containsKey("modifiedTimestampMillis")) { |
| 9156 modifiedTimestampMillis = _json["modifiedTimestampMillis"]; | 9221 modifiedTimestampMillis = _json["modifiedTimestampMillis"]; |
| 9157 } | 9222 } |
| 9158 if (_json.containsKey("participantId")) { | 9223 if (_json.containsKey("participantId")) { |
| 9159 participantId = _json["participantId"]; | 9224 participantId = _json["participantId"]; |
| 9160 } | 9225 } |
| 9161 } | 9226 } |
| 9162 | 9227 |
| 9163 core.Map<core.String, core.Object> toJson() { | 9228 core.Map<core.String, core.Object> toJson() { |
| 9164 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9229 final core.Map<core.String, core.Object> _json = |
| 9230 new core.Map<core.String, core.Object>(); |
| 9165 if (kind != null) { | 9231 if (kind != null) { |
| 9166 _json["kind"] = kind; | 9232 _json["kind"] = kind; |
| 9167 } | 9233 } |
| 9168 if (modifiedTimestampMillis != null) { | 9234 if (modifiedTimestampMillis != null) { |
| 9169 _json["modifiedTimestampMillis"] = modifiedTimestampMillis; | 9235 _json["modifiedTimestampMillis"] = modifiedTimestampMillis; |
| 9170 } | 9236 } |
| 9171 if (participantId != null) { | 9237 if (participantId != null) { |
| 9172 _json["participantId"] = participantId; | 9238 _json["participantId"] = participantId; |
| 9173 } | 9239 } |
| 9174 return _json; | 9240 return _json; |
| 9175 } | 9241 } |
| 9176 } | 9242 } |
| 9177 | 9243 |
| 9178 /** This is a JSON template for a participant in a turn-based match. */ | 9244 /// This is a JSON template for a participant in a turn-based match. |
| 9179 class TurnBasedMatchParticipant { | 9245 class TurnBasedMatchParticipant { |
| 9180 /** True if this participant was auto-matched with the requesting player. */ | 9246 /// True if this participant was auto-matched with the requesting player. |
| 9181 core.bool autoMatched; | 9247 core.bool autoMatched; |
| 9182 /** | 9248 |
| 9183 * Information about a player that has been anonymously auto-matched against | 9249 /// Information about a player that has been anonymously auto-matched against |
| 9184 * the requesting player. (Either player or autoMatchedPlayer will be set.) | 9250 /// the requesting player. (Either player or autoMatchedPlayer will be set.) |
| 9185 */ | |
| 9186 AnonymousPlayer autoMatchedPlayer; | 9251 AnonymousPlayer autoMatchedPlayer; |
| 9187 /** | 9252 |
| 9188 * An identifier for the participant in the scope of the match. Cannot be used | 9253 /// An identifier for the participant in the scope of the match. Cannot be |
| 9189 * to identify a player across matches or in other contexts. | 9254 /// used to identify a player across matches or in other contexts. |
| 9190 */ | |
| 9191 core.String id; | 9255 core.String id; |
| 9192 /** | 9256 |
| 9193 * Uniquely identifies the type of this resource. Value is always the fixed | 9257 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 9194 * string games#turnBasedMatchParticipant. | 9258 /// string games#turnBasedMatchParticipant. |
| 9195 */ | |
| 9196 core.String kind; | 9259 core.String kind; |
| 9197 /** | 9260 |
| 9198 * Information about the player. Not populated if this player was anonymously | 9261 /// Information about the player. Not populated if this player was |
| 9199 * auto-matched against the requesting player. (Either player or | 9262 /// anonymously auto-matched against the requesting player. (Either player or |
| 9200 * autoMatchedPlayer will be set.) | 9263 /// autoMatchedPlayer will be set.) |
| 9201 */ | |
| 9202 Player player; | 9264 Player player; |
| 9203 /** | 9265 |
| 9204 * The status of the participant with respect to the match. | 9266 /// The status of the participant with respect to the match. |
| 9205 * Possible values are: | 9267 /// Possible values are: |
| 9206 * - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited | 9268 /// - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited |
| 9207 * to the match, but the invitation has not been sent; the invite will be sent | 9269 /// to the match, but the invitation has not been sent; the invite will be |
| 9208 * when it becomes their turn. | 9270 /// sent when it becomes their turn. |
| 9209 * - "PARTICIPANT_INVITED" - The participant has been invited to join the | 9271 /// - "PARTICIPANT_INVITED" - The participant has been invited to join the |
| 9210 * match, but has not yet responded. | 9272 /// match, but has not yet responded. |
| 9211 * - "PARTICIPANT_JOINED" - The participant has joined the match (either after | 9273 /// - "PARTICIPANT_JOINED" - The participant has joined the match (either |
| 9212 * creating it or accepting an invitation.) | 9274 /// after creating it or accepting an invitation.) |
| 9213 * - "PARTICIPANT_DECLINED" - The participant declined an invitation to join | 9275 /// - "PARTICIPANT_DECLINED" - The participant declined an invitation to join |
| 9214 * the match. | 9276 /// the match. |
| 9215 * - "PARTICIPANT_LEFT" - The participant joined the match and then left it. | 9277 /// - "PARTICIPANT_LEFT" - The participant joined the match and then left it. |
| 9216 * - "PARTICIPANT_FINISHED" - The participant finished playing in the match. | 9278 /// - "PARTICIPANT_FINISHED" - The participant finished playing in the match. |
| 9217 * - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in | 9279 /// - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in |
| 9218 * the allotted time. | 9280 /// the allotted time. |
| 9219 */ | |
| 9220 core.String status; | 9281 core.String status; |
| 9221 | 9282 |
| 9222 TurnBasedMatchParticipant(); | 9283 TurnBasedMatchParticipant(); |
| 9223 | 9284 |
| 9224 TurnBasedMatchParticipant.fromJson(core.Map _json) { | 9285 TurnBasedMatchParticipant.fromJson(core.Map _json) { |
| 9225 if (_json.containsKey("autoMatched")) { | 9286 if (_json.containsKey("autoMatched")) { |
| 9226 autoMatched = _json["autoMatched"]; | 9287 autoMatched = _json["autoMatched"]; |
| 9227 } | 9288 } |
| 9228 if (_json.containsKey("autoMatchedPlayer")) { | 9289 if (_json.containsKey("autoMatchedPlayer")) { |
| 9229 autoMatchedPlayer = new AnonymousPlayer.fromJson(_json["autoMatchedPlayer"
]); | 9290 autoMatchedPlayer = |
| 9291 new AnonymousPlayer.fromJson(_json["autoMatchedPlayer"]); |
| 9230 } | 9292 } |
| 9231 if (_json.containsKey("id")) { | 9293 if (_json.containsKey("id")) { |
| 9232 id = _json["id"]; | 9294 id = _json["id"]; |
| 9233 } | 9295 } |
| 9234 if (_json.containsKey("kind")) { | 9296 if (_json.containsKey("kind")) { |
| 9235 kind = _json["kind"]; | 9297 kind = _json["kind"]; |
| 9236 } | 9298 } |
| 9237 if (_json.containsKey("player")) { | 9299 if (_json.containsKey("player")) { |
| 9238 player = new Player.fromJson(_json["player"]); | 9300 player = new Player.fromJson(_json["player"]); |
| 9239 } | 9301 } |
| 9240 if (_json.containsKey("status")) { | 9302 if (_json.containsKey("status")) { |
| 9241 status = _json["status"]; | 9303 status = _json["status"]; |
| 9242 } | 9304 } |
| 9243 } | 9305 } |
| 9244 | 9306 |
| 9245 core.Map<core.String, core.Object> toJson() { | 9307 core.Map<core.String, core.Object> toJson() { |
| 9246 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9308 final core.Map<core.String, core.Object> _json = |
| 9309 new core.Map<core.String, core.Object>(); |
| 9247 if (autoMatched != null) { | 9310 if (autoMatched != null) { |
| 9248 _json["autoMatched"] = autoMatched; | 9311 _json["autoMatched"] = autoMatched; |
| 9249 } | 9312 } |
| 9250 if (autoMatchedPlayer != null) { | 9313 if (autoMatchedPlayer != null) { |
| 9251 _json["autoMatchedPlayer"] = (autoMatchedPlayer).toJson(); | 9314 _json["autoMatchedPlayer"] = (autoMatchedPlayer).toJson(); |
| 9252 } | 9315 } |
| 9253 if (id != null) { | 9316 if (id != null) { |
| 9254 _json["id"] = id; | 9317 _json["id"] = id; |
| 9255 } | 9318 } |
| 9256 if (kind != null) { | 9319 if (kind != null) { |
| 9257 _json["kind"] = kind; | 9320 _json["kind"] = kind; |
| 9258 } | 9321 } |
| 9259 if (player != null) { | 9322 if (player != null) { |
| 9260 _json["player"] = (player).toJson(); | 9323 _json["player"] = (player).toJson(); |
| 9261 } | 9324 } |
| 9262 if (status != null) { | 9325 if (status != null) { |
| 9263 _json["status"] = status; | 9326 _json["status"] = status; |
| 9264 } | 9327 } |
| 9265 return _json; | 9328 return _json; |
| 9266 } | 9329 } |
| 9267 } | 9330 } |
| 9268 | 9331 |
| 9269 /** This is a JSON template for a rematch response. */ | 9332 /// This is a JSON template for a rematch response. |
| 9270 class TurnBasedMatchRematch { | 9333 class TurnBasedMatchRematch { |
| 9271 /** | 9334 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 9272 * Uniquely identifies the type of this resource. Value is always the fixed | 9335 /// string games#turnBasedMatchRematch. |
| 9273 * string games#turnBasedMatchRematch. | |
| 9274 */ | |
| 9275 core.String kind; | 9336 core.String kind; |
| 9276 /** | 9337 |
| 9277 * The old match that the rematch was created from; will be updated such that | 9338 /// The old match that the rematch was created from; will be updated such |
| 9278 * the rematchId field will point at the new match. | 9339 /// that the rematchId field will point at the new match. |
| 9279 */ | |
| 9280 TurnBasedMatch previousMatch; | 9340 TurnBasedMatch previousMatch; |
| 9281 /** | 9341 |
| 9282 * The newly created match; a rematch of the old match with the same | 9342 /// The newly created match; a rematch of the old match with the same |
| 9283 * participants. | 9343 /// participants. |
| 9284 */ | |
| 9285 TurnBasedMatch rematch; | 9344 TurnBasedMatch rematch; |
| 9286 | 9345 |
| 9287 TurnBasedMatchRematch(); | 9346 TurnBasedMatchRematch(); |
| 9288 | 9347 |
| 9289 TurnBasedMatchRematch.fromJson(core.Map _json) { | 9348 TurnBasedMatchRematch.fromJson(core.Map _json) { |
| 9290 if (_json.containsKey("kind")) { | 9349 if (_json.containsKey("kind")) { |
| 9291 kind = _json["kind"]; | 9350 kind = _json["kind"]; |
| 9292 } | 9351 } |
| 9293 if (_json.containsKey("previousMatch")) { | 9352 if (_json.containsKey("previousMatch")) { |
| 9294 previousMatch = new TurnBasedMatch.fromJson(_json["previousMatch"]); | 9353 previousMatch = new TurnBasedMatch.fromJson(_json["previousMatch"]); |
| 9295 } | 9354 } |
| 9296 if (_json.containsKey("rematch")) { | 9355 if (_json.containsKey("rematch")) { |
| 9297 rematch = new TurnBasedMatch.fromJson(_json["rematch"]); | 9356 rematch = new TurnBasedMatch.fromJson(_json["rematch"]); |
| 9298 } | 9357 } |
| 9299 } | 9358 } |
| 9300 | 9359 |
| 9301 core.Map<core.String, core.Object> toJson() { | 9360 core.Map<core.String, core.Object> toJson() { |
| 9302 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9361 final core.Map<core.String, core.Object> _json = |
| 9362 new core.Map<core.String, core.Object>(); |
| 9303 if (kind != null) { | 9363 if (kind != null) { |
| 9304 _json["kind"] = kind; | 9364 _json["kind"] = kind; |
| 9305 } | 9365 } |
| 9306 if (previousMatch != null) { | 9366 if (previousMatch != null) { |
| 9307 _json["previousMatch"] = (previousMatch).toJson(); | 9367 _json["previousMatch"] = (previousMatch).toJson(); |
| 9308 } | 9368 } |
| 9309 if (rematch != null) { | 9369 if (rematch != null) { |
| 9310 _json["rematch"] = (rematch).toJson(); | 9370 _json["rematch"] = (rematch).toJson(); |
| 9311 } | 9371 } |
| 9312 return _json; | 9372 return _json; |
| 9313 } | 9373 } |
| 9314 } | 9374 } |
| 9315 | 9375 |
| 9316 /** This is a JSON template for a turn-based match results object. */ | 9376 /// This is a JSON template for a turn-based match results object. |
| 9317 class TurnBasedMatchResults { | 9377 class TurnBasedMatchResults { |
| 9318 /** The final match data. */ | 9378 /// The final match data. |
| 9319 TurnBasedMatchDataRequest data; | 9379 TurnBasedMatchDataRequest data; |
| 9320 /** | 9380 |
| 9321 * Uniquely identifies the type of this resource. Value is always the fixed | 9381 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 9322 * string games#turnBasedMatchResults. | 9382 /// string games#turnBasedMatchResults. |
| 9323 */ | |
| 9324 core.String kind; | 9383 core.String kind; |
| 9325 /** The version of the match being updated. */ | 9384 |
| 9385 /// The version of the match being updated. |
| 9326 core.int matchVersion; | 9386 core.int matchVersion; |
| 9327 /** The match results for the participants in the match. */ | 9387 |
| 9388 /// The match results for the participants in the match. |
| 9328 core.List<ParticipantResult> results; | 9389 core.List<ParticipantResult> results; |
| 9329 | 9390 |
| 9330 TurnBasedMatchResults(); | 9391 TurnBasedMatchResults(); |
| 9331 | 9392 |
| 9332 TurnBasedMatchResults.fromJson(core.Map _json) { | 9393 TurnBasedMatchResults.fromJson(core.Map _json) { |
| 9333 if (_json.containsKey("data")) { | 9394 if (_json.containsKey("data")) { |
| 9334 data = new TurnBasedMatchDataRequest.fromJson(_json["data"]); | 9395 data = new TurnBasedMatchDataRequest.fromJson(_json["data"]); |
| 9335 } | 9396 } |
| 9336 if (_json.containsKey("kind")) { | 9397 if (_json.containsKey("kind")) { |
| 9337 kind = _json["kind"]; | 9398 kind = _json["kind"]; |
| 9338 } | 9399 } |
| 9339 if (_json.containsKey("matchVersion")) { | 9400 if (_json.containsKey("matchVersion")) { |
| 9340 matchVersion = _json["matchVersion"]; | 9401 matchVersion = _json["matchVersion"]; |
| 9341 } | 9402 } |
| 9342 if (_json.containsKey("results")) { | 9403 if (_json.containsKey("results")) { |
| 9343 results = _json["results"].map((value) => new ParticipantResult.fromJson(v
alue)).toList(); | 9404 results = _json["results"] |
| 9405 .map((value) => new ParticipantResult.fromJson(value)) |
| 9406 .toList(); |
| 9344 } | 9407 } |
| 9345 } | 9408 } |
| 9346 | 9409 |
| 9347 core.Map<core.String, core.Object> toJson() { | 9410 core.Map<core.String, core.Object> toJson() { |
| 9348 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9411 final core.Map<core.String, core.Object> _json = |
| 9412 new core.Map<core.String, core.Object>(); |
| 9349 if (data != null) { | 9413 if (data != null) { |
| 9350 _json["data"] = (data).toJson(); | 9414 _json["data"] = (data).toJson(); |
| 9351 } | 9415 } |
| 9352 if (kind != null) { | 9416 if (kind != null) { |
| 9353 _json["kind"] = kind; | 9417 _json["kind"] = kind; |
| 9354 } | 9418 } |
| 9355 if (matchVersion != null) { | 9419 if (matchVersion != null) { |
| 9356 _json["matchVersion"] = matchVersion; | 9420 _json["matchVersion"] = matchVersion; |
| 9357 } | 9421 } |
| 9358 if (results != null) { | 9422 if (results != null) { |
| 9359 _json["results"] = results.map((value) => (value).toJson()).toList(); | 9423 _json["results"] = results.map((value) => (value).toJson()).toList(); |
| 9360 } | 9424 } |
| 9361 return _json; | 9425 return _json; |
| 9362 } | 9426 } |
| 9363 } | 9427 } |
| 9364 | 9428 |
| 9365 /** | 9429 /// This is a JSON template for a list of turn-based matches returned from a |
| 9366 * This is a JSON template for a list of turn-based matches returned from a | 9430 /// sync. |
| 9367 * sync. | |
| 9368 */ | |
| 9369 class TurnBasedMatchSync { | 9431 class TurnBasedMatchSync { |
| 9370 /** The matches. */ | 9432 /// The matches. |
| 9371 core.List<TurnBasedMatch> items; | 9433 core.List<TurnBasedMatch> items; |
| 9372 /** | 9434 |
| 9373 * Uniquely identifies the type of this resource. Value is always the fixed | 9435 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 9374 * string games#turnBasedMatchSync. | 9436 /// string games#turnBasedMatchSync. |
| 9375 */ | |
| 9376 core.String kind; | 9437 core.String kind; |
| 9377 /** | 9438 |
| 9378 * True if there were more matches available to fetch at the time the response | 9439 /// True if there were more matches available to fetch at the time the |
| 9379 * was generated (which were not returned due to page size limits.) | 9440 /// response was generated (which were not returned due to page size limits.) |
| 9380 */ | |
| 9381 core.bool moreAvailable; | 9441 core.bool moreAvailable; |
| 9382 /** The pagination token for the next page of results. */ | 9442 |
| 9443 /// The pagination token for the next page of results. |
| 9383 core.String nextPageToken; | 9444 core.String nextPageToken; |
| 9384 | 9445 |
| 9385 TurnBasedMatchSync(); | 9446 TurnBasedMatchSync(); |
| 9386 | 9447 |
| 9387 TurnBasedMatchSync.fromJson(core.Map _json) { | 9448 TurnBasedMatchSync.fromJson(core.Map _json) { |
| 9388 if (_json.containsKey("items")) { | 9449 if (_json.containsKey("items")) { |
| 9389 items = _json["items"].map((value) => new TurnBasedMatch.fromJson(value)).
toList(); | 9450 items = _json["items"] |
| 9451 .map((value) => new TurnBasedMatch.fromJson(value)) |
| 9452 .toList(); |
| 9390 } | 9453 } |
| 9391 if (_json.containsKey("kind")) { | 9454 if (_json.containsKey("kind")) { |
| 9392 kind = _json["kind"]; | 9455 kind = _json["kind"]; |
| 9393 } | 9456 } |
| 9394 if (_json.containsKey("moreAvailable")) { | 9457 if (_json.containsKey("moreAvailable")) { |
| 9395 moreAvailable = _json["moreAvailable"]; | 9458 moreAvailable = _json["moreAvailable"]; |
| 9396 } | 9459 } |
| 9397 if (_json.containsKey("nextPageToken")) { | 9460 if (_json.containsKey("nextPageToken")) { |
| 9398 nextPageToken = _json["nextPageToken"]; | 9461 nextPageToken = _json["nextPageToken"]; |
| 9399 } | 9462 } |
| 9400 } | 9463 } |
| 9401 | 9464 |
| 9402 core.Map<core.String, core.Object> toJson() { | 9465 core.Map<core.String, core.Object> toJson() { |
| 9403 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9466 final core.Map<core.String, core.Object> _json = |
| 9467 new core.Map<core.String, core.Object>(); |
| 9404 if (items != null) { | 9468 if (items != null) { |
| 9405 _json["items"] = items.map((value) => (value).toJson()).toList(); | 9469 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 9406 } | 9470 } |
| 9407 if (kind != null) { | 9471 if (kind != null) { |
| 9408 _json["kind"] = kind; | 9472 _json["kind"] = kind; |
| 9409 } | 9473 } |
| 9410 if (moreAvailable != null) { | 9474 if (moreAvailable != null) { |
| 9411 _json["moreAvailable"] = moreAvailable; | 9475 _json["moreAvailable"] = moreAvailable; |
| 9412 } | 9476 } |
| 9413 if (nextPageToken != null) { | 9477 if (nextPageToken != null) { |
| 9414 _json["nextPageToken"] = nextPageToken; | 9478 _json["nextPageToken"] = nextPageToken; |
| 9415 } | 9479 } |
| 9416 return _json; | 9480 return _json; |
| 9417 } | 9481 } |
| 9418 } | 9482 } |
| 9419 | 9483 |
| 9420 /** This is a JSON template for the object representing a turn. */ | 9484 /// This is a JSON template for the object representing a turn. |
| 9421 class TurnBasedMatchTurn { | 9485 class TurnBasedMatchTurn { |
| 9422 /** The shared game state data after the turn is over. */ | 9486 /// The shared game state data after the turn is over. |
| 9423 TurnBasedMatchDataRequest data; | 9487 TurnBasedMatchDataRequest data; |
| 9424 /** | 9488 |
| 9425 * Uniquely identifies the type of this resource. Value is always the fixed | 9489 /// Uniquely identifies the type of this resource. Value is always the fixed |
| 9426 * string games#turnBasedMatchTurn. | 9490 /// string games#turnBasedMatchTurn. |
| 9427 */ | |
| 9428 core.String kind; | 9491 core.String kind; |
| 9429 /** | 9492 |
| 9430 * The version of this match: an increasing counter, used to avoid out-of-date | 9493 /// The version of this match: an increasing counter, used to avoid |
| 9431 * updates to the match. | 9494 /// out-of-date updates to the match. |
| 9432 */ | |
| 9433 core.int matchVersion; | 9495 core.int matchVersion; |
| 9434 /** | 9496 |
| 9435 * The ID of the participant who should take their turn next. May be set to | 9497 /// The ID of the participant who should take their turn next. May be set to |
| 9436 * the current player's participant ID to update match state without changing | 9498 /// the current player's participant ID to update match state without |
| 9437 * the turn. If not set, the match will wait for other player(s) to join via | 9499 /// changing the turn. If not set, the match will wait for other player(s) to |
| 9438 * automatching; this is only valid if automatch criteria is set on the match | 9500 /// join via automatching; this is only valid if automatch criteria is set on |
| 9439 * with remaining slots for automatched players. | 9501 /// the match with remaining slots for automatched players. |
| 9440 */ | |
| 9441 core.String pendingParticipantId; | 9502 core.String pendingParticipantId; |
| 9442 /** The match results for the participants in the match. */ | 9503 |
| 9504 /// The match results for the participants in the match. |
| 9443 core.List<ParticipantResult> results; | 9505 core.List<ParticipantResult> results; |
| 9444 | 9506 |
| 9445 TurnBasedMatchTurn(); | 9507 TurnBasedMatchTurn(); |
| 9446 | 9508 |
| 9447 TurnBasedMatchTurn.fromJson(core.Map _json) { | 9509 TurnBasedMatchTurn.fromJson(core.Map _json) { |
| 9448 if (_json.containsKey("data")) { | 9510 if (_json.containsKey("data")) { |
| 9449 data = new TurnBasedMatchDataRequest.fromJson(_json["data"]); | 9511 data = new TurnBasedMatchDataRequest.fromJson(_json["data"]); |
| 9450 } | 9512 } |
| 9451 if (_json.containsKey("kind")) { | 9513 if (_json.containsKey("kind")) { |
| 9452 kind = _json["kind"]; | 9514 kind = _json["kind"]; |
| 9453 } | 9515 } |
| 9454 if (_json.containsKey("matchVersion")) { | 9516 if (_json.containsKey("matchVersion")) { |
| 9455 matchVersion = _json["matchVersion"]; | 9517 matchVersion = _json["matchVersion"]; |
| 9456 } | 9518 } |
| 9457 if (_json.containsKey("pendingParticipantId")) { | 9519 if (_json.containsKey("pendingParticipantId")) { |
| 9458 pendingParticipantId = _json["pendingParticipantId"]; | 9520 pendingParticipantId = _json["pendingParticipantId"]; |
| 9459 } | 9521 } |
| 9460 if (_json.containsKey("results")) { | 9522 if (_json.containsKey("results")) { |
| 9461 results = _json["results"].map((value) => new ParticipantResult.fromJson(v
alue)).toList(); | 9523 results = _json["results"] |
| 9524 .map((value) => new ParticipantResult.fromJson(value)) |
| 9525 .toList(); |
| 9462 } | 9526 } |
| 9463 } | 9527 } |
| 9464 | 9528 |
| 9465 core.Map<core.String, core.Object> toJson() { | 9529 core.Map<core.String, core.Object> toJson() { |
| 9466 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9530 final core.Map<core.String, core.Object> _json = |
| 9531 new core.Map<core.String, core.Object>(); |
| 9467 if (data != null) { | 9532 if (data != null) { |
| 9468 _json["data"] = (data).toJson(); | 9533 _json["data"] = (data).toJson(); |
| 9469 } | 9534 } |
| 9470 if (kind != null) { | 9535 if (kind != null) { |
| 9471 _json["kind"] = kind; | 9536 _json["kind"] = kind; |
| 9472 } | 9537 } |
| 9473 if (matchVersion != null) { | 9538 if (matchVersion != null) { |
| 9474 _json["matchVersion"] = matchVersion; | 9539 _json["matchVersion"] = matchVersion; |
| 9475 } | 9540 } |
| 9476 if (pendingParticipantId != null) { | 9541 if (pendingParticipantId != null) { |
| 9477 _json["pendingParticipantId"] = pendingParticipantId; | 9542 _json["pendingParticipantId"] = pendingParticipantId; |
| 9478 } | 9543 } |
| 9479 if (results != null) { | 9544 if (results != null) { |
| 9480 _json["results"] = results.map((value) => (value).toJson()).toList(); | 9545 _json["results"] = results.map((value) => (value).toJson()).toList(); |
| 9481 } | 9546 } |
| 9482 return _json; | 9547 return _json; |
| 9483 } | 9548 } |
| 9484 } | 9549 } |
| OLD | NEW |