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

Side by Side Diff: generated/googleapis/lib/tasks/v1.dart

Issue 559053002: Generate 0.1.0 version of googleapis/googleapis_beta (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 6 years, 3 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.tasks.v1;
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 /** Lets you manage your tasks and task lists. */
17 class TasksApi {
18 /** Manage your tasks */
19 static const TasksScope = "https://www.googleapis.com/auth/tasks";
20
21 /** View your tasks */
22 static const TasksReadonlyScope = "https://www.googleapis.com/auth/tasks.reado nly";
23
24
25 final common_internal.ApiRequester _requester;
26
27 TasklistsResourceApi get tasklists => new TasklistsResourceApi(_requester);
28 TasksResourceApi get tasks => new TasksResourceApi(_requester);
29
30 TasksApi(http.Client client) :
31 _requester = new common_internal.ApiRequester(client, "https://www.googlea pis.com/", "/tasks/v1/");
32 }
33
34
35 /** Not documented yet. */
36 class TasklistsResourceApi {
37 final common_internal.ApiRequester _requester;
38
39 TasklistsResourceApi(common_internal.ApiRequester client) :
40 _requester = client;
41
42 /**
43 * Deletes the authenticated user's specified task list.
44 *
45 * Request parameters:
46 *
47 * [tasklist] - Task list identifier.
48 *
49 * Completes with a [common.ApiRequestError] if the API endpoint returned an
50 * error.
51 *
52 * If the used [http.Client] completes with an error when making a REST call,
53 * this method will complete with the same error.
54 */
55 async.Future delete(core.String tasklist) {
56 var _url = null;
57 var _queryParams = new core.Map();
58 var _uploadMedia = null;
59 var _uploadOptions = null;
60 var _downloadOptions = common.DownloadOptions.Metadata;
61 var _body = null;
62
63 if (tasklist == null) {
64 throw new core.ArgumentError("Parameter tasklist is required.");
65 }
66
67 _downloadOptions = null;
68
69 _url = 'users/@me/lists/' + common_internal.Escaper.ecapeVariable('$tasklist ');
70
71 var _response = _requester.request(_url,
72 "DELETE",
73 body: _body,
74 queryParams: _queryParams,
75 uploadOptions: _uploadOptions,
76 uploadMedia: _uploadMedia,
77 downloadOptions: _downloadOptions);
78 return _response.then((data) => null);
79 }
80
81 /**
82 * Returns the authenticated user's specified task list.
83 *
84 * Request parameters:
85 *
86 * [tasklist] - Task list identifier.
87 *
88 * Completes with a [TaskList].
89 *
90 * Completes with a [common.ApiRequestError] if the API endpoint returned an
91 * error.
92 *
93 * If the used [http.Client] completes with an error when making a REST call,
94 * this method will complete with the same error.
95 */
96 async.Future<TaskList> get(core.String tasklist) {
97 var _url = null;
98 var _queryParams = new core.Map();
99 var _uploadMedia = null;
100 var _uploadOptions = null;
101 var _downloadOptions = common.DownloadOptions.Metadata;
102 var _body = null;
103
104 if (tasklist == null) {
105 throw new core.ArgumentError("Parameter tasklist is required.");
106 }
107
108
109 _url = 'users/@me/lists/' + common_internal.Escaper.ecapeVariable('$tasklist ');
110
111 var _response = _requester.request(_url,
112 "GET",
113 body: _body,
114 queryParams: _queryParams,
115 uploadOptions: _uploadOptions,
116 uploadMedia: _uploadMedia,
117 downloadOptions: _downloadOptions);
118 return _response.then((data) => new TaskList.fromJson(data));
119 }
120
121 /**
122 * Creates a new task list and adds it to the authenticated user's task lists.
123 *
124 * [request] - The metadata request object.
125 *
126 * Request parameters:
127 *
128 * Completes with a [TaskList].
129 *
130 * Completes with a [common.ApiRequestError] if the API endpoint returned an
131 * error.
132 *
133 * If the used [http.Client] completes with an error when making a REST call,
134 * this method will complete with the same error.
135 */
136 async.Future<TaskList> insert(TaskList request) {
137 var _url = null;
138 var _queryParams = new core.Map();
139 var _uploadMedia = null;
140 var _uploadOptions = null;
141 var _downloadOptions = common.DownloadOptions.Metadata;
142 var _body = null;
143
144 if (request != null) {
145 _body = convert.JSON.encode((request).toJson());
146 }
147
148
149 _url = 'users/@me/lists';
150
151 var _response = _requester.request(_url,
152 "POST",
153 body: _body,
154 queryParams: _queryParams,
155 uploadOptions: _uploadOptions,
156 uploadMedia: _uploadMedia,
157 downloadOptions: _downloadOptions);
158 return _response.then((data) => new TaskList.fromJson(data));
159 }
160
161 /**
162 * Returns all the authenticated user's task lists.
163 *
164 * Request parameters:
165 *
166 * [maxResults] - Maximum number of task lists returned on one page. Optional.
167 * The default is 100.
168 *
169 * [pageToken] - Token specifying the result page to return. Optional.
170 *
171 * Completes with a [TaskLists].
172 *
173 * Completes with a [common.ApiRequestError] if the API endpoint returned an
174 * error.
175 *
176 * If the used [http.Client] completes with an error when making a REST call,
177 * this method will complete with the same error.
178 */
179 async.Future<TaskLists> list({core.String maxResults, core.String pageToken}) {
180 var _url = null;
181 var _queryParams = new core.Map();
182 var _uploadMedia = null;
183 var _uploadOptions = null;
184 var _downloadOptions = common.DownloadOptions.Metadata;
185 var _body = null;
186
187 if (maxResults != null) {
188 _queryParams["maxResults"] = [maxResults];
189 }
190 if (pageToken != null) {
191 _queryParams["pageToken"] = [pageToken];
192 }
193
194
195 _url = 'users/@me/lists';
196
197 var _response = _requester.request(_url,
198 "GET",
199 body: _body,
200 queryParams: _queryParams,
201 uploadOptions: _uploadOptions,
202 uploadMedia: _uploadMedia,
203 downloadOptions: _downloadOptions);
204 return _response.then((data) => new TaskLists.fromJson(data));
205 }
206
207 /**
208 * Updates the authenticated user's specified task list. This method supports
209 * patch semantics.
210 *
211 * [request] - The metadata request object.
212 *
213 * Request parameters:
214 *
215 * [tasklist] - Task list identifier.
216 *
217 * Completes with a [TaskList].
218 *
219 * Completes with a [common.ApiRequestError] if the API endpoint returned an
220 * error.
221 *
222 * If the used [http.Client] completes with an error when making a REST call,
223 * this method will complete with the same error.
224 */
225 async.Future<TaskList> patch(TaskList request, core.String tasklist) {
226 var _url = null;
227 var _queryParams = new core.Map();
228 var _uploadMedia = null;
229 var _uploadOptions = null;
230 var _downloadOptions = common.DownloadOptions.Metadata;
231 var _body = null;
232
233 if (request != null) {
234 _body = convert.JSON.encode((request).toJson());
235 }
236 if (tasklist == null) {
237 throw new core.ArgumentError("Parameter tasklist is required.");
238 }
239
240
241 _url = 'users/@me/lists/' + common_internal.Escaper.ecapeVariable('$tasklist ');
242
243 var _response = _requester.request(_url,
244 "PATCH",
245 body: _body,
246 queryParams: _queryParams,
247 uploadOptions: _uploadOptions,
248 uploadMedia: _uploadMedia,
249 downloadOptions: _downloadOptions);
250 return _response.then((data) => new TaskList.fromJson(data));
251 }
252
253 /**
254 * Updates the authenticated user's specified task list.
255 *
256 * [request] - The metadata request object.
257 *
258 * Request parameters:
259 *
260 * [tasklist] - Task list identifier.
261 *
262 * Completes with a [TaskList].
263 *
264 * Completes with a [common.ApiRequestError] if the API endpoint returned an
265 * error.
266 *
267 * If the used [http.Client] completes with an error when making a REST call,
268 * this method will complete with the same error.
269 */
270 async.Future<TaskList> update(TaskList request, core.String tasklist) {
271 var _url = null;
272 var _queryParams = new core.Map();
273 var _uploadMedia = null;
274 var _uploadOptions = null;
275 var _downloadOptions = common.DownloadOptions.Metadata;
276 var _body = null;
277
278 if (request != null) {
279 _body = convert.JSON.encode((request).toJson());
280 }
281 if (tasklist == null) {
282 throw new core.ArgumentError("Parameter tasklist is required.");
283 }
284
285
286 _url = 'users/@me/lists/' + common_internal.Escaper.ecapeVariable('$tasklist ');
287
288 var _response = _requester.request(_url,
289 "PUT",
290 body: _body,
291 queryParams: _queryParams,
292 uploadOptions: _uploadOptions,
293 uploadMedia: _uploadMedia,
294 downloadOptions: _downloadOptions);
295 return _response.then((data) => new TaskList.fromJson(data));
296 }
297
298 }
299
300
301 /** Not documented yet. */
302 class TasksResourceApi {
303 final common_internal.ApiRequester _requester;
304
305 TasksResourceApi(common_internal.ApiRequester client) :
306 _requester = client;
307
308 /**
309 * Clears all completed tasks from the specified task list. The affected tasks
310 * will be marked as 'hidden' and no longer be returned by default when
311 * retrieving all tasks for a task list.
312 *
313 * Request parameters:
314 *
315 * [tasklist] - Task list identifier.
316 *
317 * Completes with a [common.ApiRequestError] if the API endpoint returned an
318 * error.
319 *
320 * If the used [http.Client] completes with an error when making a REST call,
321 * this method will complete with the same error.
322 */
323 async.Future clear(core.String tasklist) {
324 var _url = null;
325 var _queryParams = new core.Map();
326 var _uploadMedia = null;
327 var _uploadOptions = null;
328 var _downloadOptions = common.DownloadOptions.Metadata;
329 var _body = null;
330
331 if (tasklist == null) {
332 throw new core.ArgumentError("Parameter tasklist is required.");
333 }
334
335 _downloadOptions = null;
336
337 _url = 'lists/' + common_internal.Escaper.ecapeVariable('$tasklist') + '/cle ar';
338
339 var _response = _requester.request(_url,
340 "POST",
341 body: _body,
342 queryParams: _queryParams,
343 uploadOptions: _uploadOptions,
344 uploadMedia: _uploadMedia,
345 downloadOptions: _downloadOptions);
346 return _response.then((data) => null);
347 }
348
349 /**
350 * Deletes the specified task from the task list.
351 *
352 * Request parameters:
353 *
354 * [tasklist] - Task list identifier.
355 *
356 * [task] - Task identifier.
357 *
358 * Completes with a [common.ApiRequestError] if the API endpoint returned an
359 * error.
360 *
361 * If the used [http.Client] completes with an error when making a REST call,
362 * this method will complete with the same error.
363 */
364 async.Future delete(core.String tasklist, core.String task) {
365 var _url = null;
366 var _queryParams = new core.Map();
367 var _uploadMedia = null;
368 var _uploadOptions = null;
369 var _downloadOptions = common.DownloadOptions.Metadata;
370 var _body = null;
371
372 if (tasklist == null) {
373 throw new core.ArgumentError("Parameter tasklist is required.");
374 }
375 if (task == null) {
376 throw new core.ArgumentError("Parameter task is required.");
377 }
378
379 _downloadOptions = null;
380
381 _url = 'lists/' + common_internal.Escaper.ecapeVariable('$tasklist') + '/tas ks/' + common_internal.Escaper.ecapeVariable('$task');
382
383 var _response = _requester.request(_url,
384 "DELETE",
385 body: _body,
386 queryParams: _queryParams,
387 uploadOptions: _uploadOptions,
388 uploadMedia: _uploadMedia,
389 downloadOptions: _downloadOptions);
390 return _response.then((data) => null);
391 }
392
393 /**
394 * Returns the specified task.
395 *
396 * Request parameters:
397 *
398 * [tasklist] - Task list identifier.
399 *
400 * [task] - Task identifier.
401 *
402 * Completes with a [Task].
403 *
404 * Completes with a [common.ApiRequestError] if the API endpoint returned an
405 * error.
406 *
407 * If the used [http.Client] completes with an error when making a REST call,
408 * this method will complete with the same error.
409 */
410 async.Future<Task> get(core.String tasklist, core.String task) {
411 var _url = null;
412 var _queryParams = new core.Map();
413 var _uploadMedia = null;
414 var _uploadOptions = null;
415 var _downloadOptions = common.DownloadOptions.Metadata;
416 var _body = null;
417
418 if (tasklist == null) {
419 throw new core.ArgumentError("Parameter tasklist is required.");
420 }
421 if (task == null) {
422 throw new core.ArgumentError("Parameter task is required.");
423 }
424
425
426 _url = 'lists/' + common_internal.Escaper.ecapeVariable('$tasklist') + '/tas ks/' + common_internal.Escaper.ecapeVariable('$task');
427
428 var _response = _requester.request(_url,
429 "GET",
430 body: _body,
431 queryParams: _queryParams,
432 uploadOptions: _uploadOptions,
433 uploadMedia: _uploadMedia,
434 downloadOptions: _downloadOptions);
435 return _response.then((data) => new Task.fromJson(data));
436 }
437
438 /**
439 * Creates a new task on the specified task list.
440 *
441 * [request] - The metadata request object.
442 *
443 * Request parameters:
444 *
445 * [tasklist] - Task list identifier.
446 *
447 * [parent] - Parent task identifier. If the task is created at the top level,
448 * this parameter is omitted. Optional.
449 *
450 * [previous] - Previous sibling task identifier. If the task is created at
451 * the first position among its siblings, this parameter is omitted. Optional.
452 *
453 * Completes with a [Task].
454 *
455 * Completes with a [common.ApiRequestError] if the API endpoint returned an
456 * error.
457 *
458 * If the used [http.Client] completes with an error when making a REST call,
459 * this method will complete with the same error.
460 */
461 async.Future<Task> insert(Task request, core.String tasklist, {core.String par ent, core.String previous}) {
462 var _url = null;
463 var _queryParams = new core.Map();
464 var _uploadMedia = null;
465 var _uploadOptions = null;
466 var _downloadOptions = common.DownloadOptions.Metadata;
467 var _body = null;
468
469 if (request != null) {
470 _body = convert.JSON.encode((request).toJson());
471 }
472 if (tasklist == null) {
473 throw new core.ArgumentError("Parameter tasklist is required.");
474 }
475 if (parent != null) {
476 _queryParams["parent"] = [parent];
477 }
478 if (previous != null) {
479 _queryParams["previous"] = [previous];
480 }
481
482
483 _url = 'lists/' + common_internal.Escaper.ecapeVariable('$tasklist') + '/tas ks';
484
485 var _response = _requester.request(_url,
486 "POST",
487 body: _body,
488 queryParams: _queryParams,
489 uploadOptions: _uploadOptions,
490 uploadMedia: _uploadMedia,
491 downloadOptions: _downloadOptions);
492 return _response.then((data) => new Task.fromJson(data));
493 }
494
495 /**
496 * Returns all tasks in the specified task list.
497 *
498 * Request parameters:
499 *
500 * [tasklist] - Task list identifier.
501 *
502 * [completedMax] - Upper bound for a task's completion date (as a RFC 3339
503 * timestamp) to filter by. Optional. The default is not to filter by
504 * completion date.
505 *
506 * [completedMin] - Lower bound for a task's completion date (as a RFC 3339
507 * timestamp) to filter by. Optional. The default is not to filter by
508 * completion date.
509 *
510 * [dueMax] - Upper bound for a task's due date (as a RFC 3339 timestamp) to
511 * filter by. Optional. The default is not to filter by due date.
512 *
513 * [dueMin] - Lower bound for a task's due date (as a RFC 3339 timestamp) to
514 * filter by. Optional. The default is not to filter by due date.
515 *
516 * [maxResults] - Maximum number of task lists returned on one page. Optional.
517 * The default is 100.
518 *
519 * [pageToken] - Token specifying the result page to return. Optional.
520 *
521 * [showCompleted] - Flag indicating whether completed tasks are returned in
522 * the result. Optional. The default is True.
523 *
524 * [showDeleted] - Flag indicating whether deleted tasks are returned in the
525 * result. Optional. The default is False.
526 *
527 * [showHidden] - Flag indicating whether hidden tasks are returned in the
528 * result. Optional. The default is False.
529 *
530 * [updatedMin] - Lower bound for a task's last modification time (as a RFC
531 * 3339 timestamp) to filter by. Optional. The default is not to filter by
532 * last modification time.
533 *
534 * Completes with a [Tasks].
535 *
536 * Completes with a [common.ApiRequestError] if the API endpoint returned an
537 * error.
538 *
539 * If the used [http.Client] completes with an error when making a REST call,
540 * this method will complete with the same error.
541 */
542 async.Future<Tasks> list(core.String tasklist, {core.String completedMax, core .String completedMin, core.String dueMax, core.String dueMin, core.String maxRes ults, core.String pageToken, core.bool showCompleted, core.bool showDeleted, cor e.bool showHidden, core.String updatedMin}) {
543 var _url = null;
544 var _queryParams = new core.Map();
545 var _uploadMedia = null;
546 var _uploadOptions = null;
547 var _downloadOptions = common.DownloadOptions.Metadata;
548 var _body = null;
549
550 if (tasklist == null) {
551 throw new core.ArgumentError("Parameter tasklist is required.");
552 }
553 if (completedMax != null) {
554 _queryParams["completedMax"] = [completedMax];
555 }
556 if (completedMin != null) {
557 _queryParams["completedMin"] = [completedMin];
558 }
559 if (dueMax != null) {
560 _queryParams["dueMax"] = [dueMax];
561 }
562 if (dueMin != null) {
563 _queryParams["dueMin"] = [dueMin];
564 }
565 if (maxResults != null) {
566 _queryParams["maxResults"] = [maxResults];
567 }
568 if (pageToken != null) {
569 _queryParams["pageToken"] = [pageToken];
570 }
571 if (showCompleted != null) {
572 _queryParams["showCompleted"] = ["${showCompleted}"];
573 }
574 if (showDeleted != null) {
575 _queryParams["showDeleted"] = ["${showDeleted}"];
576 }
577 if (showHidden != null) {
578 _queryParams["showHidden"] = ["${showHidden}"];
579 }
580 if (updatedMin != null) {
581 _queryParams["updatedMin"] = [updatedMin];
582 }
583
584
585 _url = 'lists/' + common_internal.Escaper.ecapeVariable('$tasklist') + '/tas ks';
586
587 var _response = _requester.request(_url,
588 "GET",
589 body: _body,
590 queryParams: _queryParams,
591 uploadOptions: _uploadOptions,
592 uploadMedia: _uploadMedia,
593 downloadOptions: _downloadOptions);
594 return _response.then((data) => new Tasks.fromJson(data));
595 }
596
597 /**
598 * Moves the specified task to another position in the task list. This can
599 * include putting it as a child task under a new parent and/or move it to a
600 * different position among its sibling tasks.
601 *
602 * Request parameters:
603 *
604 * [tasklist] - Task list identifier.
605 *
606 * [task] - Task identifier.
607 *
608 * [parent] - New parent task identifier. If the task is moved to the top
609 * level, this parameter is omitted. Optional.
610 *
611 * [previous] - New previous sibling task identifier. If the task is moved to
612 * the first position among its siblings, this parameter is omitted. Optional.
613 *
614 * Completes with a [Task].
615 *
616 * Completes with a [common.ApiRequestError] if the API endpoint returned an
617 * error.
618 *
619 * If the used [http.Client] completes with an error when making a REST call,
620 * this method will complete with the same error.
621 */
622 async.Future<Task> move(core.String tasklist, core.String task, {core.String p arent, core.String previous}) {
623 var _url = null;
624 var _queryParams = new core.Map();
625 var _uploadMedia = null;
626 var _uploadOptions = null;
627 var _downloadOptions = common.DownloadOptions.Metadata;
628 var _body = null;
629
630 if (tasklist == null) {
631 throw new core.ArgumentError("Parameter tasklist is required.");
632 }
633 if (task == null) {
634 throw new core.ArgumentError("Parameter task is required.");
635 }
636 if (parent != null) {
637 _queryParams["parent"] = [parent];
638 }
639 if (previous != null) {
640 _queryParams["previous"] = [previous];
641 }
642
643
644 _url = 'lists/' + common_internal.Escaper.ecapeVariable('$tasklist') + '/tas ks/' + common_internal.Escaper.ecapeVariable('$task') + '/move';
645
646 var _response = _requester.request(_url,
647 "POST",
648 body: _body,
649 queryParams: _queryParams,
650 uploadOptions: _uploadOptions,
651 uploadMedia: _uploadMedia,
652 downloadOptions: _downloadOptions);
653 return _response.then((data) => new Task.fromJson(data));
654 }
655
656 /**
657 * Updates the specified task. This method supports patch semantics.
658 *
659 * [request] - The metadata request object.
660 *
661 * Request parameters:
662 *
663 * [tasklist] - Task list identifier.
664 *
665 * [task] - Task identifier.
666 *
667 * Completes with a [Task].
668 *
669 * Completes with a [common.ApiRequestError] if the API endpoint returned an
670 * error.
671 *
672 * If the used [http.Client] completes with an error when making a REST call,
673 * this method will complete with the same error.
674 */
675 async.Future<Task> patch(Task request, core.String tasklist, core.String task) {
676 var _url = null;
677 var _queryParams = new core.Map();
678 var _uploadMedia = null;
679 var _uploadOptions = null;
680 var _downloadOptions = common.DownloadOptions.Metadata;
681 var _body = null;
682
683 if (request != null) {
684 _body = convert.JSON.encode((request).toJson());
685 }
686 if (tasklist == null) {
687 throw new core.ArgumentError("Parameter tasklist is required.");
688 }
689 if (task == null) {
690 throw new core.ArgumentError("Parameter task is required.");
691 }
692
693
694 _url = 'lists/' + common_internal.Escaper.ecapeVariable('$tasklist') + '/tas ks/' + common_internal.Escaper.ecapeVariable('$task');
695
696 var _response = _requester.request(_url,
697 "PATCH",
698 body: _body,
699 queryParams: _queryParams,
700 uploadOptions: _uploadOptions,
701 uploadMedia: _uploadMedia,
702 downloadOptions: _downloadOptions);
703 return _response.then((data) => new Task.fromJson(data));
704 }
705
706 /**
707 * Updates the specified task.
708 *
709 * [request] - The metadata request object.
710 *
711 * Request parameters:
712 *
713 * [tasklist] - Task list identifier.
714 *
715 * [task] - Task identifier.
716 *
717 * Completes with a [Task].
718 *
719 * Completes with a [common.ApiRequestError] if the API endpoint returned an
720 * error.
721 *
722 * If the used [http.Client] completes with an error when making a REST call,
723 * this method will complete with the same error.
724 */
725 async.Future<Task> update(Task request, core.String tasklist, core.String task ) {
726 var _url = null;
727 var _queryParams = new core.Map();
728 var _uploadMedia = null;
729 var _uploadOptions = null;
730 var _downloadOptions = common.DownloadOptions.Metadata;
731 var _body = null;
732
733 if (request != null) {
734 _body = convert.JSON.encode((request).toJson());
735 }
736 if (tasklist == null) {
737 throw new core.ArgumentError("Parameter tasklist is required.");
738 }
739 if (task == null) {
740 throw new core.ArgumentError("Parameter task is required.");
741 }
742
743
744 _url = 'lists/' + common_internal.Escaper.ecapeVariable('$tasklist') + '/tas ks/' + common_internal.Escaper.ecapeVariable('$task');
745
746 var _response = _requester.request(_url,
747 "PUT",
748 body: _body,
749 queryParams: _queryParams,
750 uploadOptions: _uploadOptions,
751 uploadMedia: _uploadMedia,
752 downloadOptions: _downloadOptions);
753 return _response.then((data) => new Task.fromJson(data));
754 }
755
756 }
757
758
759
760 /** Not documented yet. */
761 class TaskLinks {
762 /** The description. In HTML speak: Everything between <a> and </a>. */
763 core.String description;
764
765 /** The URL. */
766 core.String link;
767
768 /** Type of the link, e.g. "email". */
769 core.String type;
770
771
772 TaskLinks();
773
774 TaskLinks.fromJson(core.Map _json) {
775 if (_json.containsKey("description")) {
776 description = _json["description"];
777 }
778 if (_json.containsKey("link")) {
779 link = _json["link"];
780 }
781 if (_json.containsKey("type")) {
782 type = _json["type"];
783 }
784 }
785
786 core.Map toJson() {
787 var _json = new core.Map();
788 if (description != null) {
789 _json["description"] = description;
790 }
791 if (link != null) {
792 _json["link"] = link;
793 }
794 if (type != null) {
795 _json["type"] = type;
796 }
797 return _json;
798 }
799 }
800
801
802 /** Not documented yet. */
803 class Task {
804 /**
805 * Completion date of the task (as a RFC 3339 timestamp). This field is
806 * omitted if the task has not been completed.
807 */
808 core.DateTime completed;
809
810 /**
811 * Flag indicating whether the task has been deleted. The default if False.
812 */
813 core.bool deleted;
814
815 /** Due date of the task (as a RFC 3339 timestamp). Optional. */
816 core.DateTime due;
817
818 /** ETag of the resource. */
819 core.String etag;
820
821 /**
822 * Flag indicating whether the task is hidden. This is the case if the task
823 * had been marked completed when the task list was last cleared. The default
824 * is False. This field is read-only.
825 */
826 core.bool hidden;
827
828 /** Task identifier. */
829 core.String id;
830
831 /** Type of the resource. This is always "tasks#task". */
832 core.String kind;
833
834 /** Collection of links. This collection is read-only. */
835 core.List<TaskLinks> links;
836
837 /** Notes describing the task. Optional. */
838 core.String notes;
839
840 /**
841 * Parent task identifier. This field is omitted if it is a top-level task.
842 * This field is read-only. Use the "move" method to move the task under a
843 * different parent or to the top level.
844 */
845 core.String parent;
846
847 /**
848 * String indicating the position of the task among its sibling tasks under
849 * the same parent task or at the top level. If this string is greater than
850 * another task's corresponding position string according to lexicographical
851 * ordering, the task is positioned after the other task under the same parent
852 * task (or at the top level). This field is read-only. Use the "move" method
853 * to move the task to another position.
854 */
855 core.String position;
856
857 /**
858 * URL pointing to this task. Used to retrieve, update, or delete this task.
859 */
860 core.String selfLink;
861
862 /** Status of the task. This is either "needsAction" or "completed". */
863 core.String status;
864
865 /** Title of the task. */
866 core.String title;
867
868 /** Last modification time of the task (as a RFC 3339 timestamp). */
869 core.DateTime updated;
870
871
872 Task();
873
874 Task.fromJson(core.Map _json) {
875 if (_json.containsKey("completed")) {
876 completed = core.DateTime.parse(_json["completed"]);
877 }
878 if (_json.containsKey("deleted")) {
879 deleted = _json["deleted"];
880 }
881 if (_json.containsKey("due")) {
882 due = core.DateTime.parse(_json["due"]);
883 }
884 if (_json.containsKey("etag")) {
885 etag = _json["etag"];
886 }
887 if (_json.containsKey("hidden")) {
888 hidden = _json["hidden"];
889 }
890 if (_json.containsKey("id")) {
891 id = _json["id"];
892 }
893 if (_json.containsKey("kind")) {
894 kind = _json["kind"];
895 }
896 if (_json.containsKey("links")) {
897 links = _json["links"].map((value) => new TaskLinks.fromJson(value)).toLis t();
898 }
899 if (_json.containsKey("notes")) {
900 notes = _json["notes"];
901 }
902 if (_json.containsKey("parent")) {
903 parent = _json["parent"];
904 }
905 if (_json.containsKey("position")) {
906 position = _json["position"];
907 }
908 if (_json.containsKey("selfLink")) {
909 selfLink = _json["selfLink"];
910 }
911 if (_json.containsKey("status")) {
912 status = _json["status"];
913 }
914 if (_json.containsKey("title")) {
915 title = _json["title"];
916 }
917 if (_json.containsKey("updated")) {
918 updated = core.DateTime.parse(_json["updated"]);
919 }
920 }
921
922 core.Map toJson() {
923 var _json = new core.Map();
924 if (completed != null) {
925 _json["completed"] = (completed).toIso8601String();
926 }
927 if (deleted != null) {
928 _json["deleted"] = deleted;
929 }
930 if (due != null) {
931 _json["due"] = (due).toIso8601String();
932 }
933 if (etag != null) {
934 _json["etag"] = etag;
935 }
936 if (hidden != null) {
937 _json["hidden"] = hidden;
938 }
939 if (id != null) {
940 _json["id"] = id;
941 }
942 if (kind != null) {
943 _json["kind"] = kind;
944 }
945 if (links != null) {
946 _json["links"] = links.map((value) => (value).toJson()).toList();
947 }
948 if (notes != null) {
949 _json["notes"] = notes;
950 }
951 if (parent != null) {
952 _json["parent"] = parent;
953 }
954 if (position != null) {
955 _json["position"] = position;
956 }
957 if (selfLink != null) {
958 _json["selfLink"] = selfLink;
959 }
960 if (status != null) {
961 _json["status"] = status;
962 }
963 if (title != null) {
964 _json["title"] = title;
965 }
966 if (updated != null) {
967 _json["updated"] = (updated).toIso8601String();
968 }
969 return _json;
970 }
971 }
972
973
974 /** Not documented yet. */
975 class TaskList {
976 /** ETag of the resource. */
977 core.String etag;
978
979 /** Task list identifier. */
980 core.String id;
981
982 /** Type of the resource. This is always "tasks#taskList". */
983 core.String kind;
984
985 /**
986 * URL pointing to this task list. Used to retrieve, update, or delete this
987 * task list.
988 */
989 core.String selfLink;
990
991 /** Title of the task list. */
992 core.String title;
993
994 /** Last modification time of the task list (as a RFC 3339 timestamp). */
995 core.DateTime updated;
996
997
998 TaskList();
999
1000 TaskList.fromJson(core.Map _json) {
1001 if (_json.containsKey("etag")) {
1002 etag = _json["etag"];
1003 }
1004 if (_json.containsKey("id")) {
1005 id = _json["id"];
1006 }
1007 if (_json.containsKey("kind")) {
1008 kind = _json["kind"];
1009 }
1010 if (_json.containsKey("selfLink")) {
1011 selfLink = _json["selfLink"];
1012 }
1013 if (_json.containsKey("title")) {
1014 title = _json["title"];
1015 }
1016 if (_json.containsKey("updated")) {
1017 updated = core.DateTime.parse(_json["updated"]);
1018 }
1019 }
1020
1021 core.Map toJson() {
1022 var _json = new core.Map();
1023 if (etag != null) {
1024 _json["etag"] = etag;
1025 }
1026 if (id != null) {
1027 _json["id"] = id;
1028 }
1029 if (kind != null) {
1030 _json["kind"] = kind;
1031 }
1032 if (selfLink != null) {
1033 _json["selfLink"] = selfLink;
1034 }
1035 if (title != null) {
1036 _json["title"] = title;
1037 }
1038 if (updated != null) {
1039 _json["updated"] = (updated).toIso8601String();
1040 }
1041 return _json;
1042 }
1043 }
1044
1045
1046 /** Not documented yet. */
1047 class TaskLists {
1048 /** ETag of the resource. */
1049 core.String etag;
1050
1051 /** Collection of task lists. */
1052 core.List<TaskList> items;
1053
1054 /** Type of the resource. This is always "tasks#taskLists". */
1055 core.String kind;
1056
1057 /** Token that can be used to request the next page of this result. */
1058 core.String nextPageToken;
1059
1060
1061 TaskLists();
1062
1063 TaskLists.fromJson(core.Map _json) {
1064 if (_json.containsKey("etag")) {
1065 etag = _json["etag"];
1066 }
1067 if (_json.containsKey("items")) {
1068 items = _json["items"].map((value) => new TaskList.fromJson(value)).toList ();
1069 }
1070 if (_json.containsKey("kind")) {
1071 kind = _json["kind"];
1072 }
1073 if (_json.containsKey("nextPageToken")) {
1074 nextPageToken = _json["nextPageToken"];
1075 }
1076 }
1077
1078 core.Map toJson() {
1079 var _json = new core.Map();
1080 if (etag != null) {
1081 _json["etag"] = etag;
1082 }
1083 if (items != null) {
1084 _json["items"] = items.map((value) => (value).toJson()).toList();
1085 }
1086 if (kind != null) {
1087 _json["kind"] = kind;
1088 }
1089 if (nextPageToken != null) {
1090 _json["nextPageToken"] = nextPageToken;
1091 }
1092 return _json;
1093 }
1094 }
1095
1096
1097 /** Not documented yet. */
1098 class Tasks {
1099 /** ETag of the resource. */
1100 core.String etag;
1101
1102 /** Collection of tasks. */
1103 core.List<Task> items;
1104
1105 /** Type of the resource. This is always "tasks#tasks". */
1106 core.String kind;
1107
1108 /** Token used to access the next page of this result. */
1109 core.String nextPageToken;
1110
1111
1112 Tasks();
1113
1114 Tasks.fromJson(core.Map _json) {
1115 if (_json.containsKey("etag")) {
1116 etag = _json["etag"];
1117 }
1118 if (_json.containsKey("items")) {
1119 items = _json["items"].map((value) => new Task.fromJson(value)).toList();
1120 }
1121 if (_json.containsKey("kind")) {
1122 kind = _json["kind"];
1123 }
1124 if (_json.containsKey("nextPageToken")) {
1125 nextPageToken = _json["nextPageToken"];
1126 }
1127 }
1128
1129 core.Map toJson() {
1130 var _json = new core.Map();
1131 if (etag != null) {
1132 _json["etag"] = etag;
1133 }
1134 if (items != null) {
1135 _json["items"] = items.map((value) => (value).toJson()).toList();
1136 }
1137 if (kind != null) {
1138 _json["kind"] = kind;
1139 }
1140 if (nextPageToken != null) {
1141 _json["nextPageToken"] = nextPageToken;
1142 }
1143 return _json;
1144 }
1145 }
1146
1147
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698