Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Side by Side Diff: generated/googleapis/lib/gamesconfiguration/v1configuration.dart

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

Powered by Google App Engine
This is Rietveld 408576698