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.gamesConfiguration.v1configuration; | 3 library googleapis.gamesConfiguration.v1configuration; |
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, Media, UploadOptions, | 13 show |
14 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions, | 14 ApiRequestError, |
15 ByteRange; | 15 DetailedApiRequestError, |
| 16 Media, |
| 17 UploadOptions, |
| 18 ResumableUploadOptions, |
| 19 DownloadOptions, |
| 20 PartialDownloadOptions, |
| 21 ByteRange; |
16 | 22 |
17 const core.String USER_AGENT = 'dart-api-client gamesConfiguration/v1configurati
on'; | 23 const core.String USER_AGENT = |
| 24 'dart-api-client gamesConfiguration/v1configuration'; |
18 | 25 |
19 /** The Publishing API for Google Play Game Services. */ | 26 /// The Publishing API for Google Play Game Services. |
20 class GamesConfigurationApi { | 27 class GamesConfigurationApi { |
21 /** View and manage your Google Play Developer account */ | 28 /// View and manage your Google Play Developer account |
22 static const AndroidpublisherScope = "https://www.googleapis.com/auth/androidp
ublisher"; | 29 static const AndroidpublisherScope = |
23 | 30 "https://www.googleapis.com/auth/androidpublisher"; |
24 | 31 |
25 final commons.ApiRequester _requester; | 32 final commons.ApiRequester _requester; |
26 | 33 |
27 AchievementConfigurationsResourceApi get achievementConfigurations => new Achi
evementConfigurationsResourceApi(_requester); | 34 AchievementConfigurationsResourceApi get achievementConfigurations => |
28 ImageConfigurationsResourceApi get imageConfigurations => new ImageConfigurati
onsResourceApi(_requester); | 35 new AchievementConfigurationsResourceApi(_requester); |
29 LeaderboardConfigurationsResourceApi get leaderboardConfigurations => new Lead
erboardConfigurationsResourceApi(_requester); | 36 ImageConfigurationsResourceApi get imageConfigurations => |
| 37 new ImageConfigurationsResourceApi(_requester); |
| 38 LeaderboardConfigurationsResourceApi get leaderboardConfigurations => |
| 39 new LeaderboardConfigurationsResourceApi(_requester); |
30 | 40 |
31 GamesConfigurationApi(http.Client client, {core.String rootUrl: "https://www.g
oogleapis.com/", core.String servicePath: "games/v1configuration/"}) : | 41 GamesConfigurationApi(http.Client client, |
32 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 42 {core.String rootUrl: "https://www.googleapis.com/", |
| 43 core.String servicePath: "games/v1configuration/"}) |
| 44 : _requester = |
| 45 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
33 } | 46 } |
34 | 47 |
35 | |
36 class AchievementConfigurationsResourceApi { | 48 class AchievementConfigurationsResourceApi { |
37 final commons.ApiRequester _requester; | 49 final commons.ApiRequester _requester; |
38 | 50 |
39 AchievementConfigurationsResourceApi(commons.ApiRequester client) : | 51 AchievementConfigurationsResourceApi(commons.ApiRequester client) |
40 _requester = client; | 52 : _requester = client; |
41 | 53 |
42 /** | 54 /// Delete the achievement configuration with the given ID. |
43 * Delete the achievement configuration with the given ID. | 55 /// |
44 * | 56 /// Request parameters: |
45 * Request parameters: | 57 /// |
46 * | 58 /// [achievementId] - The ID of the achievement used by this method. |
47 * [achievementId] - The ID of the achievement used by this method. | 59 /// |
48 * | 60 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
49 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 61 /// an error. |
50 * error. | 62 /// |
51 * | 63 /// If the used [http.Client] completes with an error when making a REST |
52 * If the used [http.Client] completes with an error when making a REST call, | 64 /// call, this method will complete with the same error. |
53 * this method will complete with the same error. | |
54 */ | |
55 async.Future delete(core.String achievementId) { | 65 async.Future delete(core.String achievementId) { |
56 var _url = null; | 66 var _url = null; |
57 var _queryParams = new core.Map(); | 67 var _queryParams = new core.Map(); |
58 var _uploadMedia = null; | 68 var _uploadMedia = null; |
59 var _uploadOptions = null; | 69 var _uploadOptions = null; |
60 var _downloadOptions = commons.DownloadOptions.Metadata; | 70 var _downloadOptions = commons.DownloadOptions.Metadata; |
61 var _body = null; | 71 var _body = null; |
62 | 72 |
63 if (achievementId == null) { | 73 if (achievementId == null) { |
64 throw new core.ArgumentError("Parameter achievementId is required."); | 74 throw new core.ArgumentError("Parameter achievementId is required."); |
65 } | 75 } |
66 | 76 |
67 _downloadOptions = null; | 77 _downloadOptions = null; |
68 | 78 |
69 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId'); | 79 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId'); |
70 | 80 |
71 var _response = _requester.request(_url, | 81 var _response = _requester.request(_url, "DELETE", |
72 "DELETE", | 82 body: _body, |
73 body: _body, | 83 queryParams: _queryParams, |
74 queryParams: _queryParams, | 84 uploadOptions: _uploadOptions, |
75 uploadOptions: _uploadOptions, | 85 uploadMedia: _uploadMedia, |
76 uploadMedia: _uploadMedia, | 86 downloadOptions: _downloadOptions); |
77 downloadOptions: _downloadOptions); | |
78 return _response.then((data) => null); | 87 return _response.then((data) => null); |
79 } | 88 } |
80 | 89 |
81 /** | 90 /// Retrieves the metadata of the achievement configuration with the given |
82 * Retrieves the metadata of the achievement configuration with the given ID. | 91 /// ID. |
83 * | 92 /// |
84 * Request parameters: | 93 /// Request parameters: |
85 * | 94 /// |
86 * [achievementId] - The ID of the achievement used by this method. | 95 /// [achievementId] - The ID of the achievement used by this method. |
87 * | 96 /// |
88 * Completes with a [AchievementConfiguration]. | 97 /// Completes with a [AchievementConfiguration]. |
89 * | 98 /// |
90 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 99 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
91 * error. | 100 /// an error. |
92 * | 101 /// |
93 * If the used [http.Client] completes with an error when making a REST call, | 102 /// If the used [http.Client] completes with an error when making a REST |
94 * this method will complete with the same error. | 103 /// call, this method will complete with the same error. |
95 */ | |
96 async.Future<AchievementConfiguration> get(core.String achievementId) { | 104 async.Future<AchievementConfiguration> get(core.String achievementId) { |
97 var _url = null; | 105 var _url = null; |
98 var _queryParams = new core.Map(); | 106 var _queryParams = new core.Map(); |
99 var _uploadMedia = null; | 107 var _uploadMedia = null; |
100 var _uploadOptions = null; | 108 var _uploadOptions = null; |
101 var _downloadOptions = commons.DownloadOptions.Metadata; | 109 var _downloadOptions = commons.DownloadOptions.Metadata; |
102 var _body = null; | 110 var _body = null; |
103 | 111 |
104 if (achievementId == null) { | 112 if (achievementId == null) { |
105 throw new core.ArgumentError("Parameter achievementId is required."); | 113 throw new core.ArgumentError("Parameter achievementId is required."); |
106 } | 114 } |
107 | 115 |
108 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId'); | 116 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId'); |
109 | 117 |
110 var _response = _requester.request(_url, | 118 var _response = _requester.request(_url, "GET", |
111 "GET", | 119 body: _body, |
112 body: _body, | 120 queryParams: _queryParams, |
113 queryParams: _queryParams, | 121 uploadOptions: _uploadOptions, |
114 uploadOptions: _uploadOptions, | 122 uploadMedia: _uploadMedia, |
115 uploadMedia: _uploadMedia, | 123 downloadOptions: _downloadOptions); |
116 downloadOptions: _downloadOptions); | 124 return _response |
117 return _response.then((data) => new AchievementConfiguration.fromJson(data))
; | 125 .then((data) => new AchievementConfiguration.fromJson(data)); |
118 } | 126 } |
119 | 127 |
120 /** | 128 /// Insert a new achievement configuration in this application. |
121 * Insert a new achievement configuration in this application. | 129 /// |
122 * | 130 /// [request] - The metadata request object. |
123 * [request] - The metadata request object. | 131 /// |
124 * | 132 /// Request parameters: |
125 * Request parameters: | 133 /// |
126 * | 134 /// [applicationId] - The application ID from the Google Play developer |
127 * [applicationId] - The application ID from the Google Play developer | 135 /// console. |
128 * console. | 136 /// |
129 * | 137 /// Completes with a [AchievementConfiguration]. |
130 * Completes with a [AchievementConfiguration]. | 138 /// |
131 * | 139 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
132 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 140 /// an error. |
133 * error. | 141 /// |
134 * | 142 /// If the used [http.Client] completes with an error when making a REST |
135 * If the used [http.Client] completes with an error when making a REST call, | 143 /// call, this method will complete with the same error. |
136 * this method will complete with the same error. | 144 async.Future<AchievementConfiguration> insert( |
137 */ | 145 AchievementConfiguration request, core.String applicationId) { |
138 async.Future<AchievementConfiguration> insert(AchievementConfiguration request
, core.String applicationId) { | |
139 var _url = null; | 146 var _url = null; |
140 var _queryParams = new core.Map(); | 147 var _queryParams = new core.Map(); |
141 var _uploadMedia = null; | 148 var _uploadMedia = null; |
142 var _uploadOptions = null; | 149 var _uploadOptions = null; |
143 var _downloadOptions = commons.DownloadOptions.Metadata; | 150 var _downloadOptions = commons.DownloadOptions.Metadata; |
144 var _body = null; | 151 var _body = null; |
145 | 152 |
146 if (request != null) { | 153 if (request != null) { |
147 _body = convert.JSON.encode((request).toJson()); | 154 _body = convert.JSON.encode((request).toJson()); |
148 } | 155 } |
149 if (applicationId == null) { | 156 if (applicationId == null) { |
150 throw new core.ArgumentError("Parameter applicationId is required."); | 157 throw new core.ArgumentError("Parameter applicationId is required."); |
151 } | 158 } |
152 | 159 |
153 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId') + '
/achievements'; | 160 _url = 'applications/' + |
| 161 commons.Escaper.ecapeVariable('$applicationId') + |
| 162 '/achievements'; |
154 | 163 |
155 var _response = _requester.request(_url, | 164 var _response = _requester.request(_url, "POST", |
156 "POST", | 165 body: _body, |
157 body: _body, | 166 queryParams: _queryParams, |
158 queryParams: _queryParams, | 167 uploadOptions: _uploadOptions, |
159 uploadOptions: _uploadOptions, | 168 uploadMedia: _uploadMedia, |
160 uploadMedia: _uploadMedia, | 169 downloadOptions: _downloadOptions); |
161 downloadOptions: _downloadOptions); | 170 return _response |
162 return _response.then((data) => new AchievementConfiguration.fromJson(data))
; | 171 .then((data) => new AchievementConfiguration.fromJson(data)); |
163 } | 172 } |
164 | 173 |
165 /** | 174 /// Returns a list of the achievement configurations in this application. |
166 * Returns a list of the achievement configurations in this application. | 175 /// |
167 * | 176 /// Request parameters: |
168 * Request parameters: | 177 /// |
169 * | 178 /// [applicationId] - The application ID from the Google Play developer |
170 * [applicationId] - The application ID from the Google Play developer | 179 /// console. |
171 * console. | 180 /// |
172 * | 181 /// [maxResults] - The maximum number of resource configurations to return in |
173 * [maxResults] - The maximum number of resource configurations to return in | 182 /// the response, used for paging. For any response, the actual number of |
174 * the response, used for paging. For any response, the actual number of | 183 /// resources returned may be less than the specified maxResults. |
175 * resources returned may be less than the specified maxResults. | 184 /// Value must be between "1" and "200". |
176 * Value must be between "1" and "200". | 185 /// |
177 * | 186 /// [pageToken] - The token returned by the previous request. |
178 * [pageToken] - The token returned by the previous request. | 187 /// |
179 * | 188 /// Completes with a [AchievementConfigurationListResponse]. |
180 * Completes with a [AchievementConfigurationListResponse]. | 189 /// |
181 * | 190 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
182 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 191 /// an error. |
183 * error. | 192 /// |
184 * | 193 /// If the used [http.Client] completes with an error when making a REST |
185 * If the used [http.Client] completes with an error when making a REST call, | 194 /// call, this method will complete with the same error. |
186 * this method will complete with the same error. | 195 async.Future<AchievementConfigurationListResponse> list( |
187 */ | 196 core.String applicationId, |
188 async.Future<AchievementConfigurationListResponse> list(core.String applicatio
nId, {core.int maxResults, core.String pageToken}) { | 197 {core.int maxResults, |
| 198 core.String pageToken}) { |
189 var _url = null; | 199 var _url = null; |
190 var _queryParams = new core.Map(); | 200 var _queryParams = new core.Map(); |
191 var _uploadMedia = null; | 201 var _uploadMedia = null; |
192 var _uploadOptions = null; | 202 var _uploadOptions = null; |
193 var _downloadOptions = commons.DownloadOptions.Metadata; | 203 var _downloadOptions = commons.DownloadOptions.Metadata; |
194 var _body = null; | 204 var _body = null; |
195 | 205 |
196 if (applicationId == null) { | 206 if (applicationId == null) { |
197 throw new core.ArgumentError("Parameter applicationId is required."); | 207 throw new core.ArgumentError("Parameter applicationId is required."); |
198 } | 208 } |
199 if (maxResults != null) { | 209 if (maxResults != null) { |
200 _queryParams["maxResults"] = ["${maxResults}"]; | 210 _queryParams["maxResults"] = ["${maxResults}"]; |
201 } | 211 } |
202 if (pageToken != null) { | 212 if (pageToken != null) { |
203 _queryParams["pageToken"] = [pageToken]; | 213 _queryParams["pageToken"] = [pageToken]; |
204 } | 214 } |
205 | 215 |
206 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId') + '
/achievements'; | 216 _url = 'applications/' + |
| 217 commons.Escaper.ecapeVariable('$applicationId') + |
| 218 '/achievements'; |
207 | 219 |
208 var _response = _requester.request(_url, | 220 var _response = _requester.request(_url, "GET", |
209 "GET", | 221 body: _body, |
210 body: _body, | 222 queryParams: _queryParams, |
211 queryParams: _queryParams, | 223 uploadOptions: _uploadOptions, |
212 uploadOptions: _uploadOptions, | 224 uploadMedia: _uploadMedia, |
213 uploadMedia: _uploadMedia, | 225 downloadOptions: _downloadOptions); |
214 downloadOptions: _downloadOptions); | 226 return _response.then( |
215 return _response.then((data) => new AchievementConfigurationListResponse.fro
mJson(data)); | 227 (data) => new AchievementConfigurationListResponse.fromJson(data)); |
216 } | 228 } |
217 | 229 |
218 /** | 230 /// Update the metadata of the achievement configuration with the given ID. |
219 * Update the metadata of the achievement configuration with the given ID. | 231 /// This method supports patch semantics. |
220 * This method supports patch semantics. | 232 /// |
221 * | 233 /// [request] - The metadata request object. |
222 * [request] - The metadata request object. | 234 /// |
223 * | 235 /// Request parameters: |
224 * Request parameters: | 236 /// |
225 * | 237 /// [achievementId] - The ID of the achievement used by this method. |
226 * [achievementId] - The ID of the achievement used by this method. | 238 /// |
227 * | 239 /// Completes with a [AchievementConfiguration]. |
228 * Completes with a [AchievementConfiguration]. | 240 /// |
229 * | 241 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
230 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 242 /// an error. |
231 * error. | 243 /// |
232 * | 244 /// If the used [http.Client] completes with an error when making a REST |
233 * If the used [http.Client] completes with an error when making a REST call, | 245 /// call, this method will complete with the same error. |
234 * this method will complete with the same error. | 246 async.Future<AchievementConfiguration> patch( |
235 */ | 247 AchievementConfiguration request, core.String achievementId) { |
236 async.Future<AchievementConfiguration> patch(AchievementConfiguration request,
core.String achievementId) { | |
237 var _url = null; | 248 var _url = null; |
238 var _queryParams = new core.Map(); | 249 var _queryParams = new core.Map(); |
239 var _uploadMedia = null; | 250 var _uploadMedia = null; |
240 var _uploadOptions = null; | 251 var _uploadOptions = null; |
241 var _downloadOptions = commons.DownloadOptions.Metadata; | 252 var _downloadOptions = commons.DownloadOptions.Metadata; |
242 var _body = null; | 253 var _body = null; |
243 | 254 |
244 if (request != null) { | 255 if (request != null) { |
245 _body = convert.JSON.encode((request).toJson()); | 256 _body = convert.JSON.encode((request).toJson()); |
246 } | 257 } |
247 if (achievementId == null) { | 258 if (achievementId == null) { |
248 throw new core.ArgumentError("Parameter achievementId is required."); | 259 throw new core.ArgumentError("Parameter achievementId is required."); |
249 } | 260 } |
250 | 261 |
251 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId'); | 262 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId'); |
252 | 263 |
253 var _response = _requester.request(_url, | 264 var _response = _requester.request(_url, "PATCH", |
254 "PATCH", | 265 body: _body, |
255 body: _body, | 266 queryParams: _queryParams, |
256 queryParams: _queryParams, | 267 uploadOptions: _uploadOptions, |
257 uploadOptions: _uploadOptions, | 268 uploadMedia: _uploadMedia, |
258 uploadMedia: _uploadMedia, | 269 downloadOptions: _downloadOptions); |
259 downloadOptions: _downloadOptions); | 270 return _response |
260 return _response.then((data) => new AchievementConfiguration.fromJson(data))
; | 271 .then((data) => new AchievementConfiguration.fromJson(data)); |
261 } | 272 } |
262 | 273 |
263 /** | 274 /// Update the metadata of the achievement configuration with the given ID. |
264 * Update the metadata of the achievement configuration with the given ID. | 275 /// |
265 * | 276 /// [request] - The metadata request object. |
266 * [request] - The metadata request object. | 277 /// |
267 * | 278 /// Request parameters: |
268 * Request parameters: | 279 /// |
269 * | 280 /// [achievementId] - The ID of the achievement used by this method. |
270 * [achievementId] - The ID of the achievement used by this method. | 281 /// |
271 * | 282 /// Completes with a [AchievementConfiguration]. |
272 * Completes with a [AchievementConfiguration]. | 283 /// |
273 * | 284 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
274 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 285 /// an error. |
275 * error. | 286 /// |
276 * | 287 /// 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, | 288 /// call, this method will complete with the same error. |
278 * this method will complete with the same error. | 289 async.Future<AchievementConfiguration> update( |
279 */ | 290 AchievementConfiguration request, core.String achievementId) { |
280 async.Future<AchievementConfiguration> update(AchievementConfiguration request
, core.String achievementId) { | |
281 var _url = null; | 291 var _url = null; |
282 var _queryParams = new core.Map(); | 292 var _queryParams = new core.Map(); |
283 var _uploadMedia = null; | 293 var _uploadMedia = null; |
284 var _uploadOptions = null; | 294 var _uploadOptions = null; |
285 var _downloadOptions = commons.DownloadOptions.Metadata; | 295 var _downloadOptions = commons.DownloadOptions.Metadata; |
286 var _body = null; | 296 var _body = null; |
287 | 297 |
288 if (request != null) { | 298 if (request != null) { |
289 _body = convert.JSON.encode((request).toJson()); | 299 _body = convert.JSON.encode((request).toJson()); |
290 } | 300 } |
291 if (achievementId == null) { | 301 if (achievementId == null) { |
292 throw new core.ArgumentError("Parameter achievementId is required."); | 302 throw new core.ArgumentError("Parameter achievementId is required."); |
293 } | 303 } |
294 | 304 |
295 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId'); | 305 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId'); |
296 | 306 |
297 var _response = _requester.request(_url, | 307 var _response = _requester.request(_url, "PUT", |
298 "PUT", | 308 body: _body, |
299 body: _body, | 309 queryParams: _queryParams, |
300 queryParams: _queryParams, | 310 uploadOptions: _uploadOptions, |
301 uploadOptions: _uploadOptions, | 311 uploadMedia: _uploadMedia, |
302 uploadMedia: _uploadMedia, | 312 downloadOptions: _downloadOptions); |
303 downloadOptions: _downloadOptions); | 313 return _response |
304 return _response.then((data) => new AchievementConfiguration.fromJson(data))
; | 314 .then((data) => new AchievementConfiguration.fromJson(data)); |
305 } | 315 } |
306 | |
307 } | 316 } |
308 | 317 |
309 | |
310 class ImageConfigurationsResourceApi { | 318 class ImageConfigurationsResourceApi { |
311 final commons.ApiRequester _requester; | 319 final commons.ApiRequester _requester; |
312 | 320 |
313 ImageConfigurationsResourceApi(commons.ApiRequester client) : | 321 ImageConfigurationsResourceApi(commons.ApiRequester client) |
314 _requester = client; | 322 : _requester = client; |
315 | 323 |
316 /** | 324 /// Uploads an image for a resource with the given ID and image type. |
317 * Uploads an image for a resource with the given ID and image type. | 325 /// |
318 * | 326 /// Request parameters: |
319 * Request parameters: | 327 /// |
320 * | 328 /// [resourceId] - The ID of the resource used by this method. |
321 * [resourceId] - The ID of the resource used by this method. | 329 /// |
322 * | 330 /// [imageType] - Selects which image in a resource for this method. |
323 * [imageType] - Selects which image in a resource for this method. | 331 /// Possible string values are: |
324 * Possible string values are: | 332 /// - "ACHIEVEMENT_ICON" : The icon image for an achievement resource. |
325 * - "ACHIEVEMENT_ICON" : The icon image for an achievement resource. | 333 /// - "LEADERBOARD_ICON" : The icon image for a leaderboard resource. |
326 * - "LEADERBOARD_ICON" : The icon image for a leaderboard resource. | 334 /// |
327 * | 335 /// [uploadMedia] - The media to upload. |
328 * [uploadMedia] - The media to upload. | 336 /// |
329 * | 337 /// [uploadOptions] - Options for the media upload. Streaming Media without |
330 * [uploadOptions] - Options for the media upload. Streaming Media without the | 338 /// the length being known ahead of time is only supported via resumable |
331 * length being known ahead of time is only supported via resumable uploads. | 339 /// uploads. |
332 * | 340 /// |
333 * Completes with a [ImageConfiguration]. | 341 /// Completes with a [ImageConfiguration]. |
334 * | 342 /// |
335 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 343 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
336 * error. | 344 /// an error. |
337 * | 345 /// |
338 * If the used [http.Client] completes with an error when making a REST call, | 346 /// If the used [http.Client] completes with an error when making a REST |
339 * this method will complete with the same error. | 347 /// call, this method will complete with the same error. |
340 */ | 348 async.Future<ImageConfiguration> upload( |
341 async.Future<ImageConfiguration> upload(core.String resourceId, core.String im
ageType, {commons.UploadOptions uploadOptions : commons.UploadOptions.Default, c
ommons.Media uploadMedia}) { | 349 core.String resourceId, core.String imageType, |
| 350 {commons.UploadOptions uploadOptions: commons.UploadOptions.Default, |
| 351 commons.Media uploadMedia}) { |
342 var _url = null; | 352 var _url = null; |
343 var _queryParams = new core.Map(); | 353 var _queryParams = new core.Map(); |
344 var _uploadMedia = null; | 354 var _uploadMedia = null; |
345 var _uploadOptions = null; | 355 var _uploadOptions = null; |
346 var _downloadOptions = commons.DownloadOptions.Metadata; | 356 var _downloadOptions = commons.DownloadOptions.Metadata; |
347 var _body = null; | 357 var _body = null; |
348 | 358 |
349 if (resourceId == null) { | 359 if (resourceId == null) { |
350 throw new core.ArgumentError("Parameter resourceId is required."); | 360 throw new core.ArgumentError("Parameter resourceId is required."); |
351 } | 361 } |
352 if (imageType == null) { | 362 if (imageType == null) { |
353 throw new core.ArgumentError("Parameter imageType is required."); | 363 throw new core.ArgumentError("Parameter imageType is required."); |
354 } | 364 } |
355 | 365 |
356 _uploadMedia = uploadMedia; | 366 _uploadMedia = uploadMedia; |
357 _uploadOptions = uploadOptions; | 367 _uploadOptions = uploadOptions; |
358 | 368 |
359 if (_uploadMedia == null) { | 369 if (_uploadMedia == null) { |
360 _url = 'images/' + commons.Escaper.ecapeVariable('$resourceId') + '/imageT
ype/' + commons.Escaper.ecapeVariable('$imageType'); | 370 _url = 'images/' + |
| 371 commons.Escaper.ecapeVariable('$resourceId') + |
| 372 '/imageType/' + |
| 373 commons.Escaper.ecapeVariable('$imageType'); |
361 } else if (_uploadOptions is commons.ResumableUploadOptions) { | 374 } else if (_uploadOptions is commons.ResumableUploadOptions) { |
362 _url = '/resumable/upload/games/v1configuration/images/' + commons.Escaper
.ecapeVariable('$resourceId') + '/imageType/' + commons.Escaper.ecapeVariable('$
imageType'); | 375 _url = '/resumable/upload/games/v1configuration/images/' + |
| 376 commons.Escaper.ecapeVariable('$resourceId') + |
| 377 '/imageType/' + |
| 378 commons.Escaper.ecapeVariable('$imageType'); |
363 } else { | 379 } else { |
364 _url = '/upload/games/v1configuration/images/' + commons.Escaper.ecapeVari
able('$resourceId') + '/imageType/' + commons.Escaper.ecapeVariable('$imageType'
); | 380 _url = '/upload/games/v1configuration/images/' + |
| 381 commons.Escaper.ecapeVariable('$resourceId') + |
| 382 '/imageType/' + |
| 383 commons.Escaper.ecapeVariable('$imageType'); |
365 } | 384 } |
366 | 385 |
367 | 386 var _response = _requester.request(_url, "POST", |
368 var _response = _requester.request(_url, | 387 body: _body, |
369 "POST", | 388 queryParams: _queryParams, |
370 body: _body, | 389 uploadOptions: _uploadOptions, |
371 queryParams: _queryParams, | 390 uploadMedia: _uploadMedia, |
372 uploadOptions: _uploadOptions, | 391 downloadOptions: _downloadOptions); |
373 uploadMedia: _uploadMedia, | |
374 downloadOptions: _downloadOptions); | |
375 return _response.then((data) => new ImageConfiguration.fromJson(data)); | 392 return _response.then((data) => new ImageConfiguration.fromJson(data)); |
376 } | 393 } |
377 | |
378 } | 394 } |
379 | 395 |
380 | |
381 class LeaderboardConfigurationsResourceApi { | 396 class LeaderboardConfigurationsResourceApi { |
382 final commons.ApiRequester _requester; | 397 final commons.ApiRequester _requester; |
383 | 398 |
384 LeaderboardConfigurationsResourceApi(commons.ApiRequester client) : | 399 LeaderboardConfigurationsResourceApi(commons.ApiRequester client) |
385 _requester = client; | 400 : _requester = client; |
386 | 401 |
387 /** | 402 /// Delete the leaderboard configuration with the given ID. |
388 * Delete the leaderboard configuration with the given ID. | 403 /// |
389 * | 404 /// Request parameters: |
390 * Request parameters: | 405 /// |
391 * | 406 /// [leaderboardId] - The ID of the leaderboard. |
392 * [leaderboardId] - The ID of the leaderboard. | 407 /// |
393 * | 408 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
394 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 409 /// an error. |
395 * error. | 410 /// |
396 * | 411 /// If the used [http.Client] completes with an error when making a REST |
397 * If the used [http.Client] completes with an error when making a REST call, | 412 /// call, this method will complete with the same error. |
398 * this method will complete with the same error. | |
399 */ | |
400 async.Future delete(core.String leaderboardId) { | 413 async.Future delete(core.String leaderboardId) { |
401 var _url = null; | 414 var _url = null; |
402 var _queryParams = new core.Map(); | 415 var _queryParams = new core.Map(); |
403 var _uploadMedia = null; | 416 var _uploadMedia = null; |
404 var _uploadOptions = null; | 417 var _uploadOptions = null; |
405 var _downloadOptions = commons.DownloadOptions.Metadata; | 418 var _downloadOptions = commons.DownloadOptions.Metadata; |
406 var _body = null; | 419 var _body = null; |
407 | 420 |
408 if (leaderboardId == null) { | 421 if (leaderboardId == null) { |
409 throw new core.ArgumentError("Parameter leaderboardId is required."); | 422 throw new core.ArgumentError("Parameter leaderboardId is required."); |
410 } | 423 } |
411 | 424 |
412 _downloadOptions = null; | 425 _downloadOptions = null; |
413 | 426 |
414 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId'); | 427 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId'); |
415 | 428 |
416 var _response = _requester.request(_url, | 429 var _response = _requester.request(_url, "DELETE", |
417 "DELETE", | 430 body: _body, |
418 body: _body, | 431 queryParams: _queryParams, |
419 queryParams: _queryParams, | 432 uploadOptions: _uploadOptions, |
420 uploadOptions: _uploadOptions, | 433 uploadMedia: _uploadMedia, |
421 uploadMedia: _uploadMedia, | 434 downloadOptions: _downloadOptions); |
422 downloadOptions: _downloadOptions); | |
423 return _response.then((data) => null); | 435 return _response.then((data) => null); |
424 } | 436 } |
425 | 437 |
426 /** | 438 /// Retrieves the metadata of the leaderboard configuration with the given |
427 * Retrieves the metadata of the leaderboard configuration with the given ID. | 439 /// ID. |
428 * | 440 /// |
429 * Request parameters: | 441 /// Request parameters: |
430 * | 442 /// |
431 * [leaderboardId] - The ID of the leaderboard. | 443 /// [leaderboardId] - The ID of the leaderboard. |
432 * | 444 /// |
433 * Completes with a [LeaderboardConfiguration]. | 445 /// Completes with a [LeaderboardConfiguration]. |
434 * | 446 /// |
435 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 447 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
436 * error. | 448 /// an error. |
437 * | 449 /// |
438 * If the used [http.Client] completes with an error when making a REST call, | 450 /// If the used [http.Client] completes with an error when making a REST |
439 * this method will complete with the same error. | 451 /// call, this method will complete with the same error. |
440 */ | |
441 async.Future<LeaderboardConfiguration> get(core.String leaderboardId) { | 452 async.Future<LeaderboardConfiguration> get(core.String leaderboardId) { |
442 var _url = null; | 453 var _url = null; |
443 var _queryParams = new core.Map(); | 454 var _queryParams = new core.Map(); |
444 var _uploadMedia = null; | 455 var _uploadMedia = null; |
445 var _uploadOptions = null; | 456 var _uploadOptions = null; |
446 var _downloadOptions = commons.DownloadOptions.Metadata; | 457 var _downloadOptions = commons.DownloadOptions.Metadata; |
447 var _body = null; | 458 var _body = null; |
448 | 459 |
449 if (leaderboardId == null) { | 460 if (leaderboardId == null) { |
450 throw new core.ArgumentError("Parameter leaderboardId is required."); | 461 throw new core.ArgumentError("Parameter leaderboardId is required."); |
451 } | 462 } |
452 | 463 |
453 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId'); | 464 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId'); |
454 | 465 |
455 var _response = _requester.request(_url, | 466 var _response = _requester.request(_url, "GET", |
456 "GET", | 467 body: _body, |
457 body: _body, | 468 queryParams: _queryParams, |
458 queryParams: _queryParams, | 469 uploadOptions: _uploadOptions, |
459 uploadOptions: _uploadOptions, | 470 uploadMedia: _uploadMedia, |
460 uploadMedia: _uploadMedia, | 471 downloadOptions: _downloadOptions); |
461 downloadOptions: _downloadOptions); | 472 return _response |
462 return _response.then((data) => new LeaderboardConfiguration.fromJson(data))
; | 473 .then((data) => new LeaderboardConfiguration.fromJson(data)); |
463 } | 474 } |
464 | 475 |
465 /** | 476 /// Insert a new leaderboard configuration in this application. |
466 * Insert a new leaderboard configuration in this application. | 477 /// |
467 * | 478 /// [request] - The metadata request object. |
468 * [request] - The metadata request object. | 479 /// |
469 * | 480 /// Request parameters: |
470 * Request parameters: | 481 /// |
471 * | 482 /// [applicationId] - The application ID from the Google Play developer |
472 * [applicationId] - The application ID from the Google Play developer | 483 /// console. |
473 * console. | 484 /// |
474 * | 485 /// Completes with a [LeaderboardConfiguration]. |
475 * Completes with a [LeaderboardConfiguration]. | 486 /// |
476 * | 487 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
477 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 488 /// an error. |
478 * error. | 489 /// |
479 * | 490 /// If the used [http.Client] completes with an error when making a REST |
480 * If the used [http.Client] completes with an error when making a REST call, | 491 /// call, this method will complete with the same error. |
481 * this method will complete with the same error. | 492 async.Future<LeaderboardConfiguration> insert( |
482 */ | 493 LeaderboardConfiguration request, core.String applicationId) { |
483 async.Future<LeaderboardConfiguration> insert(LeaderboardConfiguration request
, core.String applicationId) { | |
484 var _url = null; | 494 var _url = null; |
485 var _queryParams = new core.Map(); | 495 var _queryParams = new core.Map(); |
486 var _uploadMedia = null; | 496 var _uploadMedia = null; |
487 var _uploadOptions = null; | 497 var _uploadOptions = null; |
488 var _downloadOptions = commons.DownloadOptions.Metadata; | 498 var _downloadOptions = commons.DownloadOptions.Metadata; |
489 var _body = null; | 499 var _body = null; |
490 | 500 |
491 if (request != null) { | 501 if (request != null) { |
492 _body = convert.JSON.encode((request).toJson()); | 502 _body = convert.JSON.encode((request).toJson()); |
493 } | 503 } |
494 if (applicationId == null) { | 504 if (applicationId == null) { |
495 throw new core.ArgumentError("Parameter applicationId is required."); | 505 throw new core.ArgumentError("Parameter applicationId is required."); |
496 } | 506 } |
497 | 507 |
498 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId') + '
/leaderboards'; | 508 _url = 'applications/' + |
| 509 commons.Escaper.ecapeVariable('$applicationId') + |
| 510 '/leaderboards'; |
499 | 511 |
500 var _response = _requester.request(_url, | 512 var _response = _requester.request(_url, "POST", |
501 "POST", | 513 body: _body, |
502 body: _body, | 514 queryParams: _queryParams, |
503 queryParams: _queryParams, | 515 uploadOptions: _uploadOptions, |
504 uploadOptions: _uploadOptions, | 516 uploadMedia: _uploadMedia, |
505 uploadMedia: _uploadMedia, | 517 downloadOptions: _downloadOptions); |
506 downloadOptions: _downloadOptions); | 518 return _response |
507 return _response.then((data) => new LeaderboardConfiguration.fromJson(data))
; | 519 .then((data) => new LeaderboardConfiguration.fromJson(data)); |
508 } | 520 } |
509 | 521 |
510 /** | 522 /// Returns a list of the leaderboard configurations in this application. |
511 * Returns a list of the leaderboard configurations in this application. | 523 /// |
512 * | 524 /// Request parameters: |
513 * Request parameters: | 525 /// |
514 * | 526 /// [applicationId] - The application ID from the Google Play developer |
515 * [applicationId] - The application ID from the Google Play developer | 527 /// console. |
516 * console. | 528 /// |
517 * | 529 /// [maxResults] - The maximum number of resource configurations to return in |
518 * [maxResults] - The maximum number of resource configurations to return in | 530 /// the response, used for paging. For any response, the actual number of |
519 * the response, used for paging. For any response, the actual number of | 531 /// resources returned may be less than the specified maxResults. |
520 * resources returned may be less than the specified maxResults. | 532 /// Value must be between "1" and "200". |
521 * Value must be between "1" and "200". | 533 /// |
522 * | 534 /// [pageToken] - The token returned by the previous request. |
523 * [pageToken] - The token returned by the previous request. | 535 /// |
524 * | 536 /// Completes with a [LeaderboardConfigurationListResponse]. |
525 * Completes with a [LeaderboardConfigurationListResponse]. | 537 /// |
526 * | 538 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
527 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 539 /// an error. |
528 * error. | 540 /// |
529 * | 541 /// If the used [http.Client] completes with an error when making a REST |
530 * If the used [http.Client] completes with an error when making a REST call, | 542 /// call, this method will complete with the same error. |
531 * this method will complete with the same error. | 543 async.Future<LeaderboardConfigurationListResponse> list( |
532 */ | 544 core.String applicationId, |
533 async.Future<LeaderboardConfigurationListResponse> list(core.String applicatio
nId, {core.int maxResults, core.String pageToken}) { | 545 {core.int maxResults, |
| 546 core.String pageToken}) { |
534 var _url = null; | 547 var _url = null; |
535 var _queryParams = new core.Map(); | 548 var _queryParams = new core.Map(); |
536 var _uploadMedia = null; | 549 var _uploadMedia = null; |
537 var _uploadOptions = null; | 550 var _uploadOptions = null; |
538 var _downloadOptions = commons.DownloadOptions.Metadata; | 551 var _downloadOptions = commons.DownloadOptions.Metadata; |
539 var _body = null; | 552 var _body = null; |
540 | 553 |
541 if (applicationId == null) { | 554 if (applicationId == null) { |
542 throw new core.ArgumentError("Parameter applicationId is required."); | 555 throw new core.ArgumentError("Parameter applicationId is required."); |
543 } | 556 } |
544 if (maxResults != null) { | 557 if (maxResults != null) { |
545 _queryParams["maxResults"] = ["${maxResults}"]; | 558 _queryParams["maxResults"] = ["${maxResults}"]; |
546 } | 559 } |
547 if (pageToken != null) { | 560 if (pageToken != null) { |
548 _queryParams["pageToken"] = [pageToken]; | 561 _queryParams["pageToken"] = [pageToken]; |
549 } | 562 } |
550 | 563 |
551 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId') + '
/leaderboards'; | 564 _url = 'applications/' + |
| 565 commons.Escaper.ecapeVariable('$applicationId') + |
| 566 '/leaderboards'; |
552 | 567 |
553 var _response = _requester.request(_url, | 568 var _response = _requester.request(_url, "GET", |
554 "GET", | 569 body: _body, |
555 body: _body, | 570 queryParams: _queryParams, |
556 queryParams: _queryParams, | 571 uploadOptions: _uploadOptions, |
557 uploadOptions: _uploadOptions, | 572 uploadMedia: _uploadMedia, |
558 uploadMedia: _uploadMedia, | 573 downloadOptions: _downloadOptions); |
559 downloadOptions: _downloadOptions); | 574 return _response.then( |
560 return _response.then((data) => new LeaderboardConfigurationListResponse.fro
mJson(data)); | 575 (data) => new LeaderboardConfigurationListResponse.fromJson(data)); |
561 } | 576 } |
562 | 577 |
563 /** | 578 /// Update the metadata of the leaderboard configuration with the given ID. |
564 * Update the metadata of the leaderboard configuration with the given ID. | 579 /// This method supports patch semantics. |
565 * This method supports patch semantics. | 580 /// |
566 * | 581 /// [request] - The metadata request object. |
567 * [request] - The metadata request object. | 582 /// |
568 * | 583 /// Request parameters: |
569 * Request parameters: | 584 /// |
570 * | 585 /// [leaderboardId] - The ID of the leaderboard. |
571 * [leaderboardId] - The ID of the leaderboard. | 586 /// |
572 * | 587 /// Completes with a [LeaderboardConfiguration]. |
573 * Completes with a [LeaderboardConfiguration]. | 588 /// |
574 * | 589 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
575 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 590 /// an error. |
576 * error. | 591 /// |
577 * | 592 /// If the used [http.Client] completes with an error when making a REST |
578 * If the used [http.Client] completes with an error when making a REST call, | 593 /// call, this method will complete with the same error. |
579 * this method will complete with the same error. | 594 async.Future<LeaderboardConfiguration> patch( |
580 */ | 595 LeaderboardConfiguration request, core.String leaderboardId) { |
581 async.Future<LeaderboardConfiguration> patch(LeaderboardConfiguration request,
core.String leaderboardId) { | |
582 var _url = null; | 596 var _url = null; |
583 var _queryParams = new core.Map(); | 597 var _queryParams = new core.Map(); |
584 var _uploadMedia = null; | 598 var _uploadMedia = null; |
585 var _uploadOptions = null; | 599 var _uploadOptions = null; |
586 var _downloadOptions = commons.DownloadOptions.Metadata; | 600 var _downloadOptions = commons.DownloadOptions.Metadata; |
587 var _body = null; | 601 var _body = null; |
588 | 602 |
589 if (request != null) { | 603 if (request != null) { |
590 _body = convert.JSON.encode((request).toJson()); | 604 _body = convert.JSON.encode((request).toJson()); |
591 } | 605 } |
592 if (leaderboardId == null) { | 606 if (leaderboardId == null) { |
593 throw new core.ArgumentError("Parameter leaderboardId is required."); | 607 throw new core.ArgumentError("Parameter leaderboardId is required."); |
594 } | 608 } |
595 | 609 |
596 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId'); | 610 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId'); |
597 | 611 |
598 var _response = _requester.request(_url, | 612 var _response = _requester.request(_url, "PATCH", |
599 "PATCH", | 613 body: _body, |
600 body: _body, | 614 queryParams: _queryParams, |
601 queryParams: _queryParams, | 615 uploadOptions: _uploadOptions, |
602 uploadOptions: _uploadOptions, | 616 uploadMedia: _uploadMedia, |
603 uploadMedia: _uploadMedia, | 617 downloadOptions: _downloadOptions); |
604 downloadOptions: _downloadOptions); | 618 return _response |
605 return _response.then((data) => new LeaderboardConfiguration.fromJson(data))
; | 619 .then((data) => new LeaderboardConfiguration.fromJson(data)); |
606 } | 620 } |
607 | 621 |
608 /** | 622 /// Update the metadata of the leaderboard configuration with the given ID. |
609 * Update the metadata of the leaderboard configuration with the given ID. | 623 /// |
610 * | 624 /// [request] - The metadata request object. |
611 * [request] - The metadata request object. | 625 /// |
612 * | 626 /// Request parameters: |
613 * Request parameters: | 627 /// |
614 * | 628 /// [leaderboardId] - The ID of the leaderboard. |
615 * [leaderboardId] - The ID of the leaderboard. | 629 /// |
616 * | 630 /// Completes with a [LeaderboardConfiguration]. |
617 * Completes with a [LeaderboardConfiguration]. | 631 /// |
618 * | 632 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
619 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 633 /// an error. |
620 * error. | 634 /// |
621 * | 635 /// If the used [http.Client] completes with an error when making a REST |
622 * If the used [http.Client] completes with an error when making a REST call, | 636 /// call, this method will complete with the same error. |
623 * this method will complete with the same error. | 637 async.Future<LeaderboardConfiguration> update( |
624 */ | 638 LeaderboardConfiguration request, core.String leaderboardId) { |
625 async.Future<LeaderboardConfiguration> update(LeaderboardConfiguration request
, core.String leaderboardId) { | |
626 var _url = null; | 639 var _url = null; |
627 var _queryParams = new core.Map(); | 640 var _queryParams = new core.Map(); |
628 var _uploadMedia = null; | 641 var _uploadMedia = null; |
629 var _uploadOptions = null; | 642 var _uploadOptions = null; |
630 var _downloadOptions = commons.DownloadOptions.Metadata; | 643 var _downloadOptions = commons.DownloadOptions.Metadata; |
631 var _body = null; | 644 var _body = null; |
632 | 645 |
633 if (request != null) { | 646 if (request != null) { |
634 _body = convert.JSON.encode((request).toJson()); | 647 _body = convert.JSON.encode((request).toJson()); |
635 } | 648 } |
636 if (leaderboardId == null) { | 649 if (leaderboardId == null) { |
637 throw new core.ArgumentError("Parameter leaderboardId is required."); | 650 throw new core.ArgumentError("Parameter leaderboardId is required."); |
638 } | 651 } |
639 | 652 |
640 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId'); | 653 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId'); |
641 | 654 |
642 var _response = _requester.request(_url, | 655 var _response = _requester.request(_url, "PUT", |
643 "PUT", | 656 body: _body, |
644 body: _body, | 657 queryParams: _queryParams, |
645 queryParams: _queryParams, | 658 uploadOptions: _uploadOptions, |
646 uploadOptions: _uploadOptions, | 659 uploadMedia: _uploadMedia, |
647 uploadMedia: _uploadMedia, | 660 downloadOptions: _downloadOptions); |
648 downloadOptions: _downloadOptions); | 661 return _response |
649 return _response.then((data) => new LeaderboardConfiguration.fromJson(data))
; | 662 .then((data) => new LeaderboardConfiguration.fromJson(data)); |
650 } | 663 } |
651 | |
652 } | 664 } |
653 | 665 |
| 666 /// This is a JSON template for an achievement configuration resource. |
| 667 class AchievementConfiguration { |
| 668 /// The type of the achievement. |
| 669 /// Possible values are: |
| 670 /// - "STANDARD" - Achievement is either locked or unlocked. |
| 671 /// - "INCREMENTAL" - Achievement is incremental. |
| 672 core.String achievementType; |
654 | 673 |
| 674 /// The draft data of the achievement. |
| 675 AchievementConfigurationDetail draft; |
655 | 676 |
656 /** This is a JSON template for an achievement configuration resource. */ | 677 /// The ID of the achievement. |
657 class AchievementConfiguration { | |
658 /** | |
659 * The type of the achievement. | |
660 * Possible values are: | |
661 * - "STANDARD" - Achievement is either locked or unlocked. | |
662 * - "INCREMENTAL" - Achievement is incremental. | |
663 */ | |
664 core.String achievementType; | |
665 /** The draft data of the achievement. */ | |
666 AchievementConfigurationDetail draft; | |
667 /** The ID of the achievement. */ | |
668 core.String id; | 678 core.String id; |
669 /** | 679 |
670 * The initial state of the achievement. | 680 /// The initial state of the achievement. |
671 * Possible values are: | 681 /// Possible values are: |
672 * - "HIDDEN" - Achievement is hidden. | 682 /// - "HIDDEN" - Achievement is hidden. |
673 * - "REVEALED" - Achievement is revealed. | 683 /// - "REVEALED" - Achievement is revealed. |
674 * - "UNLOCKED" - Achievement is unlocked. | 684 /// - "UNLOCKED" - Achievement is unlocked. |
675 */ | |
676 core.String initialState; | 685 core.String initialState; |
677 /** | 686 |
678 * Uniquely identifies the type of this resource. Value is always the fixed | 687 /// Uniquely identifies the type of this resource. Value is always the fixed |
679 * string gamesConfiguration#achievementConfiguration. | 688 /// string gamesConfiguration#achievementConfiguration. |
680 */ | |
681 core.String kind; | 689 core.String kind; |
682 /** The read-only published data of the achievement. */ | 690 |
| 691 /// The read-only published data of the achievement. |
683 AchievementConfigurationDetail published; | 692 AchievementConfigurationDetail published; |
684 /** Steps to unlock. Only applicable to incremental achievements. */ | 693 |
| 694 /// Steps to unlock. Only applicable to incremental achievements. |
685 core.int stepsToUnlock; | 695 core.int stepsToUnlock; |
686 /** The token for this resource. */ | 696 |
| 697 /// The token for this resource. |
687 core.String token; | 698 core.String token; |
688 | 699 |
689 AchievementConfiguration(); | 700 AchievementConfiguration(); |
690 | 701 |
691 AchievementConfiguration.fromJson(core.Map _json) { | 702 AchievementConfiguration.fromJson(core.Map _json) { |
692 if (_json.containsKey("achievementType")) { | 703 if (_json.containsKey("achievementType")) { |
693 achievementType = _json["achievementType"]; | 704 achievementType = _json["achievementType"]; |
694 } | 705 } |
695 if (_json.containsKey("draft")) { | 706 if (_json.containsKey("draft")) { |
696 draft = new AchievementConfigurationDetail.fromJson(_json["draft"]); | 707 draft = new AchievementConfigurationDetail.fromJson(_json["draft"]); |
697 } | 708 } |
698 if (_json.containsKey("id")) { | 709 if (_json.containsKey("id")) { |
699 id = _json["id"]; | 710 id = _json["id"]; |
700 } | 711 } |
701 if (_json.containsKey("initialState")) { | 712 if (_json.containsKey("initialState")) { |
702 initialState = _json["initialState"]; | 713 initialState = _json["initialState"]; |
703 } | 714 } |
704 if (_json.containsKey("kind")) { | 715 if (_json.containsKey("kind")) { |
705 kind = _json["kind"]; | 716 kind = _json["kind"]; |
706 } | 717 } |
707 if (_json.containsKey("published")) { | 718 if (_json.containsKey("published")) { |
708 published = new AchievementConfigurationDetail.fromJson(_json["published"]
); | 719 published = |
| 720 new AchievementConfigurationDetail.fromJson(_json["published"]); |
709 } | 721 } |
710 if (_json.containsKey("stepsToUnlock")) { | 722 if (_json.containsKey("stepsToUnlock")) { |
711 stepsToUnlock = _json["stepsToUnlock"]; | 723 stepsToUnlock = _json["stepsToUnlock"]; |
712 } | 724 } |
713 if (_json.containsKey("token")) { | 725 if (_json.containsKey("token")) { |
714 token = _json["token"]; | 726 token = _json["token"]; |
715 } | 727 } |
716 } | 728 } |
717 | 729 |
718 core.Map<core.String, core.Object> toJson() { | 730 core.Map<core.String, core.Object> toJson() { |
719 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 731 final core.Map<core.String, core.Object> _json = |
| 732 new core.Map<core.String, core.Object>(); |
720 if (achievementType != null) { | 733 if (achievementType != null) { |
721 _json["achievementType"] = achievementType; | 734 _json["achievementType"] = achievementType; |
722 } | 735 } |
723 if (draft != null) { | 736 if (draft != null) { |
724 _json["draft"] = (draft).toJson(); | 737 _json["draft"] = (draft).toJson(); |
725 } | 738 } |
726 if (id != null) { | 739 if (id != null) { |
727 _json["id"] = id; | 740 _json["id"] = id; |
728 } | 741 } |
729 if (initialState != null) { | 742 if (initialState != null) { |
730 _json["initialState"] = initialState; | 743 _json["initialState"] = initialState; |
731 } | 744 } |
732 if (kind != null) { | 745 if (kind != null) { |
733 _json["kind"] = kind; | 746 _json["kind"] = kind; |
734 } | 747 } |
735 if (published != null) { | 748 if (published != null) { |
736 _json["published"] = (published).toJson(); | 749 _json["published"] = (published).toJson(); |
737 } | 750 } |
738 if (stepsToUnlock != null) { | 751 if (stepsToUnlock != null) { |
739 _json["stepsToUnlock"] = stepsToUnlock; | 752 _json["stepsToUnlock"] = stepsToUnlock; |
740 } | 753 } |
741 if (token != null) { | 754 if (token != null) { |
742 _json["token"] = token; | 755 _json["token"] = token; |
743 } | 756 } |
744 return _json; | 757 return _json; |
745 } | 758 } |
746 } | 759 } |
747 | 760 |
748 /** This is a JSON template for an achievement configuration detail. */ | 761 /// This is a JSON template for an achievement configuration detail. |
749 class AchievementConfigurationDetail { | 762 class AchievementConfigurationDetail { |
750 /** Localized strings for the achievement description. */ | 763 /// Localized strings for the achievement description. |
751 LocalizedStringBundle description; | 764 LocalizedStringBundle description; |
752 /** The icon url of this achievement. Writes to this field are ignored. */ | 765 |
| 766 /// The icon url of this achievement. Writes to this field are ignored. |
753 core.String iconUrl; | 767 core.String iconUrl; |
754 /** | 768 |
755 * Uniquely identifies the type of this resource. Value is always the fixed | 769 /// Uniquely identifies the type of this resource. Value is always the fixed |
756 * string gamesConfiguration#achievementConfigurationDetail. | 770 /// string gamesConfiguration#achievementConfigurationDetail. |
757 */ | |
758 core.String kind; | 771 core.String kind; |
759 /** Localized strings for the achievement name. */ | 772 |
| 773 /// Localized strings for the achievement name. |
760 LocalizedStringBundle name; | 774 LocalizedStringBundle name; |
761 /** Point value for the achievement. */ | 775 |
| 776 /// Point value for the achievement. |
762 core.int pointValue; | 777 core.int pointValue; |
763 /** The sort rank of this achievement. Writes to this field are ignored. */ | 778 |
| 779 /// The sort rank of this achievement. Writes to this field are ignored. |
764 core.int sortRank; | 780 core.int sortRank; |
765 | 781 |
766 AchievementConfigurationDetail(); | 782 AchievementConfigurationDetail(); |
767 | 783 |
768 AchievementConfigurationDetail.fromJson(core.Map _json) { | 784 AchievementConfigurationDetail.fromJson(core.Map _json) { |
769 if (_json.containsKey("description")) { | 785 if (_json.containsKey("description")) { |
770 description = new LocalizedStringBundle.fromJson(_json["description"]); | 786 description = new LocalizedStringBundle.fromJson(_json["description"]); |
771 } | 787 } |
772 if (_json.containsKey("iconUrl")) { | 788 if (_json.containsKey("iconUrl")) { |
773 iconUrl = _json["iconUrl"]; | 789 iconUrl = _json["iconUrl"]; |
774 } | 790 } |
775 if (_json.containsKey("kind")) { | 791 if (_json.containsKey("kind")) { |
776 kind = _json["kind"]; | 792 kind = _json["kind"]; |
777 } | 793 } |
778 if (_json.containsKey("name")) { | 794 if (_json.containsKey("name")) { |
779 name = new LocalizedStringBundle.fromJson(_json["name"]); | 795 name = new LocalizedStringBundle.fromJson(_json["name"]); |
780 } | 796 } |
781 if (_json.containsKey("pointValue")) { | 797 if (_json.containsKey("pointValue")) { |
782 pointValue = _json["pointValue"]; | 798 pointValue = _json["pointValue"]; |
783 } | 799 } |
784 if (_json.containsKey("sortRank")) { | 800 if (_json.containsKey("sortRank")) { |
785 sortRank = _json["sortRank"]; | 801 sortRank = _json["sortRank"]; |
786 } | 802 } |
787 } | 803 } |
788 | 804 |
789 core.Map<core.String, core.Object> toJson() { | 805 core.Map<core.String, core.Object> toJson() { |
790 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 806 final core.Map<core.String, core.Object> _json = |
| 807 new core.Map<core.String, core.Object>(); |
791 if (description != null) { | 808 if (description != null) { |
792 _json["description"] = (description).toJson(); | 809 _json["description"] = (description).toJson(); |
793 } | 810 } |
794 if (iconUrl != null) { | 811 if (iconUrl != null) { |
795 _json["iconUrl"] = iconUrl; | 812 _json["iconUrl"] = iconUrl; |
796 } | 813 } |
797 if (kind != null) { | 814 if (kind != null) { |
798 _json["kind"] = kind; | 815 _json["kind"] = kind; |
799 } | 816 } |
800 if (name != null) { | 817 if (name != null) { |
801 _json["name"] = (name).toJson(); | 818 _json["name"] = (name).toJson(); |
802 } | 819 } |
803 if (pointValue != null) { | 820 if (pointValue != null) { |
804 _json["pointValue"] = pointValue; | 821 _json["pointValue"] = pointValue; |
805 } | 822 } |
806 if (sortRank != null) { | 823 if (sortRank != null) { |
807 _json["sortRank"] = sortRank; | 824 _json["sortRank"] = sortRank; |
808 } | 825 } |
809 return _json; | 826 return _json; |
810 } | 827 } |
811 } | 828 } |
812 | 829 |
813 /** This is a JSON template for a ListConfigurations response. */ | 830 /// This is a JSON template for a ListConfigurations response. |
814 class AchievementConfigurationListResponse { | 831 class AchievementConfigurationListResponse { |
815 /** The achievement configurations. */ | 832 /// The achievement configurations. |
816 core.List<AchievementConfiguration> items; | 833 core.List<AchievementConfiguration> items; |
817 /** | 834 |
818 * Uniquely identifies the type of this resource. Value is always the fixed | 835 /// Uniquely identifies the type of this resource. Value is always the fixed |
819 * string games#achievementConfigurationListResponse. | 836 /// string games#achievementConfigurationListResponse. |
820 */ | |
821 core.String kind; | 837 core.String kind; |
822 /** The pagination token for the next page of results. */ | 838 |
| 839 /// The pagination token for the next page of results. |
823 core.String nextPageToken; | 840 core.String nextPageToken; |
824 | 841 |
825 AchievementConfigurationListResponse(); | 842 AchievementConfigurationListResponse(); |
826 | 843 |
827 AchievementConfigurationListResponse.fromJson(core.Map _json) { | 844 AchievementConfigurationListResponse.fromJson(core.Map _json) { |
828 if (_json.containsKey("items")) { | 845 if (_json.containsKey("items")) { |
829 items = _json["items"].map((value) => new AchievementConfiguration.fromJso
n(value)).toList(); | 846 items = _json["items"] |
| 847 .map((value) => new AchievementConfiguration.fromJson(value)) |
| 848 .toList(); |
830 } | 849 } |
831 if (_json.containsKey("kind")) { | 850 if (_json.containsKey("kind")) { |
832 kind = _json["kind"]; | 851 kind = _json["kind"]; |
833 } | 852 } |
834 if (_json.containsKey("nextPageToken")) { | 853 if (_json.containsKey("nextPageToken")) { |
835 nextPageToken = _json["nextPageToken"]; | 854 nextPageToken = _json["nextPageToken"]; |
836 } | 855 } |
837 } | 856 } |
838 | 857 |
839 core.Map<core.String, core.Object> toJson() { | 858 core.Map<core.String, core.Object> toJson() { |
840 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 859 final core.Map<core.String, core.Object> _json = |
| 860 new core.Map<core.String, core.Object>(); |
841 if (items != null) { | 861 if (items != null) { |
842 _json["items"] = items.map((value) => (value).toJson()).toList(); | 862 _json["items"] = items.map((value) => (value).toJson()).toList(); |
843 } | 863 } |
844 if (kind != null) { | 864 if (kind != null) { |
845 _json["kind"] = kind; | 865 _json["kind"] = kind; |
846 } | 866 } |
847 if (nextPageToken != null) { | 867 if (nextPageToken != null) { |
848 _json["nextPageToken"] = nextPageToken; | 868 _json["nextPageToken"] = nextPageToken; |
849 } | 869 } |
850 return _json; | 870 return _json; |
851 } | 871 } |
852 } | 872 } |
853 | 873 |
854 /** This is a JSON template for a number affix resource. */ | 874 /// This is a JSON template for a number affix resource. |
855 class GamesNumberAffixConfiguration { | 875 class GamesNumberAffixConfiguration { |
856 /** | 876 /// When the language requires special treatment of "small" numbers (as with |
857 * When the language requires special treatment of "small" numbers (as with 2, | 877 /// 2, 3, and 4 in Czech; or numbers ending 2, 3, or 4 but not 12, 13, or 14 |
858 * 3, and 4 in Czech; or numbers ending 2, 3, or 4 but not 12, 13, or 14 in | 878 /// in Polish). |
859 * Polish). | |
860 */ | |
861 LocalizedStringBundle few; | 879 LocalizedStringBundle few; |
862 /** | 880 |
863 * When the language requires special treatment of "large" numbers (as with | 881 /// When the language requires special treatment of "large" numbers (as with |
864 * numbers ending 11-99 in Maltese). | 882 /// numbers ending 11-99 in Maltese). |
865 */ | |
866 LocalizedStringBundle many; | 883 LocalizedStringBundle many; |
867 /** | 884 |
868 * When the language requires special treatment of numbers like one (as with | 885 /// When the language requires special treatment of numbers like one (as with |
869 * the number 1 in English and most other languages; in Russian, any number | 886 /// the number 1 in English and most other languages; in Russian, any number |
870 * ending in 1 but not ending in 11 is in this class). | 887 /// ending in 1 but not ending in 11 is in this class). |
871 */ | |
872 LocalizedStringBundle one; | 888 LocalizedStringBundle one; |
873 /** | 889 |
874 * When the language does not require special treatment of the given quantity | 890 /// When the language does not require special treatment of the given |
875 * (as with all numbers in Chinese, or 42 in English). | 891 /// quantity (as with all numbers in Chinese, or 42 in English). |
876 */ | |
877 LocalizedStringBundle other; | 892 LocalizedStringBundle other; |
878 /** | 893 |
879 * When the language requires special treatment of numbers like two (as with 2 | 894 /// When the language requires special treatment of numbers like two (as with |
880 * in Welsh, or 102 in Slovenian). | 895 /// 2 in Welsh, or 102 in Slovenian). |
881 */ | |
882 LocalizedStringBundle two; | 896 LocalizedStringBundle two; |
883 /** | 897 |
884 * When the language requires special treatment of the number 0 (as in | 898 /// When the language requires special treatment of the number 0 (as in |
885 * Arabic). | 899 /// Arabic). |
886 */ | |
887 LocalizedStringBundle zero; | 900 LocalizedStringBundle zero; |
888 | 901 |
889 GamesNumberAffixConfiguration(); | 902 GamesNumberAffixConfiguration(); |
890 | 903 |
891 GamesNumberAffixConfiguration.fromJson(core.Map _json) { | 904 GamesNumberAffixConfiguration.fromJson(core.Map _json) { |
892 if (_json.containsKey("few")) { | 905 if (_json.containsKey("few")) { |
893 few = new LocalizedStringBundle.fromJson(_json["few"]); | 906 few = new LocalizedStringBundle.fromJson(_json["few"]); |
894 } | 907 } |
895 if (_json.containsKey("many")) { | 908 if (_json.containsKey("many")) { |
896 many = new LocalizedStringBundle.fromJson(_json["many"]); | 909 many = new LocalizedStringBundle.fromJson(_json["many"]); |
897 } | 910 } |
898 if (_json.containsKey("one")) { | 911 if (_json.containsKey("one")) { |
899 one = new LocalizedStringBundle.fromJson(_json["one"]); | 912 one = new LocalizedStringBundle.fromJson(_json["one"]); |
900 } | 913 } |
901 if (_json.containsKey("other")) { | 914 if (_json.containsKey("other")) { |
902 other = new LocalizedStringBundle.fromJson(_json["other"]); | 915 other = new LocalizedStringBundle.fromJson(_json["other"]); |
903 } | 916 } |
904 if (_json.containsKey("two")) { | 917 if (_json.containsKey("two")) { |
905 two = new LocalizedStringBundle.fromJson(_json["two"]); | 918 two = new LocalizedStringBundle.fromJson(_json["two"]); |
906 } | 919 } |
907 if (_json.containsKey("zero")) { | 920 if (_json.containsKey("zero")) { |
908 zero = new LocalizedStringBundle.fromJson(_json["zero"]); | 921 zero = new LocalizedStringBundle.fromJson(_json["zero"]); |
909 } | 922 } |
910 } | 923 } |
911 | 924 |
912 core.Map<core.String, core.Object> toJson() { | 925 core.Map<core.String, core.Object> toJson() { |
913 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 926 final core.Map<core.String, core.Object> _json = |
| 927 new core.Map<core.String, core.Object>(); |
914 if (few != null) { | 928 if (few != null) { |
915 _json["few"] = (few).toJson(); | 929 _json["few"] = (few).toJson(); |
916 } | 930 } |
917 if (many != null) { | 931 if (many != null) { |
918 _json["many"] = (many).toJson(); | 932 _json["many"] = (many).toJson(); |
919 } | 933 } |
920 if (one != null) { | 934 if (one != null) { |
921 _json["one"] = (one).toJson(); | 935 _json["one"] = (one).toJson(); |
922 } | 936 } |
923 if (other != null) { | 937 if (other != null) { |
924 _json["other"] = (other).toJson(); | 938 _json["other"] = (other).toJson(); |
925 } | 939 } |
926 if (two != null) { | 940 if (two != null) { |
927 _json["two"] = (two).toJson(); | 941 _json["two"] = (two).toJson(); |
928 } | 942 } |
929 if (zero != null) { | 943 if (zero != null) { |
930 _json["zero"] = (zero).toJson(); | 944 _json["zero"] = (zero).toJson(); |
931 } | 945 } |
932 return _json; | 946 return _json; |
933 } | 947 } |
934 } | 948 } |
935 | 949 |
936 /** This is a JSON template for a number format resource. */ | 950 /// This is a JSON template for a number format resource. |
937 class GamesNumberFormatConfiguration { | 951 class GamesNumberFormatConfiguration { |
938 /** The curreny code string. Only used for CURRENCY format type. */ | 952 /// The curreny code string. Only used for CURRENCY format type. |
939 core.String currencyCode; | 953 core.String currencyCode; |
940 /** | 954 |
941 * The number of decimal places for number. Only used for NUMERIC format type. | 955 /// The number of decimal places for number. Only used for NUMERIC format |
942 */ | 956 /// type. |
943 core.int numDecimalPlaces; | 957 core.int numDecimalPlaces; |
944 /** | 958 |
945 * The formatting for the number. | 959 /// The formatting for the number. |
946 * Possible values are: | 960 /// Possible values are: |
947 * - "NUMERIC" - Numbers are formatted to have no digits or a fixed number of | 961 /// - "NUMERIC" - Numbers are formatted to have no digits or a fixed number |
948 * digits after the decimal point according to locale. An optional custom unit | 962 /// of digits after the decimal point according to locale. An optional custom |
949 * can be added. | 963 /// unit can be added. |
950 * - "TIME_DURATION" - Numbers are formatted to hours, minutes and seconds. | 964 /// - "TIME_DURATION" - Numbers are formatted to hours, minutes and seconds. |
951 * - "CURRENCY" - Numbers are formatted to currency according to locale. | 965 /// - "CURRENCY" - Numbers are formatted to currency according to locale. |
952 */ | |
953 core.String numberFormatType; | 966 core.String numberFormatType; |
954 /** | 967 |
955 * An optional suffix for the NUMERIC format type. These strings follow the | 968 /// An optional suffix for the NUMERIC format type. These strings follow the |
956 * same plural rules as all Android string resources. | 969 /// same plural rules as all Android string resources. |
957 */ | |
958 GamesNumberAffixConfiguration suffix; | 970 GamesNumberAffixConfiguration suffix; |
959 | 971 |
960 GamesNumberFormatConfiguration(); | 972 GamesNumberFormatConfiguration(); |
961 | 973 |
962 GamesNumberFormatConfiguration.fromJson(core.Map _json) { | 974 GamesNumberFormatConfiguration.fromJson(core.Map _json) { |
963 if (_json.containsKey("currencyCode")) { | 975 if (_json.containsKey("currencyCode")) { |
964 currencyCode = _json["currencyCode"]; | 976 currencyCode = _json["currencyCode"]; |
965 } | 977 } |
966 if (_json.containsKey("numDecimalPlaces")) { | 978 if (_json.containsKey("numDecimalPlaces")) { |
967 numDecimalPlaces = _json["numDecimalPlaces"]; | 979 numDecimalPlaces = _json["numDecimalPlaces"]; |
968 } | 980 } |
969 if (_json.containsKey("numberFormatType")) { | 981 if (_json.containsKey("numberFormatType")) { |
970 numberFormatType = _json["numberFormatType"]; | 982 numberFormatType = _json["numberFormatType"]; |
971 } | 983 } |
972 if (_json.containsKey("suffix")) { | 984 if (_json.containsKey("suffix")) { |
973 suffix = new GamesNumberAffixConfiguration.fromJson(_json["suffix"]); | 985 suffix = new GamesNumberAffixConfiguration.fromJson(_json["suffix"]); |
974 } | 986 } |
975 } | 987 } |
976 | 988 |
977 core.Map<core.String, core.Object> toJson() { | 989 core.Map<core.String, core.Object> toJson() { |
978 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 990 final core.Map<core.String, core.Object> _json = |
| 991 new core.Map<core.String, core.Object>(); |
979 if (currencyCode != null) { | 992 if (currencyCode != null) { |
980 _json["currencyCode"] = currencyCode; | 993 _json["currencyCode"] = currencyCode; |
981 } | 994 } |
982 if (numDecimalPlaces != null) { | 995 if (numDecimalPlaces != null) { |
983 _json["numDecimalPlaces"] = numDecimalPlaces; | 996 _json["numDecimalPlaces"] = numDecimalPlaces; |
984 } | 997 } |
985 if (numberFormatType != null) { | 998 if (numberFormatType != null) { |
986 _json["numberFormatType"] = numberFormatType; | 999 _json["numberFormatType"] = numberFormatType; |
987 } | 1000 } |
988 if (suffix != null) { | 1001 if (suffix != null) { |
989 _json["suffix"] = (suffix).toJson(); | 1002 _json["suffix"] = (suffix).toJson(); |
990 } | 1003 } |
991 return _json; | 1004 return _json; |
992 } | 1005 } |
993 } | 1006 } |
994 | 1007 |
995 /** This is a JSON template for an image configuration resource. */ | 1008 /// This is a JSON template for an image configuration resource. |
996 class ImageConfiguration { | 1009 class ImageConfiguration { |
997 /** The image type for the image. */ | 1010 /// The image type for the image. |
998 core.String imageType; | 1011 core.String imageType; |
999 /** | 1012 |
1000 * Uniquely identifies the type of this resource. Value is always the fixed | 1013 /// Uniquely identifies the type of this resource. Value is always the fixed |
1001 * string gamesConfiguration#imageConfiguration. | 1014 /// string gamesConfiguration#imageConfiguration. |
1002 */ | |
1003 core.String kind; | 1015 core.String kind; |
1004 /** The resource ID of resource which the image belongs to. */ | 1016 |
| 1017 /// The resource ID of resource which the image belongs to. |
1005 core.String resourceId; | 1018 core.String resourceId; |
1006 /** The url for this image. */ | 1019 |
| 1020 /// The url for this image. |
1007 core.String url; | 1021 core.String url; |
1008 | 1022 |
1009 ImageConfiguration(); | 1023 ImageConfiguration(); |
1010 | 1024 |
1011 ImageConfiguration.fromJson(core.Map _json) { | 1025 ImageConfiguration.fromJson(core.Map _json) { |
1012 if (_json.containsKey("imageType")) { | 1026 if (_json.containsKey("imageType")) { |
1013 imageType = _json["imageType"]; | 1027 imageType = _json["imageType"]; |
1014 } | 1028 } |
1015 if (_json.containsKey("kind")) { | 1029 if (_json.containsKey("kind")) { |
1016 kind = _json["kind"]; | 1030 kind = _json["kind"]; |
1017 } | 1031 } |
1018 if (_json.containsKey("resourceId")) { | 1032 if (_json.containsKey("resourceId")) { |
1019 resourceId = _json["resourceId"]; | 1033 resourceId = _json["resourceId"]; |
1020 } | 1034 } |
1021 if (_json.containsKey("url")) { | 1035 if (_json.containsKey("url")) { |
1022 url = _json["url"]; | 1036 url = _json["url"]; |
1023 } | 1037 } |
1024 } | 1038 } |
1025 | 1039 |
1026 core.Map<core.String, core.Object> toJson() { | 1040 core.Map<core.String, core.Object> toJson() { |
1027 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1041 final core.Map<core.String, core.Object> _json = |
| 1042 new core.Map<core.String, core.Object>(); |
1028 if (imageType != null) { | 1043 if (imageType != null) { |
1029 _json["imageType"] = imageType; | 1044 _json["imageType"] = imageType; |
1030 } | 1045 } |
1031 if (kind != null) { | 1046 if (kind != null) { |
1032 _json["kind"] = kind; | 1047 _json["kind"] = kind; |
1033 } | 1048 } |
1034 if (resourceId != null) { | 1049 if (resourceId != null) { |
1035 _json["resourceId"] = resourceId; | 1050 _json["resourceId"] = resourceId; |
1036 } | 1051 } |
1037 if (url != null) { | 1052 if (url != null) { |
1038 _json["url"] = url; | 1053 _json["url"] = url; |
1039 } | 1054 } |
1040 return _json; | 1055 return _json; |
1041 } | 1056 } |
1042 } | 1057 } |
1043 | 1058 |
1044 /** This is a JSON template for an leaderboard configuration resource. */ | 1059 /// This is a JSON template for an leaderboard configuration resource. |
1045 class LeaderboardConfiguration { | 1060 class LeaderboardConfiguration { |
1046 /** The draft data of the leaderboard. */ | 1061 /// The draft data of the leaderboard. |
1047 LeaderboardConfigurationDetail draft; | 1062 LeaderboardConfigurationDetail draft; |
1048 /** The ID of the leaderboard. */ | 1063 |
| 1064 /// The ID of the leaderboard. |
1049 core.String id; | 1065 core.String id; |
1050 /** | 1066 |
1051 * Uniquely identifies the type of this resource. Value is always the fixed | 1067 /// Uniquely identifies the type of this resource. Value is always the fixed |
1052 * string gamesConfiguration#leaderboardConfiguration. | 1068 /// string gamesConfiguration#leaderboardConfiguration. |
1053 */ | |
1054 core.String kind; | 1069 core.String kind; |
1055 /** The read-only published data of the leaderboard. */ | 1070 |
| 1071 /// The read-only published data of the leaderboard. |
1056 LeaderboardConfigurationDetail published; | 1072 LeaderboardConfigurationDetail published; |
1057 /** Maximum score that can be posted to this leaderboard. */ | 1073 |
| 1074 /// Maximum score that can be posted to this leaderboard. |
1058 core.String scoreMax; | 1075 core.String scoreMax; |
1059 /** Minimum score that can be posted to this leaderboard. */ | 1076 |
| 1077 /// Minimum score that can be posted to this leaderboard. |
1060 core.String scoreMin; | 1078 core.String scoreMin; |
1061 /** | 1079 |
1062 * The type of the leaderboard. | 1080 /// The type of the leaderboard. |
1063 * Possible values are: | 1081 /// Possible values are: |
1064 * - "LARGER_IS_BETTER" - Larger scores posted are ranked higher. | 1082 /// - "LARGER_IS_BETTER" - Larger scores posted are ranked higher. |
1065 * - "SMALLER_IS_BETTER" - Smaller scores posted are ranked higher. | 1083 /// - "SMALLER_IS_BETTER" - Smaller scores posted are ranked higher. |
1066 */ | |
1067 core.String scoreOrder; | 1084 core.String scoreOrder; |
1068 /** The token for this resource. */ | 1085 |
| 1086 /// The token for this resource. |
1069 core.String token; | 1087 core.String token; |
1070 | 1088 |
1071 LeaderboardConfiguration(); | 1089 LeaderboardConfiguration(); |
1072 | 1090 |
1073 LeaderboardConfiguration.fromJson(core.Map _json) { | 1091 LeaderboardConfiguration.fromJson(core.Map _json) { |
1074 if (_json.containsKey("draft")) { | 1092 if (_json.containsKey("draft")) { |
1075 draft = new LeaderboardConfigurationDetail.fromJson(_json["draft"]); | 1093 draft = new LeaderboardConfigurationDetail.fromJson(_json["draft"]); |
1076 } | 1094 } |
1077 if (_json.containsKey("id")) { | 1095 if (_json.containsKey("id")) { |
1078 id = _json["id"]; | 1096 id = _json["id"]; |
1079 } | 1097 } |
1080 if (_json.containsKey("kind")) { | 1098 if (_json.containsKey("kind")) { |
1081 kind = _json["kind"]; | 1099 kind = _json["kind"]; |
1082 } | 1100 } |
1083 if (_json.containsKey("published")) { | 1101 if (_json.containsKey("published")) { |
1084 published = new LeaderboardConfigurationDetail.fromJson(_json["published"]
); | 1102 published = |
| 1103 new LeaderboardConfigurationDetail.fromJson(_json["published"]); |
1085 } | 1104 } |
1086 if (_json.containsKey("scoreMax")) { | 1105 if (_json.containsKey("scoreMax")) { |
1087 scoreMax = _json["scoreMax"]; | 1106 scoreMax = _json["scoreMax"]; |
1088 } | 1107 } |
1089 if (_json.containsKey("scoreMin")) { | 1108 if (_json.containsKey("scoreMin")) { |
1090 scoreMin = _json["scoreMin"]; | 1109 scoreMin = _json["scoreMin"]; |
1091 } | 1110 } |
1092 if (_json.containsKey("scoreOrder")) { | 1111 if (_json.containsKey("scoreOrder")) { |
1093 scoreOrder = _json["scoreOrder"]; | 1112 scoreOrder = _json["scoreOrder"]; |
1094 } | 1113 } |
1095 if (_json.containsKey("token")) { | 1114 if (_json.containsKey("token")) { |
1096 token = _json["token"]; | 1115 token = _json["token"]; |
1097 } | 1116 } |
1098 } | 1117 } |
1099 | 1118 |
1100 core.Map<core.String, core.Object> toJson() { | 1119 core.Map<core.String, core.Object> toJson() { |
1101 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1120 final core.Map<core.String, core.Object> _json = |
| 1121 new core.Map<core.String, core.Object>(); |
1102 if (draft != null) { | 1122 if (draft != null) { |
1103 _json["draft"] = (draft).toJson(); | 1123 _json["draft"] = (draft).toJson(); |
1104 } | 1124 } |
1105 if (id != null) { | 1125 if (id != null) { |
1106 _json["id"] = id; | 1126 _json["id"] = id; |
1107 } | 1127 } |
1108 if (kind != null) { | 1128 if (kind != null) { |
1109 _json["kind"] = kind; | 1129 _json["kind"] = kind; |
1110 } | 1130 } |
1111 if (published != null) { | 1131 if (published != null) { |
1112 _json["published"] = (published).toJson(); | 1132 _json["published"] = (published).toJson(); |
1113 } | 1133 } |
1114 if (scoreMax != null) { | 1134 if (scoreMax != null) { |
1115 _json["scoreMax"] = scoreMax; | 1135 _json["scoreMax"] = scoreMax; |
1116 } | 1136 } |
1117 if (scoreMin != null) { | 1137 if (scoreMin != null) { |
1118 _json["scoreMin"] = scoreMin; | 1138 _json["scoreMin"] = scoreMin; |
1119 } | 1139 } |
1120 if (scoreOrder != null) { | 1140 if (scoreOrder != null) { |
1121 _json["scoreOrder"] = scoreOrder; | 1141 _json["scoreOrder"] = scoreOrder; |
1122 } | 1142 } |
1123 if (token != null) { | 1143 if (token != null) { |
1124 _json["token"] = token; | 1144 _json["token"] = token; |
1125 } | 1145 } |
1126 return _json; | 1146 return _json; |
1127 } | 1147 } |
1128 } | 1148 } |
1129 | 1149 |
1130 /** This is a JSON template for a leaderboard configuration detail. */ | 1150 /// This is a JSON template for a leaderboard configuration detail. |
1131 class LeaderboardConfigurationDetail { | 1151 class LeaderboardConfigurationDetail { |
1132 /** The icon url of this leaderboard. Writes to this field are ignored. */ | 1152 /// The icon url of this leaderboard. Writes to this field are ignored. |
1133 core.String iconUrl; | 1153 core.String iconUrl; |
1134 /** | 1154 |
1135 * Uniquely identifies the type of this resource. Value is always the fixed | 1155 /// Uniquely identifies the type of this resource. Value is always the fixed |
1136 * string gamesConfiguration#leaderboardConfigurationDetail. | 1156 /// string gamesConfiguration#leaderboardConfigurationDetail. |
1137 */ | |
1138 core.String kind; | 1157 core.String kind; |
1139 /** Localized strings for the leaderboard name. */ | 1158 |
| 1159 /// Localized strings for the leaderboard name. |
1140 LocalizedStringBundle name; | 1160 LocalizedStringBundle name; |
1141 /** The score formatting for the leaderboard. */ | 1161 |
| 1162 /// The score formatting for the leaderboard. |
1142 GamesNumberFormatConfiguration scoreFormat; | 1163 GamesNumberFormatConfiguration scoreFormat; |
1143 /** The sort rank of this leaderboard. Writes to this field are ignored. */ | 1164 |
| 1165 /// The sort rank of this leaderboard. Writes to this field are ignored. |
1144 core.int sortRank; | 1166 core.int sortRank; |
1145 | 1167 |
1146 LeaderboardConfigurationDetail(); | 1168 LeaderboardConfigurationDetail(); |
1147 | 1169 |
1148 LeaderboardConfigurationDetail.fromJson(core.Map _json) { | 1170 LeaderboardConfigurationDetail.fromJson(core.Map _json) { |
1149 if (_json.containsKey("iconUrl")) { | 1171 if (_json.containsKey("iconUrl")) { |
1150 iconUrl = _json["iconUrl"]; | 1172 iconUrl = _json["iconUrl"]; |
1151 } | 1173 } |
1152 if (_json.containsKey("kind")) { | 1174 if (_json.containsKey("kind")) { |
1153 kind = _json["kind"]; | 1175 kind = _json["kind"]; |
1154 } | 1176 } |
1155 if (_json.containsKey("name")) { | 1177 if (_json.containsKey("name")) { |
1156 name = new LocalizedStringBundle.fromJson(_json["name"]); | 1178 name = new LocalizedStringBundle.fromJson(_json["name"]); |
1157 } | 1179 } |
1158 if (_json.containsKey("scoreFormat")) { | 1180 if (_json.containsKey("scoreFormat")) { |
1159 scoreFormat = new GamesNumberFormatConfiguration.fromJson(_json["scoreForm
at"]); | 1181 scoreFormat = |
| 1182 new GamesNumberFormatConfiguration.fromJson(_json["scoreFormat"]); |
1160 } | 1183 } |
1161 if (_json.containsKey("sortRank")) { | 1184 if (_json.containsKey("sortRank")) { |
1162 sortRank = _json["sortRank"]; | 1185 sortRank = _json["sortRank"]; |
1163 } | 1186 } |
1164 } | 1187 } |
1165 | 1188 |
1166 core.Map<core.String, core.Object> toJson() { | 1189 core.Map<core.String, core.Object> toJson() { |
1167 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1190 final core.Map<core.String, core.Object> _json = |
| 1191 new core.Map<core.String, core.Object>(); |
1168 if (iconUrl != null) { | 1192 if (iconUrl != null) { |
1169 _json["iconUrl"] = iconUrl; | 1193 _json["iconUrl"] = iconUrl; |
1170 } | 1194 } |
1171 if (kind != null) { | 1195 if (kind != null) { |
1172 _json["kind"] = kind; | 1196 _json["kind"] = kind; |
1173 } | 1197 } |
1174 if (name != null) { | 1198 if (name != null) { |
1175 _json["name"] = (name).toJson(); | 1199 _json["name"] = (name).toJson(); |
1176 } | 1200 } |
1177 if (scoreFormat != null) { | 1201 if (scoreFormat != null) { |
1178 _json["scoreFormat"] = (scoreFormat).toJson(); | 1202 _json["scoreFormat"] = (scoreFormat).toJson(); |
1179 } | 1203 } |
1180 if (sortRank != null) { | 1204 if (sortRank != null) { |
1181 _json["sortRank"] = sortRank; | 1205 _json["sortRank"] = sortRank; |
1182 } | 1206 } |
1183 return _json; | 1207 return _json; |
1184 } | 1208 } |
1185 } | 1209 } |
1186 | 1210 |
1187 /** This is a JSON template for a ListConfigurations response. */ | 1211 /// This is a JSON template for a ListConfigurations response. |
1188 class LeaderboardConfigurationListResponse { | 1212 class LeaderboardConfigurationListResponse { |
1189 /** The leaderboard configurations. */ | 1213 /// The leaderboard configurations. |
1190 core.List<LeaderboardConfiguration> items; | 1214 core.List<LeaderboardConfiguration> items; |
1191 /** | 1215 |
1192 * Uniquely identifies the type of this resource. Value is always the fixed | 1216 /// Uniquely identifies the type of this resource. Value is always the fixed |
1193 * string games#leaderboardConfigurationListResponse. | 1217 /// string games#leaderboardConfigurationListResponse. |
1194 */ | |
1195 core.String kind; | 1218 core.String kind; |
1196 /** The pagination token for the next page of results. */ | 1219 |
| 1220 /// The pagination token for the next page of results. |
1197 core.String nextPageToken; | 1221 core.String nextPageToken; |
1198 | 1222 |
1199 LeaderboardConfigurationListResponse(); | 1223 LeaderboardConfigurationListResponse(); |
1200 | 1224 |
1201 LeaderboardConfigurationListResponse.fromJson(core.Map _json) { | 1225 LeaderboardConfigurationListResponse.fromJson(core.Map _json) { |
1202 if (_json.containsKey("items")) { | 1226 if (_json.containsKey("items")) { |
1203 items = _json["items"].map((value) => new LeaderboardConfiguration.fromJso
n(value)).toList(); | 1227 items = _json["items"] |
| 1228 .map((value) => new LeaderboardConfiguration.fromJson(value)) |
| 1229 .toList(); |
1204 } | 1230 } |
1205 if (_json.containsKey("kind")) { | 1231 if (_json.containsKey("kind")) { |
1206 kind = _json["kind"]; | 1232 kind = _json["kind"]; |
1207 } | 1233 } |
1208 if (_json.containsKey("nextPageToken")) { | 1234 if (_json.containsKey("nextPageToken")) { |
1209 nextPageToken = _json["nextPageToken"]; | 1235 nextPageToken = _json["nextPageToken"]; |
1210 } | 1236 } |
1211 } | 1237 } |
1212 | 1238 |
1213 core.Map<core.String, core.Object> toJson() { | 1239 core.Map<core.String, core.Object> toJson() { |
1214 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1240 final core.Map<core.String, core.Object> _json = |
| 1241 new core.Map<core.String, core.Object>(); |
1215 if (items != null) { | 1242 if (items != null) { |
1216 _json["items"] = items.map((value) => (value).toJson()).toList(); | 1243 _json["items"] = items.map((value) => (value).toJson()).toList(); |
1217 } | 1244 } |
1218 if (kind != null) { | 1245 if (kind != null) { |
1219 _json["kind"] = kind; | 1246 _json["kind"] = kind; |
1220 } | 1247 } |
1221 if (nextPageToken != null) { | 1248 if (nextPageToken != null) { |
1222 _json["nextPageToken"] = nextPageToken; | 1249 _json["nextPageToken"] = nextPageToken; |
1223 } | 1250 } |
1224 return _json; | 1251 return _json; |
1225 } | 1252 } |
1226 } | 1253 } |
1227 | 1254 |
1228 /** This is a JSON template for a localized string resource. */ | 1255 /// This is a JSON template for a localized string resource. |
1229 class LocalizedString { | 1256 class LocalizedString { |
1230 /** | 1257 /// Uniquely identifies the type of this resource. Value is always the fixed |
1231 * Uniquely identifies the type of this resource. Value is always the fixed | 1258 /// string gamesConfiguration#localizedString. |
1232 * string gamesConfiguration#localizedString. | |
1233 */ | |
1234 core.String kind; | 1259 core.String kind; |
1235 /** The locale string. */ | 1260 |
| 1261 /// The locale string. |
1236 core.String locale; | 1262 core.String locale; |
1237 /** The string value. */ | 1263 |
| 1264 /// The string value. |
1238 core.String value; | 1265 core.String value; |
1239 | 1266 |
1240 LocalizedString(); | 1267 LocalizedString(); |
1241 | 1268 |
1242 LocalizedString.fromJson(core.Map _json) { | 1269 LocalizedString.fromJson(core.Map _json) { |
1243 if (_json.containsKey("kind")) { | 1270 if (_json.containsKey("kind")) { |
1244 kind = _json["kind"]; | 1271 kind = _json["kind"]; |
1245 } | 1272 } |
1246 if (_json.containsKey("locale")) { | 1273 if (_json.containsKey("locale")) { |
1247 locale = _json["locale"]; | 1274 locale = _json["locale"]; |
1248 } | 1275 } |
1249 if (_json.containsKey("value")) { | 1276 if (_json.containsKey("value")) { |
1250 value = _json["value"]; | 1277 value = _json["value"]; |
1251 } | 1278 } |
1252 } | 1279 } |
1253 | 1280 |
1254 core.Map<core.String, core.Object> toJson() { | 1281 core.Map<core.String, core.Object> toJson() { |
1255 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1282 final core.Map<core.String, core.Object> _json = |
| 1283 new core.Map<core.String, core.Object>(); |
1256 if (kind != null) { | 1284 if (kind != null) { |
1257 _json["kind"] = kind; | 1285 _json["kind"] = kind; |
1258 } | 1286 } |
1259 if (locale != null) { | 1287 if (locale != null) { |
1260 _json["locale"] = locale; | 1288 _json["locale"] = locale; |
1261 } | 1289 } |
1262 if (value != null) { | 1290 if (value != null) { |
1263 _json["value"] = value; | 1291 _json["value"] = value; |
1264 } | 1292 } |
1265 return _json; | 1293 return _json; |
1266 } | 1294 } |
1267 } | 1295 } |
1268 | 1296 |
1269 /** This is a JSON template for a localized string bundle resource. */ | 1297 /// This is a JSON template for a localized string bundle resource. |
1270 class LocalizedStringBundle { | 1298 class LocalizedStringBundle { |
1271 /** | 1299 /// Uniquely identifies the type of this resource. Value is always the fixed |
1272 * Uniquely identifies the type of this resource. Value is always the fixed | 1300 /// string gamesConfiguration#localizedStringBundle. |
1273 * string gamesConfiguration#localizedStringBundle. | |
1274 */ | |
1275 core.String kind; | 1301 core.String kind; |
1276 /** The locale strings. */ | 1302 |
| 1303 /// The locale strings. |
1277 core.List<LocalizedString> translations; | 1304 core.List<LocalizedString> translations; |
1278 | 1305 |
1279 LocalizedStringBundle(); | 1306 LocalizedStringBundle(); |
1280 | 1307 |
1281 LocalizedStringBundle.fromJson(core.Map _json) { | 1308 LocalizedStringBundle.fromJson(core.Map _json) { |
1282 if (_json.containsKey("kind")) { | 1309 if (_json.containsKey("kind")) { |
1283 kind = _json["kind"]; | 1310 kind = _json["kind"]; |
1284 } | 1311 } |
1285 if (_json.containsKey("translations")) { | 1312 if (_json.containsKey("translations")) { |
1286 translations = _json["translations"].map((value) => new LocalizedString.fr
omJson(value)).toList(); | 1313 translations = _json["translations"] |
| 1314 .map((value) => new LocalizedString.fromJson(value)) |
| 1315 .toList(); |
1287 } | 1316 } |
1288 } | 1317 } |
1289 | 1318 |
1290 core.Map<core.String, core.Object> toJson() { | 1319 core.Map<core.String, core.Object> toJson() { |
1291 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1320 final core.Map<core.String, core.Object> _json = |
| 1321 new core.Map<core.String, core.Object>(); |
1292 if (kind != null) { | 1322 if (kind != null) { |
1293 _json["kind"] = kind; | 1323 _json["kind"] = kind; |
1294 } | 1324 } |
1295 if (translations != null) { | 1325 if (translations != null) { |
1296 _json["translations"] = translations.map((value) => (value).toJson()).toLi
st(); | 1326 _json["translations"] = |
| 1327 translations.map((value) => (value).toJson()).toList(); |
1297 } | 1328 } |
1298 return _json; | 1329 return _json; |
1299 } | 1330 } |
1300 } | 1331 } |
OLD | NEW |