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

Side by Side Diff: generated/googleapis/lib/calendar/v3.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.calendar.v3;
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 manipulate events and other calendar data. */
17 class CalendarApi {
18 /** Manage your calendars */
19 static const CalendarScope = "https://www.googleapis.com/auth/calendar";
20
21 /** View your calendars */
22 static const CalendarReadonlyScope = "https://www.googleapis.com/auth/calendar .readonly";
23
24
25 final common_internal.ApiRequester _requester;
26
27 AclResourceApi get acl => new AclResourceApi(_requester);
28 CalendarListResourceApi get calendarList => new CalendarListResourceApi(_reque ster);
29 CalendarsResourceApi get calendars => new CalendarsResourceApi(_requester);
30 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester);
31 ColorsResourceApi get colors => new ColorsResourceApi(_requester);
32 EventsResourceApi get events => new EventsResourceApi(_requester);
33 FreebusyResourceApi get freebusy => new FreebusyResourceApi(_requester);
34 SettingsResourceApi get settings => new SettingsResourceApi(_requester);
35
36 CalendarApi(http.Client client) :
37 _requester = new common_internal.ApiRequester(client, "https://www.googlea pis.com/", "/calendar/v3/");
38 }
39
40
41 /** Not documented yet. */
42 class AclResourceApi {
43 final common_internal.ApiRequester _requester;
44
45 AclResourceApi(common_internal.ApiRequester client) :
46 _requester = client;
47
48 /**
49 * Deletes an access control rule.
50 *
51 * Request parameters:
52 *
53 * [calendarId] - Calendar identifier.
54 *
55 * [ruleId] - ACL rule identifier.
56 *
57 * Completes with a [common.ApiRequestError] if the API endpoint returned an
58 * error.
59 *
60 * If the used [http.Client] completes with an error when making a REST call,
61 * this method will complete with the same error.
62 */
63 async.Future delete(core.String calendarId, core.String ruleId) {
64 var _url = null;
65 var _queryParams = new core.Map();
66 var _uploadMedia = null;
67 var _uploadOptions = null;
68 var _downloadOptions = common.DownloadOptions.Metadata;
69 var _body = null;
70
71 if (calendarId == null) {
72 throw new core.ArgumentError("Parameter calendarId is required.");
73 }
74 if (ruleId == null) {
75 throw new core.ArgumentError("Parameter ruleId is required.");
76 }
77
78 _downloadOptions = null;
79
80 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/acl/' + common_internal.Escaper.ecapeVariable('$ruleId');
81
82 var _response = _requester.request(_url,
83 "DELETE",
84 body: _body,
85 queryParams: _queryParams,
86 uploadOptions: _uploadOptions,
87 uploadMedia: _uploadMedia,
88 downloadOptions: _downloadOptions);
89 return _response.then((data) => null);
90 }
91
92 /**
93 * Returns an access control rule.
94 *
95 * Request parameters:
96 *
97 * [calendarId] - Calendar identifier.
98 *
99 * [ruleId] - ACL rule identifier.
100 *
101 * Completes with a [AclRule].
102 *
103 * Completes with a [common.ApiRequestError] if the API endpoint returned an
104 * error.
105 *
106 * If the used [http.Client] completes with an error when making a REST call,
107 * this method will complete with the same error.
108 */
109 async.Future<AclRule> get(core.String calendarId, core.String ruleId) {
110 var _url = null;
111 var _queryParams = new core.Map();
112 var _uploadMedia = null;
113 var _uploadOptions = null;
114 var _downloadOptions = common.DownloadOptions.Metadata;
115 var _body = null;
116
117 if (calendarId == null) {
118 throw new core.ArgumentError("Parameter calendarId is required.");
119 }
120 if (ruleId == null) {
121 throw new core.ArgumentError("Parameter ruleId is required.");
122 }
123
124
125 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/acl/' + common_internal.Escaper.ecapeVariable('$ruleId');
126
127 var _response = _requester.request(_url,
128 "GET",
129 body: _body,
130 queryParams: _queryParams,
131 uploadOptions: _uploadOptions,
132 uploadMedia: _uploadMedia,
133 downloadOptions: _downloadOptions);
134 return _response.then((data) => new AclRule.fromJson(data));
135 }
136
137 /**
138 * Creates an access control rule.
139 *
140 * [request] - The metadata request object.
141 *
142 * Request parameters:
143 *
144 * [calendarId] - Calendar identifier.
145 *
146 * Completes with a [AclRule].
147 *
148 * Completes with a [common.ApiRequestError] if the API endpoint returned an
149 * error.
150 *
151 * If the used [http.Client] completes with an error when making a REST call,
152 * this method will complete with the same error.
153 */
154 async.Future<AclRule> insert(AclRule request, core.String calendarId) {
155 var _url = null;
156 var _queryParams = new core.Map();
157 var _uploadMedia = null;
158 var _uploadOptions = null;
159 var _downloadOptions = common.DownloadOptions.Metadata;
160 var _body = null;
161
162 if (request != null) {
163 _body = convert.JSON.encode((request).toJson());
164 }
165 if (calendarId == null) {
166 throw new core.ArgumentError("Parameter calendarId is required.");
167 }
168
169
170 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/acl';
171
172 var _response = _requester.request(_url,
173 "POST",
174 body: _body,
175 queryParams: _queryParams,
176 uploadOptions: _uploadOptions,
177 uploadMedia: _uploadMedia,
178 downloadOptions: _downloadOptions);
179 return _response.then((data) => new AclRule.fromJson(data));
180 }
181
182 /**
183 * Returns the rules in the access control list for the calendar.
184 *
185 * Request parameters:
186 *
187 * [calendarId] - Calendar identifier.
188 *
189 * [maxResults] - Maximum number of entries returned on one result page. By
190 * default the value is 100 entries. The page size can never be larger than
191 * 250 entries. Optional.
192 *
193 * [pageToken] - Token specifying which result page to return. Optional.
194 *
195 * [showDeleted] - Whether to include deleted ACLs in the result. Deleted ACLs
196 * are represented by role equal to "none". Deleted ACLs will always be
197 * included if syncToken is provided. Optional. The default is False.
198 *
199 * [syncToken] - Token obtained from the nextSyncToken field returned on the
200 * last page of results from the previous list request. It makes the result of
201 * this list request contain only entries that have changed since then. All
202 * entries deleted since the previous list request will always be in the
203 * result set and it is not allowed to set showDeleted to False.
204 * If the syncToken expires, the server will respond with a 410 GONE response
205 * code and the client should clear its storage and perform a full
206 * synchronization without any syncToken.
207 * Learn more about incremental synchronization.
208 * Optional. The default is to return all entries.
209 *
210 * Completes with a [Acl].
211 *
212 * Completes with a [common.ApiRequestError] if the API endpoint returned an
213 * error.
214 *
215 * If the used [http.Client] completes with an error when making a REST call,
216 * this method will complete with the same error.
217 */
218 async.Future<Acl> list(core.String calendarId, {core.int maxResults, core.Stri ng pageToken, core.bool showDeleted, core.String syncToken}) {
219 var _url = null;
220 var _queryParams = new core.Map();
221 var _uploadMedia = null;
222 var _uploadOptions = null;
223 var _downloadOptions = common.DownloadOptions.Metadata;
224 var _body = null;
225
226 if (calendarId == null) {
227 throw new core.ArgumentError("Parameter calendarId is required.");
228 }
229 if (maxResults != null) {
230 _queryParams["maxResults"] = ["${maxResults}"];
231 }
232 if (pageToken != null) {
233 _queryParams["pageToken"] = [pageToken];
234 }
235 if (showDeleted != null) {
236 _queryParams["showDeleted"] = ["${showDeleted}"];
237 }
238 if (syncToken != null) {
239 _queryParams["syncToken"] = [syncToken];
240 }
241
242
243 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/acl';
244
245 var _response = _requester.request(_url,
246 "GET",
247 body: _body,
248 queryParams: _queryParams,
249 uploadOptions: _uploadOptions,
250 uploadMedia: _uploadMedia,
251 downloadOptions: _downloadOptions);
252 return _response.then((data) => new Acl.fromJson(data));
253 }
254
255 /**
256 * Updates an access control rule. This method supports patch semantics.
257 *
258 * [request] - The metadata request object.
259 *
260 * Request parameters:
261 *
262 * [calendarId] - Calendar identifier.
263 *
264 * [ruleId] - ACL rule identifier.
265 *
266 * Completes with a [AclRule].
267 *
268 * Completes with a [common.ApiRequestError] if the API endpoint returned an
269 * error.
270 *
271 * If the used [http.Client] completes with an error when making a REST call,
272 * this method will complete with the same error.
273 */
274 async.Future<AclRule> patch(AclRule request, core.String calendarId, core.Stri ng ruleId) {
275 var _url = null;
276 var _queryParams = new core.Map();
277 var _uploadMedia = null;
278 var _uploadOptions = null;
279 var _downloadOptions = common.DownloadOptions.Metadata;
280 var _body = null;
281
282 if (request != null) {
283 _body = convert.JSON.encode((request).toJson());
284 }
285 if (calendarId == null) {
286 throw new core.ArgumentError("Parameter calendarId is required.");
287 }
288 if (ruleId == null) {
289 throw new core.ArgumentError("Parameter ruleId is required.");
290 }
291
292
293 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/acl/' + common_internal.Escaper.ecapeVariable('$ruleId');
294
295 var _response = _requester.request(_url,
296 "PATCH",
297 body: _body,
298 queryParams: _queryParams,
299 uploadOptions: _uploadOptions,
300 uploadMedia: _uploadMedia,
301 downloadOptions: _downloadOptions);
302 return _response.then((data) => new AclRule.fromJson(data));
303 }
304
305 /**
306 * Updates an access control rule.
307 *
308 * [request] - The metadata request object.
309 *
310 * Request parameters:
311 *
312 * [calendarId] - Calendar identifier.
313 *
314 * [ruleId] - ACL rule identifier.
315 *
316 * Completes with a [AclRule].
317 *
318 * Completes with a [common.ApiRequestError] if the API endpoint returned an
319 * error.
320 *
321 * If the used [http.Client] completes with an error when making a REST call,
322 * this method will complete with the same error.
323 */
324 async.Future<AclRule> update(AclRule request, core.String calendarId, core.Str ing ruleId) {
325 var _url = null;
326 var _queryParams = new core.Map();
327 var _uploadMedia = null;
328 var _uploadOptions = null;
329 var _downloadOptions = common.DownloadOptions.Metadata;
330 var _body = null;
331
332 if (request != null) {
333 _body = convert.JSON.encode((request).toJson());
334 }
335 if (calendarId == null) {
336 throw new core.ArgumentError("Parameter calendarId is required.");
337 }
338 if (ruleId == null) {
339 throw new core.ArgumentError("Parameter ruleId is required.");
340 }
341
342
343 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/acl/' + common_internal.Escaper.ecapeVariable('$ruleId');
344
345 var _response = _requester.request(_url,
346 "PUT",
347 body: _body,
348 queryParams: _queryParams,
349 uploadOptions: _uploadOptions,
350 uploadMedia: _uploadMedia,
351 downloadOptions: _downloadOptions);
352 return _response.then((data) => new AclRule.fromJson(data));
353 }
354
355 /**
356 * Watch for changes to ACL resources.
357 *
358 * [request] - The metadata request object.
359 *
360 * Request parameters:
361 *
362 * [calendarId] - Calendar identifier.
363 *
364 * [maxResults] - Maximum number of entries returned on one result page. By
365 * default the value is 100 entries. The page size can never be larger than
366 * 250 entries. Optional.
367 *
368 * [pageToken] - Token specifying which result page to return. Optional.
369 *
370 * [showDeleted] - Whether to include deleted ACLs in the result. Deleted ACLs
371 * are represented by role equal to "none". Deleted ACLs will always be
372 * included if syncToken is provided. Optional. The default is False.
373 *
374 * [syncToken] - Token obtained from the nextSyncToken field returned on the
375 * last page of results from the previous list request. It makes the result of
376 * this list request contain only entries that have changed since then. All
377 * entries deleted since the previous list request will always be in the
378 * result set and it is not allowed to set showDeleted to False.
379 * If the syncToken expires, the server will respond with a 410 GONE response
380 * code and the client should clear its storage and perform a full
381 * synchronization without any syncToken.
382 * Learn more about incremental synchronization.
383 * Optional. The default is to return all entries.
384 *
385 * Completes with a [Channel].
386 *
387 * Completes with a [common.ApiRequestError] if the API endpoint returned an
388 * error.
389 *
390 * If the used [http.Client] completes with an error when making a REST call,
391 * this method will complete with the same error.
392 */
393 async.Future<Channel> watch(Channel request, core.String calendarId, {core.int maxResults, core.String pageToken, core.bool showDeleted, core.String syncToken }) {
394 var _url = null;
395 var _queryParams = new core.Map();
396 var _uploadMedia = null;
397 var _uploadOptions = null;
398 var _downloadOptions = common.DownloadOptions.Metadata;
399 var _body = null;
400
401 if (request != null) {
402 _body = convert.JSON.encode((request).toJson());
403 }
404 if (calendarId == null) {
405 throw new core.ArgumentError("Parameter calendarId is required.");
406 }
407 if (maxResults != null) {
408 _queryParams["maxResults"] = ["${maxResults}"];
409 }
410 if (pageToken != null) {
411 _queryParams["pageToken"] = [pageToken];
412 }
413 if (showDeleted != null) {
414 _queryParams["showDeleted"] = ["${showDeleted}"];
415 }
416 if (syncToken != null) {
417 _queryParams["syncToken"] = [syncToken];
418 }
419
420
421 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/acl/watch';
422
423 var _response = _requester.request(_url,
424 "POST",
425 body: _body,
426 queryParams: _queryParams,
427 uploadOptions: _uploadOptions,
428 uploadMedia: _uploadMedia,
429 downloadOptions: _downloadOptions);
430 return _response.then((data) => new Channel.fromJson(data));
431 }
432
433 }
434
435
436 /** Not documented yet. */
437 class CalendarListResourceApi {
438 final common_internal.ApiRequester _requester;
439
440 CalendarListResourceApi(common_internal.ApiRequester client) :
441 _requester = client;
442
443 /**
444 * Deletes an entry on the user's calendar list.
445 *
446 * Request parameters:
447 *
448 * [calendarId] - Calendar identifier.
449 *
450 * Completes with a [common.ApiRequestError] if the API endpoint returned an
451 * error.
452 *
453 * If the used [http.Client] completes with an error when making a REST call,
454 * this method will complete with the same error.
455 */
456 async.Future delete(core.String calendarId) {
457 var _url = null;
458 var _queryParams = new core.Map();
459 var _uploadMedia = null;
460 var _uploadOptions = null;
461 var _downloadOptions = common.DownloadOptions.Metadata;
462 var _body = null;
463
464 if (calendarId == null) {
465 throw new core.ArgumentError("Parameter calendarId is required.");
466 }
467
468 _downloadOptions = null;
469
470 _url = 'users/me/calendarList/' + common_internal.Escaper.ecapeVariable('$ca lendarId');
471
472 var _response = _requester.request(_url,
473 "DELETE",
474 body: _body,
475 queryParams: _queryParams,
476 uploadOptions: _uploadOptions,
477 uploadMedia: _uploadMedia,
478 downloadOptions: _downloadOptions);
479 return _response.then((data) => null);
480 }
481
482 /**
483 * Returns an entry on the user's calendar list.
484 *
485 * Request parameters:
486 *
487 * [calendarId] - Calendar identifier.
488 *
489 * Completes with a [CalendarListEntry].
490 *
491 * Completes with a [common.ApiRequestError] if the API endpoint returned an
492 * error.
493 *
494 * If the used [http.Client] completes with an error when making a REST call,
495 * this method will complete with the same error.
496 */
497 async.Future<CalendarListEntry> get(core.String calendarId) {
498 var _url = null;
499 var _queryParams = new core.Map();
500 var _uploadMedia = null;
501 var _uploadOptions = null;
502 var _downloadOptions = common.DownloadOptions.Metadata;
503 var _body = null;
504
505 if (calendarId == null) {
506 throw new core.ArgumentError("Parameter calendarId is required.");
507 }
508
509
510 _url = 'users/me/calendarList/' + common_internal.Escaper.ecapeVariable('$ca lendarId');
511
512 var _response = _requester.request(_url,
513 "GET",
514 body: _body,
515 queryParams: _queryParams,
516 uploadOptions: _uploadOptions,
517 uploadMedia: _uploadMedia,
518 downloadOptions: _downloadOptions);
519 return _response.then((data) => new CalendarListEntry.fromJson(data));
520 }
521
522 /**
523 * Adds an entry to the user's calendar list.
524 *
525 * [request] - The metadata request object.
526 *
527 * Request parameters:
528 *
529 * [colorRgbFormat] - Whether to use the foregroundColor and backgroundColor
530 * fields to write the calendar colors (RGB). If this feature is used, the
531 * index-based colorId field will be set to the best matching option
532 * automatically. Optional. The default is False.
533 *
534 * Completes with a [CalendarListEntry].
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<CalendarListEntry> insert(CalendarListEntry request, {core.bool c olorRgbFormat}) {
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 (request != null) {
551 _body = convert.JSON.encode((request).toJson());
552 }
553 if (colorRgbFormat != null) {
554 _queryParams["colorRgbFormat"] = ["${colorRgbFormat}"];
555 }
556
557
558 _url = 'users/me/calendarList';
559
560 var _response = _requester.request(_url,
561 "POST",
562 body: _body,
563 queryParams: _queryParams,
564 uploadOptions: _uploadOptions,
565 uploadMedia: _uploadMedia,
566 downloadOptions: _downloadOptions);
567 return _response.then((data) => new CalendarListEntry.fromJson(data));
568 }
569
570 /**
571 * Returns entries on the user's calendar list.
572 *
573 * Request parameters:
574 *
575 * [maxResults] - Maximum number of entries returned on one result page. By
576 * default the value is 100 entries. The page size can never be larger than
577 * 250 entries. Optional.
578 *
579 * [minAccessRole] - The minimum access role for the user in the returned
580 * entires. Optional. The default is no restriction.
581 * Possible string values are:
582 * - "freeBusyReader" : The user can read free/busy information.
583 * - "owner" : The user can read and modify events and access control lists.
584 * - "reader" : The user can read events that are not private.
585 * - "writer" : The user can read and modify events.
586 *
587 * [pageToken] - Token specifying which result page to return. Optional.
588 *
589 * [showDeleted] - Whether to include deleted calendar list entries in the
590 * result. Optional. The default is False.
591 *
592 * [showHidden] - Whether to show hidden entries. Optional. The default is
593 * False.
594 *
595 * [syncToken] - Token obtained from the nextSyncToken field returned on the
596 * last page of results from the previous list request. It makes the result of
597 * this list request contain only entries that have changed since then. If
598 * only read-only fields such as calendar properties or ACLs have changed, the
599 * entry won't be returned. All entries deleted and hidden since the previous
600 * list request will always be in the result set and it is not allowed to set
601 * showDeleted neither showHidden to False.
602 * To ensure client state consistency minAccessRole query parameter cannot be
603 * specified together with nextSyncToken.
604 * If the syncToken expires, the server will respond with a 410 GONE response
605 * code and the client should clear its storage and perform a full
606 * synchronization without any syncToken.
607 * Learn more about incremental synchronization.
608 * Optional. The default is to return all entries.
609 *
610 * Completes with a [CalendarList].
611 *
612 * Completes with a [common.ApiRequestError] if the API endpoint returned an
613 * error.
614 *
615 * If the used [http.Client] completes with an error when making a REST call,
616 * this method will complete with the same error.
617 */
618 async.Future<CalendarList> list({core.int maxResults, core.String minAccessRol e, core.String pageToken, core.bool showDeleted, core.bool showHidden, core.Stri ng syncToken}) {
619 var _url = null;
620 var _queryParams = new core.Map();
621 var _uploadMedia = null;
622 var _uploadOptions = null;
623 var _downloadOptions = common.DownloadOptions.Metadata;
624 var _body = null;
625
626 if (maxResults != null) {
627 _queryParams["maxResults"] = ["${maxResults}"];
628 }
629 if (minAccessRole != null) {
630 _queryParams["minAccessRole"] = [minAccessRole];
631 }
632 if (pageToken != null) {
633 _queryParams["pageToken"] = [pageToken];
634 }
635 if (showDeleted != null) {
636 _queryParams["showDeleted"] = ["${showDeleted}"];
637 }
638 if (showHidden != null) {
639 _queryParams["showHidden"] = ["${showHidden}"];
640 }
641 if (syncToken != null) {
642 _queryParams["syncToken"] = [syncToken];
643 }
644
645
646 _url = 'users/me/calendarList';
647
648 var _response = _requester.request(_url,
649 "GET",
650 body: _body,
651 queryParams: _queryParams,
652 uploadOptions: _uploadOptions,
653 uploadMedia: _uploadMedia,
654 downloadOptions: _downloadOptions);
655 return _response.then((data) => new CalendarList.fromJson(data));
656 }
657
658 /**
659 * Updates an entry on the user's calendar list. This method supports patch
660 * semantics.
661 *
662 * [request] - The metadata request object.
663 *
664 * Request parameters:
665 *
666 * [calendarId] - Calendar identifier.
667 *
668 * [colorRgbFormat] - Whether to use the foregroundColor and backgroundColor
669 * fields to write the calendar colors (RGB). If this feature is used, the
670 * index-based colorId field will be set to the best matching option
671 * automatically. Optional. The default is False.
672 *
673 * Completes with a [CalendarListEntry].
674 *
675 * Completes with a [common.ApiRequestError] if the API endpoint returned an
676 * error.
677 *
678 * If the used [http.Client] completes with an error when making a REST call,
679 * this method will complete with the same error.
680 */
681 async.Future<CalendarListEntry> patch(CalendarListEntry request, core.String c alendarId, {core.bool colorRgbFormat}) {
682 var _url = null;
683 var _queryParams = new core.Map();
684 var _uploadMedia = null;
685 var _uploadOptions = null;
686 var _downloadOptions = common.DownloadOptions.Metadata;
687 var _body = null;
688
689 if (request != null) {
690 _body = convert.JSON.encode((request).toJson());
691 }
692 if (calendarId == null) {
693 throw new core.ArgumentError("Parameter calendarId is required.");
694 }
695 if (colorRgbFormat != null) {
696 _queryParams["colorRgbFormat"] = ["${colorRgbFormat}"];
697 }
698
699
700 _url = 'users/me/calendarList/' + common_internal.Escaper.ecapeVariable('$ca lendarId');
701
702 var _response = _requester.request(_url,
703 "PATCH",
704 body: _body,
705 queryParams: _queryParams,
706 uploadOptions: _uploadOptions,
707 uploadMedia: _uploadMedia,
708 downloadOptions: _downloadOptions);
709 return _response.then((data) => new CalendarListEntry.fromJson(data));
710 }
711
712 /**
713 * Updates an entry on the user's calendar list.
714 *
715 * [request] - The metadata request object.
716 *
717 * Request parameters:
718 *
719 * [calendarId] - Calendar identifier.
720 *
721 * [colorRgbFormat] - Whether to use the foregroundColor and backgroundColor
722 * fields to write the calendar colors (RGB). If this feature is used, the
723 * index-based colorId field will be set to the best matching option
724 * automatically. Optional. The default is False.
725 *
726 * Completes with a [CalendarListEntry].
727 *
728 * Completes with a [common.ApiRequestError] if the API endpoint returned an
729 * error.
730 *
731 * If the used [http.Client] completes with an error when making a REST call,
732 * this method will complete with the same error.
733 */
734 async.Future<CalendarListEntry> update(CalendarListEntry request, core.String calendarId, {core.bool colorRgbFormat}) {
735 var _url = null;
736 var _queryParams = new core.Map();
737 var _uploadMedia = null;
738 var _uploadOptions = null;
739 var _downloadOptions = common.DownloadOptions.Metadata;
740 var _body = null;
741
742 if (request != null) {
743 _body = convert.JSON.encode((request).toJson());
744 }
745 if (calendarId == null) {
746 throw new core.ArgumentError("Parameter calendarId is required.");
747 }
748 if (colorRgbFormat != null) {
749 _queryParams["colorRgbFormat"] = ["${colorRgbFormat}"];
750 }
751
752
753 _url = 'users/me/calendarList/' + common_internal.Escaper.ecapeVariable('$ca lendarId');
754
755 var _response = _requester.request(_url,
756 "PUT",
757 body: _body,
758 queryParams: _queryParams,
759 uploadOptions: _uploadOptions,
760 uploadMedia: _uploadMedia,
761 downloadOptions: _downloadOptions);
762 return _response.then((data) => new CalendarListEntry.fromJson(data));
763 }
764
765 /**
766 * Watch for changes to CalendarList resources.
767 *
768 * [request] - The metadata request object.
769 *
770 * Request parameters:
771 *
772 * [maxResults] - Maximum number of entries returned on one result page. By
773 * default the value is 100 entries. The page size can never be larger than
774 * 250 entries. Optional.
775 *
776 * [minAccessRole] - The minimum access role for the user in the returned
777 * entires. Optional. The default is no restriction.
778 * Possible string values are:
779 * - "freeBusyReader" : The user can read free/busy information.
780 * - "owner" : The user can read and modify events and access control lists.
781 * - "reader" : The user can read events that are not private.
782 * - "writer" : The user can read and modify events.
783 *
784 * [pageToken] - Token specifying which result page to return. Optional.
785 *
786 * [showDeleted] - Whether to include deleted calendar list entries in the
787 * result. Optional. The default is False.
788 *
789 * [showHidden] - Whether to show hidden entries. Optional. The default is
790 * False.
791 *
792 * [syncToken] - Token obtained from the nextSyncToken field returned on the
793 * last page of results from the previous list request. It makes the result of
794 * this list request contain only entries that have changed since then. If
795 * only read-only fields such as calendar properties or ACLs have changed, the
796 * entry won't be returned. All entries deleted and hidden since the previous
797 * list request will always be in the result set and it is not allowed to set
798 * showDeleted neither showHidden to False.
799 * To ensure client state consistency minAccessRole query parameter cannot be
800 * specified together with nextSyncToken.
801 * If the syncToken expires, the server will respond with a 410 GONE response
802 * code and the client should clear its storage and perform a full
803 * synchronization without any syncToken.
804 * Learn more about incremental synchronization.
805 * Optional. The default is to return all entries.
806 *
807 * Completes with a [Channel].
808 *
809 * Completes with a [common.ApiRequestError] if the API endpoint returned an
810 * error.
811 *
812 * If the used [http.Client] completes with an error when making a REST call,
813 * this method will complete with the same error.
814 */
815 async.Future<Channel> watch(Channel request, {core.int maxResults, core.String minAccessRole, core.String pageToken, core.bool showDeleted, core.bool showHidd en, core.String syncToken}) {
816 var _url = null;
817 var _queryParams = new core.Map();
818 var _uploadMedia = null;
819 var _uploadOptions = null;
820 var _downloadOptions = common.DownloadOptions.Metadata;
821 var _body = null;
822
823 if (request != null) {
824 _body = convert.JSON.encode((request).toJson());
825 }
826 if (maxResults != null) {
827 _queryParams["maxResults"] = ["${maxResults}"];
828 }
829 if (minAccessRole != null) {
830 _queryParams["minAccessRole"] = [minAccessRole];
831 }
832 if (pageToken != null) {
833 _queryParams["pageToken"] = [pageToken];
834 }
835 if (showDeleted != null) {
836 _queryParams["showDeleted"] = ["${showDeleted}"];
837 }
838 if (showHidden != null) {
839 _queryParams["showHidden"] = ["${showHidden}"];
840 }
841 if (syncToken != null) {
842 _queryParams["syncToken"] = [syncToken];
843 }
844
845
846 _url = 'users/me/calendarList/watch';
847
848 var _response = _requester.request(_url,
849 "POST",
850 body: _body,
851 queryParams: _queryParams,
852 uploadOptions: _uploadOptions,
853 uploadMedia: _uploadMedia,
854 downloadOptions: _downloadOptions);
855 return _response.then((data) => new Channel.fromJson(data));
856 }
857
858 }
859
860
861 /** Not documented yet. */
862 class CalendarsResourceApi {
863 final common_internal.ApiRequester _requester;
864
865 CalendarsResourceApi(common_internal.ApiRequester client) :
866 _requester = client;
867
868 /**
869 * Clears a primary calendar. This operation deletes all data associated with
870 * the primary calendar of an account and cannot be undone.
871 *
872 * Request parameters:
873 *
874 * [calendarId] - Calendar identifier.
875 *
876 * Completes with a [common.ApiRequestError] if the API endpoint returned an
877 * error.
878 *
879 * If the used [http.Client] completes with an error when making a REST call,
880 * this method will complete with the same error.
881 */
882 async.Future clear(core.String calendarId) {
883 var _url = null;
884 var _queryParams = new core.Map();
885 var _uploadMedia = null;
886 var _uploadOptions = null;
887 var _downloadOptions = common.DownloadOptions.Metadata;
888 var _body = null;
889
890 if (calendarId == null) {
891 throw new core.ArgumentError("Parameter calendarId is required.");
892 }
893
894 _downloadOptions = null;
895
896 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/clear';
897
898 var _response = _requester.request(_url,
899 "POST",
900 body: _body,
901 queryParams: _queryParams,
902 uploadOptions: _uploadOptions,
903 uploadMedia: _uploadMedia,
904 downloadOptions: _downloadOptions);
905 return _response.then((data) => null);
906 }
907
908 /**
909 * Deletes a secondary calendar.
910 *
911 * Request parameters:
912 *
913 * [calendarId] - Calendar identifier.
914 *
915 * Completes with a [common.ApiRequestError] if the API endpoint returned an
916 * error.
917 *
918 * If the used [http.Client] completes with an error when making a REST call,
919 * this method will complete with the same error.
920 */
921 async.Future delete(core.String calendarId) {
922 var _url = null;
923 var _queryParams = new core.Map();
924 var _uploadMedia = null;
925 var _uploadOptions = null;
926 var _downloadOptions = common.DownloadOptions.Metadata;
927 var _body = null;
928
929 if (calendarId == null) {
930 throw new core.ArgumentError("Parameter calendarId is required.");
931 }
932
933 _downloadOptions = null;
934
935 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId');
936
937 var _response = _requester.request(_url,
938 "DELETE",
939 body: _body,
940 queryParams: _queryParams,
941 uploadOptions: _uploadOptions,
942 uploadMedia: _uploadMedia,
943 downloadOptions: _downloadOptions);
944 return _response.then((data) => null);
945 }
946
947 /**
948 * Returns metadata for a calendar.
949 *
950 * Request parameters:
951 *
952 * [calendarId] - Calendar identifier.
953 *
954 * Completes with a [Calendar].
955 *
956 * Completes with a [common.ApiRequestError] if the API endpoint returned an
957 * error.
958 *
959 * If the used [http.Client] completes with an error when making a REST call,
960 * this method will complete with the same error.
961 */
962 async.Future<Calendar> get(core.String calendarId) {
963 var _url = null;
964 var _queryParams = new core.Map();
965 var _uploadMedia = null;
966 var _uploadOptions = null;
967 var _downloadOptions = common.DownloadOptions.Metadata;
968 var _body = null;
969
970 if (calendarId == null) {
971 throw new core.ArgumentError("Parameter calendarId is required.");
972 }
973
974
975 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId');
976
977 var _response = _requester.request(_url,
978 "GET",
979 body: _body,
980 queryParams: _queryParams,
981 uploadOptions: _uploadOptions,
982 uploadMedia: _uploadMedia,
983 downloadOptions: _downloadOptions);
984 return _response.then((data) => new Calendar.fromJson(data));
985 }
986
987 /**
988 * Creates a secondary calendar.
989 *
990 * [request] - The metadata request object.
991 *
992 * Request parameters:
993 *
994 * Completes with a [Calendar].
995 *
996 * Completes with a [common.ApiRequestError] if the API endpoint returned an
997 * error.
998 *
999 * If the used [http.Client] completes with an error when making a REST call,
1000 * this method will complete with the same error.
1001 */
1002 async.Future<Calendar> insert(Calendar request) {
1003 var _url = null;
1004 var _queryParams = new core.Map();
1005 var _uploadMedia = null;
1006 var _uploadOptions = null;
1007 var _downloadOptions = common.DownloadOptions.Metadata;
1008 var _body = null;
1009
1010 if (request != null) {
1011 _body = convert.JSON.encode((request).toJson());
1012 }
1013
1014
1015 _url = 'calendars';
1016
1017 var _response = _requester.request(_url,
1018 "POST",
1019 body: _body,
1020 queryParams: _queryParams,
1021 uploadOptions: _uploadOptions,
1022 uploadMedia: _uploadMedia,
1023 downloadOptions: _downloadOptions);
1024 return _response.then((data) => new Calendar.fromJson(data));
1025 }
1026
1027 /**
1028 * Updates metadata for a calendar. This method supports patch semantics.
1029 *
1030 * [request] - The metadata request object.
1031 *
1032 * Request parameters:
1033 *
1034 * [calendarId] - Calendar identifier.
1035 *
1036 * Completes with a [Calendar].
1037 *
1038 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1039 * error.
1040 *
1041 * If the used [http.Client] completes with an error when making a REST call,
1042 * this method will complete with the same error.
1043 */
1044 async.Future<Calendar> patch(Calendar request, core.String calendarId) {
1045 var _url = null;
1046 var _queryParams = new core.Map();
1047 var _uploadMedia = null;
1048 var _uploadOptions = null;
1049 var _downloadOptions = common.DownloadOptions.Metadata;
1050 var _body = null;
1051
1052 if (request != null) {
1053 _body = convert.JSON.encode((request).toJson());
1054 }
1055 if (calendarId == null) {
1056 throw new core.ArgumentError("Parameter calendarId is required.");
1057 }
1058
1059
1060 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId');
1061
1062 var _response = _requester.request(_url,
1063 "PATCH",
1064 body: _body,
1065 queryParams: _queryParams,
1066 uploadOptions: _uploadOptions,
1067 uploadMedia: _uploadMedia,
1068 downloadOptions: _downloadOptions);
1069 return _response.then((data) => new Calendar.fromJson(data));
1070 }
1071
1072 /**
1073 * Updates metadata for a calendar.
1074 *
1075 * [request] - The metadata request object.
1076 *
1077 * Request parameters:
1078 *
1079 * [calendarId] - Calendar identifier.
1080 *
1081 * Completes with a [Calendar].
1082 *
1083 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1084 * error.
1085 *
1086 * If the used [http.Client] completes with an error when making a REST call,
1087 * this method will complete with the same error.
1088 */
1089 async.Future<Calendar> update(Calendar request, core.String calendarId) {
1090 var _url = null;
1091 var _queryParams = new core.Map();
1092 var _uploadMedia = null;
1093 var _uploadOptions = null;
1094 var _downloadOptions = common.DownloadOptions.Metadata;
1095 var _body = null;
1096
1097 if (request != null) {
1098 _body = convert.JSON.encode((request).toJson());
1099 }
1100 if (calendarId == null) {
1101 throw new core.ArgumentError("Parameter calendarId is required.");
1102 }
1103
1104
1105 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId');
1106
1107 var _response = _requester.request(_url,
1108 "PUT",
1109 body: _body,
1110 queryParams: _queryParams,
1111 uploadOptions: _uploadOptions,
1112 uploadMedia: _uploadMedia,
1113 downloadOptions: _downloadOptions);
1114 return _response.then((data) => new Calendar.fromJson(data));
1115 }
1116
1117 }
1118
1119
1120 /** Not documented yet. */
1121 class ChannelsResourceApi {
1122 final common_internal.ApiRequester _requester;
1123
1124 ChannelsResourceApi(common_internal.ApiRequester client) :
1125 _requester = client;
1126
1127 /**
1128 * Stop watching resources through this channel
1129 *
1130 * [request] - The metadata request object.
1131 *
1132 * Request parameters:
1133 *
1134 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1135 * error.
1136 *
1137 * If the used [http.Client] completes with an error when making a REST call,
1138 * this method will complete with the same error.
1139 */
1140 async.Future stop(Channel request) {
1141 var _url = null;
1142 var _queryParams = new core.Map();
1143 var _uploadMedia = null;
1144 var _uploadOptions = null;
1145 var _downloadOptions = common.DownloadOptions.Metadata;
1146 var _body = null;
1147
1148 if (request != null) {
1149 _body = convert.JSON.encode((request).toJson());
1150 }
1151
1152 _downloadOptions = null;
1153
1154 _url = 'channels/stop';
1155
1156 var _response = _requester.request(_url,
1157 "POST",
1158 body: _body,
1159 queryParams: _queryParams,
1160 uploadOptions: _uploadOptions,
1161 uploadMedia: _uploadMedia,
1162 downloadOptions: _downloadOptions);
1163 return _response.then((data) => null);
1164 }
1165
1166 }
1167
1168
1169 /** Not documented yet. */
1170 class ColorsResourceApi {
1171 final common_internal.ApiRequester _requester;
1172
1173 ColorsResourceApi(common_internal.ApiRequester client) :
1174 _requester = client;
1175
1176 /**
1177 * Returns the color definitions for calendars and events.
1178 *
1179 * Request parameters:
1180 *
1181 * Completes with a [Colors].
1182 *
1183 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1184 * error.
1185 *
1186 * If the used [http.Client] completes with an error when making a REST call,
1187 * this method will complete with the same error.
1188 */
1189 async.Future<Colors> get() {
1190 var _url = null;
1191 var _queryParams = new core.Map();
1192 var _uploadMedia = null;
1193 var _uploadOptions = null;
1194 var _downloadOptions = common.DownloadOptions.Metadata;
1195 var _body = null;
1196
1197
1198
1199 _url = 'colors';
1200
1201 var _response = _requester.request(_url,
1202 "GET",
1203 body: _body,
1204 queryParams: _queryParams,
1205 uploadOptions: _uploadOptions,
1206 uploadMedia: _uploadMedia,
1207 downloadOptions: _downloadOptions);
1208 return _response.then((data) => new Colors.fromJson(data));
1209 }
1210
1211 }
1212
1213
1214 /** Not documented yet. */
1215 class EventsResourceApi {
1216 final common_internal.ApiRequester _requester;
1217
1218 EventsResourceApi(common_internal.ApiRequester client) :
1219 _requester = client;
1220
1221 /**
1222 * Deletes an event.
1223 *
1224 * Request parameters:
1225 *
1226 * [calendarId] - Calendar identifier.
1227 *
1228 * [eventId] - Event identifier.
1229 *
1230 * [sendNotifications] - Whether to send notifications about the deletion of
1231 * the event. Optional. The default is False.
1232 *
1233 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1234 * error.
1235 *
1236 * If the used [http.Client] completes with an error when making a REST call,
1237 * this method will complete with the same error.
1238 */
1239 async.Future delete(core.String calendarId, core.String eventId, {core.bool se ndNotifications}) {
1240 var _url = null;
1241 var _queryParams = new core.Map();
1242 var _uploadMedia = null;
1243 var _uploadOptions = null;
1244 var _downloadOptions = common.DownloadOptions.Metadata;
1245 var _body = null;
1246
1247 if (calendarId == null) {
1248 throw new core.ArgumentError("Parameter calendarId is required.");
1249 }
1250 if (eventId == null) {
1251 throw new core.ArgumentError("Parameter eventId is required.");
1252 }
1253 if (sendNotifications != null) {
1254 _queryParams["sendNotifications"] = ["${sendNotifications}"];
1255 }
1256
1257 _downloadOptions = null;
1258
1259 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/events/' + common_internal.Escaper.ecapeVariable('$eventId');
1260
1261 var _response = _requester.request(_url,
1262 "DELETE",
1263 body: _body,
1264 queryParams: _queryParams,
1265 uploadOptions: _uploadOptions,
1266 uploadMedia: _uploadMedia,
1267 downloadOptions: _downloadOptions);
1268 return _response.then((data) => null);
1269 }
1270
1271 /**
1272 * Returns an event.
1273 *
1274 * Request parameters:
1275 *
1276 * [calendarId] - Calendar identifier.
1277 *
1278 * [eventId] - Event identifier.
1279 *
1280 * [alwaysIncludeEmail] - Whether to always include a value in the email field
1281 * for the organizer, creator and attendees, even if no real email is
1282 * available (i.e. a generated, non-working value will be provided). The use
1283 * of this option is discouraged and should only be used by clients which
1284 * cannot handle the absence of an email address value in the mentioned
1285 * places. Optional. The default is False.
1286 *
1287 * [maxAttendees] - The maximum number of attendees to include in the
1288 * response. If there are more than the specified number of attendees, only
1289 * the participant is returned. Optional.
1290 *
1291 * [timeZone] - Time zone used in the response. Optional. The default is the
1292 * time zone of the calendar.
1293 *
1294 * Completes with a [Event].
1295 *
1296 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1297 * error.
1298 *
1299 * If the used [http.Client] completes with an error when making a REST call,
1300 * this method will complete with the same error.
1301 */
1302 async.Future<Event> get(core.String calendarId, core.String eventId, {core.boo l alwaysIncludeEmail, core.int maxAttendees, core.String timeZone}) {
1303 var _url = null;
1304 var _queryParams = new core.Map();
1305 var _uploadMedia = null;
1306 var _uploadOptions = null;
1307 var _downloadOptions = common.DownloadOptions.Metadata;
1308 var _body = null;
1309
1310 if (calendarId == null) {
1311 throw new core.ArgumentError("Parameter calendarId is required.");
1312 }
1313 if (eventId == null) {
1314 throw new core.ArgumentError("Parameter eventId is required.");
1315 }
1316 if (alwaysIncludeEmail != null) {
1317 _queryParams["alwaysIncludeEmail"] = ["${alwaysIncludeEmail}"];
1318 }
1319 if (maxAttendees != null) {
1320 _queryParams["maxAttendees"] = ["${maxAttendees}"];
1321 }
1322 if (timeZone != null) {
1323 _queryParams["timeZone"] = [timeZone];
1324 }
1325
1326
1327 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/events/' + common_internal.Escaper.ecapeVariable('$eventId');
1328
1329 var _response = _requester.request(_url,
1330 "GET",
1331 body: _body,
1332 queryParams: _queryParams,
1333 uploadOptions: _uploadOptions,
1334 uploadMedia: _uploadMedia,
1335 downloadOptions: _downloadOptions);
1336 return _response.then((data) => new Event.fromJson(data));
1337 }
1338
1339 /**
1340 * Imports an event. This operation is used to add a private copy of an
1341 * existing event to a calendar.
1342 *
1343 * [request] - The metadata request object.
1344 *
1345 * Request parameters:
1346 *
1347 * [calendarId] - Calendar identifier.
1348 *
1349 * Completes with a [Event].
1350 *
1351 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1352 * error.
1353 *
1354 * If the used [http.Client] completes with an error when making a REST call,
1355 * this method will complete with the same error.
1356 */
1357 async.Future<Event> import(Event request, core.String calendarId) {
1358 var _url = null;
1359 var _queryParams = new core.Map();
1360 var _uploadMedia = null;
1361 var _uploadOptions = null;
1362 var _downloadOptions = common.DownloadOptions.Metadata;
1363 var _body = null;
1364
1365 if (request != null) {
1366 _body = convert.JSON.encode((request).toJson());
1367 }
1368 if (calendarId == null) {
1369 throw new core.ArgumentError("Parameter calendarId is required.");
1370 }
1371
1372
1373 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/events/import';
1374
1375 var _response = _requester.request(_url,
1376 "POST",
1377 body: _body,
1378 queryParams: _queryParams,
1379 uploadOptions: _uploadOptions,
1380 uploadMedia: _uploadMedia,
1381 downloadOptions: _downloadOptions);
1382 return _response.then((data) => new Event.fromJson(data));
1383 }
1384
1385 /**
1386 * Creates an event.
1387 *
1388 * [request] - The metadata request object.
1389 *
1390 * Request parameters:
1391 *
1392 * [calendarId] - Calendar identifier.
1393 *
1394 * [maxAttendees] - The maximum number of attendees to include in the
1395 * response. If there are more than the specified number of attendees, only
1396 * the participant is returned. Optional.
1397 *
1398 * [sendNotifications] - Whether to send notifications about the creation of
1399 * the new event. Optional. The default is False.
1400 *
1401 * Completes with a [Event].
1402 *
1403 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1404 * error.
1405 *
1406 * If the used [http.Client] completes with an error when making a REST call,
1407 * this method will complete with the same error.
1408 */
1409 async.Future<Event> insert(Event request, core.String calendarId, {core.int ma xAttendees, core.bool sendNotifications}) {
1410 var _url = null;
1411 var _queryParams = new core.Map();
1412 var _uploadMedia = null;
1413 var _uploadOptions = null;
1414 var _downloadOptions = common.DownloadOptions.Metadata;
1415 var _body = null;
1416
1417 if (request != null) {
1418 _body = convert.JSON.encode((request).toJson());
1419 }
1420 if (calendarId == null) {
1421 throw new core.ArgumentError("Parameter calendarId is required.");
1422 }
1423 if (maxAttendees != null) {
1424 _queryParams["maxAttendees"] = ["${maxAttendees}"];
1425 }
1426 if (sendNotifications != null) {
1427 _queryParams["sendNotifications"] = ["${sendNotifications}"];
1428 }
1429
1430
1431 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/events';
1432
1433 var _response = _requester.request(_url,
1434 "POST",
1435 body: _body,
1436 queryParams: _queryParams,
1437 uploadOptions: _uploadOptions,
1438 uploadMedia: _uploadMedia,
1439 downloadOptions: _downloadOptions);
1440 return _response.then((data) => new Event.fromJson(data));
1441 }
1442
1443 /**
1444 * Returns instances of the specified recurring event.
1445 *
1446 * Request parameters:
1447 *
1448 * [calendarId] - Calendar identifier.
1449 *
1450 * [eventId] - Recurring event identifier.
1451 *
1452 * [alwaysIncludeEmail] - Whether to always include a value in the email field
1453 * for the organizer, creator and attendees, even if no real email is
1454 * available (i.e. a generated, non-working value will be provided). The use
1455 * of this option is discouraged and should only be used by clients which
1456 * cannot handle the absence of an email address value in the mentioned
1457 * places. Optional. The default is False.
1458 *
1459 * [maxAttendees] - The maximum number of attendees to include in the
1460 * response. If there are more than the specified number of attendees, only
1461 * the participant is returned. Optional.
1462 *
1463 * [maxResults] - Maximum number of events returned on one result page. By
1464 * default the value is 250 events. The page size can never be larger than
1465 * 2500 events. Optional.
1466 *
1467 * [originalStart] - The original start time of the instance in the result.
1468 * Optional.
1469 *
1470 * [pageToken] - Token specifying which result page to return. Optional.
1471 *
1472 * [showDeleted] - Whether to include deleted events (with status equals
1473 * "cancelled") in the result. Cancelled instances of recurring events will
1474 * still be included if singleEvents is False. Optional. The default is False.
1475 *
1476 * [timeMax] - Upper bound (exclusive) for an event's start time to filter by.
1477 * Optional. The default is not to filter by start time.
1478 *
1479 * [timeMin] - Lower bound (inclusive) for an event's end time to filter by.
1480 * Optional. The default is not to filter by end time.
1481 *
1482 * [timeZone] - Time zone used in the response. Optional. The default is the
1483 * time zone of the calendar.
1484 *
1485 * Completes with a [Events].
1486 *
1487 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1488 * error.
1489 *
1490 * If the used [http.Client] completes with an error when making a REST call,
1491 * this method will complete with the same error.
1492 */
1493 async.Future<Events> instances(core.String calendarId, core.String eventId, {c ore.bool alwaysIncludeEmail, core.int maxAttendees, core.int maxResults, core.St ring originalStart, core.String pageToken, core.bool showDeleted, core.DateTime timeMax, core.DateTime timeMin, core.String timeZone}) {
1494 var _url = null;
1495 var _queryParams = new core.Map();
1496 var _uploadMedia = null;
1497 var _uploadOptions = null;
1498 var _downloadOptions = common.DownloadOptions.Metadata;
1499 var _body = null;
1500
1501 if (calendarId == null) {
1502 throw new core.ArgumentError("Parameter calendarId is required.");
1503 }
1504 if (eventId == null) {
1505 throw new core.ArgumentError("Parameter eventId is required.");
1506 }
1507 if (alwaysIncludeEmail != null) {
1508 _queryParams["alwaysIncludeEmail"] = ["${alwaysIncludeEmail}"];
1509 }
1510 if (maxAttendees != null) {
1511 _queryParams["maxAttendees"] = ["${maxAttendees}"];
1512 }
1513 if (maxResults != null) {
1514 _queryParams["maxResults"] = ["${maxResults}"];
1515 }
1516 if (originalStart != null) {
1517 _queryParams["originalStart"] = [originalStart];
1518 }
1519 if (pageToken != null) {
1520 _queryParams["pageToken"] = [pageToken];
1521 }
1522 if (showDeleted != null) {
1523 _queryParams["showDeleted"] = ["${showDeleted}"];
1524 }
1525 if (timeMax != null) {
1526 _queryParams["timeMax"] = [(timeMax).toIso8601String()];
1527 }
1528 if (timeMin != null) {
1529 _queryParams["timeMin"] = [(timeMin).toIso8601String()];
1530 }
1531 if (timeZone != null) {
1532 _queryParams["timeZone"] = [timeZone];
1533 }
1534
1535
1536 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/events/' + common_internal.Escaper.ecapeVariable('$eventId') + '/instances';
1537
1538 var _response = _requester.request(_url,
1539 "GET",
1540 body: _body,
1541 queryParams: _queryParams,
1542 uploadOptions: _uploadOptions,
1543 uploadMedia: _uploadMedia,
1544 downloadOptions: _downloadOptions);
1545 return _response.then((data) => new Events.fromJson(data));
1546 }
1547
1548 /**
1549 * Returns events on the specified calendar.
1550 *
1551 * Request parameters:
1552 *
1553 * [calendarId] - Calendar identifier.
1554 *
1555 * [alwaysIncludeEmail] - Whether to always include a value in the email field
1556 * for the organizer, creator and attendees, even if no real email is
1557 * available (i.e. a generated, non-working value will be provided). The use
1558 * of this option is discouraged and should only be used by clients which
1559 * cannot handle the absence of an email address value in the mentioned
1560 * places. Optional. The default is False.
1561 *
1562 * [iCalUID] - Specifies event ID in the iCalendar format to be included in
1563 * the response. Optional.
1564 *
1565 * [maxAttendees] - The maximum number of attendees to include in the
1566 * response. If there are more than the specified number of attendees, only
1567 * the participant is returned. Optional.
1568 *
1569 * [maxResults] - Maximum number of events returned on one result page. By
1570 * default the value is 250 events. The page size can never be larger than
1571 * 2500 events. Optional.
1572 *
1573 * [orderBy] - The order of the events returned in the result. Optional. The
1574 * default is an unspecified, stable order.
1575 * Possible string values are:
1576 * - "startTime" : Order by the start date/time (ascending). This is only
1577 * available when querying single events (i.e. the parameter singleEvents is
1578 * True)
1579 * - "updated" : Order by last modification time (ascending).
1580 *
1581 * [pageToken] - Token specifying which result page to return. Optional.
1582 *
1583 * [privateExtendedProperty] - Extended properties constraint specified as
1584 * propertyName=value. Matches only private properties. This parameter might
1585 * be repeated multiple times to return events that match all given
1586 * constraints.
1587 *
1588 * [q] - Free text search terms to find events that match these terms in any
1589 * field, except for extended properties. Optional.
1590 *
1591 * [sharedExtendedProperty] - Extended properties constraint specified as
1592 * propertyName=value. Matches only shared properties. This parameter might be
1593 * repeated multiple times to return events that match all given constraints.
1594 *
1595 * [showDeleted] - Whether to include deleted events (with status equals
1596 * "cancelled") in the result. Cancelled instances of recurring events (but
1597 * not the underlying recurring event) will still be included if showDeleted
1598 * and singleEvents are both False. If showDeleted and singleEvents are both
1599 * True, only single instances of deleted events (but not the underlying
1600 * recurring events) are returned. Optional. The default is False.
1601 *
1602 * [showHiddenInvitations] - Whether to include hidden invitations in the
1603 * result. Optional. The default is False.
1604 *
1605 * [singleEvents] - Whether to expand recurring events into instances and only
1606 * return single one-off events and instances of recurring events, but not the
1607 * underlying recurring events themselves. Optional. The default is False.
1608 *
1609 * [syncToken] - Token obtained from the nextSyncToken field returned on the
1610 * last page of results from the previous list request. It makes the result of
1611 * this list request contain only entries that have changed since then. All
1612 * events deleted since the previous list request will always be in the result
1613 * set and it is not allowed to set showDeleted to False.
1614 * There are several query parameters that cannot be specified together with
1615 * nextSyncToken to ensure consistency of the client state.
1616 *
1617 * These are:
1618 * - iCalUID
1619 * - orderBy
1620 * - privateExtendedProperty
1621 * - q
1622 * - sharedExtendedProperty
1623 * - timeMin
1624 * - timeMax
1625 * - updatedMin If the syncToken expires, the server will respond with a 410
1626 * GONE response code and the client should clear its storage and perform a
1627 * full synchronization without any syncToken.
1628 * Learn more about incremental synchronization.
1629 * Optional. The default is to return all entries.
1630 *
1631 * [timeMax] - Upper bound (exclusive) for an event's start time to filter by.
1632 * Optional. The default is not to filter by start time.
1633 *
1634 * [timeMin] - Lower bound (inclusive) for an event's end time to filter by.
1635 * Optional. The default is not to filter by end time.
1636 *
1637 * [timeZone] - Time zone used in the response. Optional. The default is the
1638 * time zone of the calendar.
1639 *
1640 * [updatedMin] - Lower bound for an event's last modification time (as a RFC
1641 * 3339 timestamp) to filter by. When specified, entries deleted since this
1642 * time will always be included regardless of showDeleted. Optional. The
1643 * default is not to filter by last modification time.
1644 *
1645 * Completes with a [Events].
1646 *
1647 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1648 * error.
1649 *
1650 * If the used [http.Client] completes with an error when making a REST call,
1651 * this method will complete with the same error.
1652 */
1653 async.Future<Events> list(core.String calendarId, {core.bool alwaysIncludeEmai l, core.String iCalUID, core.int maxAttendees, core.int maxResults, core.String orderBy, core.String pageToken, core.List<core.String> privateExtendedProperty, core.String q, core.List<core.String> sharedExtendedProperty, core.bool showDele ted, core.bool showHiddenInvitations, core.bool singleEvents, core.String syncTo ken, core.DateTime timeMax, core.DateTime timeMin, core.String timeZone, core.Da teTime updatedMin}) {
1654 var _url = null;
1655 var _queryParams = new core.Map();
1656 var _uploadMedia = null;
1657 var _uploadOptions = null;
1658 var _downloadOptions = common.DownloadOptions.Metadata;
1659 var _body = null;
1660
1661 if (calendarId == null) {
1662 throw new core.ArgumentError("Parameter calendarId is required.");
1663 }
1664 if (alwaysIncludeEmail != null) {
1665 _queryParams["alwaysIncludeEmail"] = ["${alwaysIncludeEmail}"];
1666 }
1667 if (iCalUID != null) {
1668 _queryParams["iCalUID"] = [iCalUID];
1669 }
1670 if (maxAttendees != null) {
1671 _queryParams["maxAttendees"] = ["${maxAttendees}"];
1672 }
1673 if (maxResults != null) {
1674 _queryParams["maxResults"] = ["${maxResults}"];
1675 }
1676 if (orderBy != null) {
1677 _queryParams["orderBy"] = [orderBy];
1678 }
1679 if (pageToken != null) {
1680 _queryParams["pageToken"] = [pageToken];
1681 }
1682 if (privateExtendedProperty != null) {
1683 _queryParams["privateExtendedProperty"] = privateExtendedProperty;
1684 }
1685 if (q != null) {
1686 _queryParams["q"] = [q];
1687 }
1688 if (sharedExtendedProperty != null) {
1689 _queryParams["sharedExtendedProperty"] = sharedExtendedProperty;
1690 }
1691 if (showDeleted != null) {
1692 _queryParams["showDeleted"] = ["${showDeleted}"];
1693 }
1694 if (showHiddenInvitations != null) {
1695 _queryParams["showHiddenInvitations"] = ["${showHiddenInvitations}"];
1696 }
1697 if (singleEvents != null) {
1698 _queryParams["singleEvents"] = ["${singleEvents}"];
1699 }
1700 if (syncToken != null) {
1701 _queryParams["syncToken"] = [syncToken];
1702 }
1703 if (timeMax != null) {
1704 _queryParams["timeMax"] = [(timeMax).toIso8601String()];
1705 }
1706 if (timeMin != null) {
1707 _queryParams["timeMin"] = [(timeMin).toIso8601String()];
1708 }
1709 if (timeZone != null) {
1710 _queryParams["timeZone"] = [timeZone];
1711 }
1712 if (updatedMin != null) {
1713 _queryParams["updatedMin"] = [(updatedMin).toIso8601String()];
1714 }
1715
1716
1717 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/events';
1718
1719 var _response = _requester.request(_url,
1720 "GET",
1721 body: _body,
1722 queryParams: _queryParams,
1723 uploadOptions: _uploadOptions,
1724 uploadMedia: _uploadMedia,
1725 downloadOptions: _downloadOptions);
1726 return _response.then((data) => new Events.fromJson(data));
1727 }
1728
1729 /**
1730 * Moves an event to another calendar, i.e. changes an event's organizer.
1731 *
1732 * Request parameters:
1733 *
1734 * [calendarId] - Calendar identifier of the source calendar where the event
1735 * currently is on.
1736 *
1737 * [eventId] - Event identifier.
1738 *
1739 * [destination] - Calendar identifier of the target calendar where the event
1740 * is to be moved to.
1741 *
1742 * [sendNotifications] - Whether to send notifications about the change of the
1743 * event's organizer. Optional. The default is False.
1744 *
1745 * Completes with a [Event].
1746 *
1747 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1748 * error.
1749 *
1750 * If the used [http.Client] completes with an error when making a REST call,
1751 * this method will complete with the same error.
1752 */
1753 async.Future<Event> move(core.String calendarId, core.String eventId, core.Str ing destination, {core.bool sendNotifications}) {
1754 var _url = null;
1755 var _queryParams = new core.Map();
1756 var _uploadMedia = null;
1757 var _uploadOptions = null;
1758 var _downloadOptions = common.DownloadOptions.Metadata;
1759 var _body = null;
1760
1761 if (calendarId == null) {
1762 throw new core.ArgumentError("Parameter calendarId is required.");
1763 }
1764 if (eventId == null) {
1765 throw new core.ArgumentError("Parameter eventId is required.");
1766 }
1767 if (destination == null) {
1768 throw new core.ArgumentError("Parameter destination is required.");
1769 }
1770 _queryParams["destination"] = [destination];
1771 if (sendNotifications != null) {
1772 _queryParams["sendNotifications"] = ["${sendNotifications}"];
1773 }
1774
1775
1776 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/events/' + common_internal.Escaper.ecapeVariable('$eventId') + '/move';
1777
1778 var _response = _requester.request(_url,
1779 "POST",
1780 body: _body,
1781 queryParams: _queryParams,
1782 uploadOptions: _uploadOptions,
1783 uploadMedia: _uploadMedia,
1784 downloadOptions: _downloadOptions);
1785 return _response.then((data) => new Event.fromJson(data));
1786 }
1787
1788 /**
1789 * Updates an event. This method supports patch semantics.
1790 *
1791 * [request] - The metadata request object.
1792 *
1793 * Request parameters:
1794 *
1795 * [calendarId] - Calendar identifier.
1796 *
1797 * [eventId] - Event identifier.
1798 *
1799 * [alwaysIncludeEmail] - Whether to always include a value in the email field
1800 * for the organizer, creator and attendees, even if no real email is
1801 * available (i.e. a generated, non-working value will be provided). The use
1802 * of this option is discouraged and should only be used by clients which
1803 * cannot handle the absence of an email address value in the mentioned
1804 * places. Optional. The default is False.
1805 *
1806 * [maxAttendees] - The maximum number of attendees to include in the
1807 * response. If there are more than the specified number of attendees, only
1808 * the participant is returned. Optional.
1809 *
1810 * [sendNotifications] - Whether to send notifications about the event update
1811 * (e.g. attendee's responses, title changes, etc.). Optional. The default is
1812 * False.
1813 *
1814 * Completes with a [Event].
1815 *
1816 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1817 * error.
1818 *
1819 * If the used [http.Client] completes with an error when making a REST call,
1820 * this method will complete with the same error.
1821 */
1822 async.Future<Event> patch(Event request, core.String calendarId, core.String e ventId, {core.bool alwaysIncludeEmail, core.int maxAttendees, core.bool sendNoti fications}) {
1823 var _url = null;
1824 var _queryParams = new core.Map();
1825 var _uploadMedia = null;
1826 var _uploadOptions = null;
1827 var _downloadOptions = common.DownloadOptions.Metadata;
1828 var _body = null;
1829
1830 if (request != null) {
1831 _body = convert.JSON.encode((request).toJson());
1832 }
1833 if (calendarId == null) {
1834 throw new core.ArgumentError("Parameter calendarId is required.");
1835 }
1836 if (eventId == null) {
1837 throw new core.ArgumentError("Parameter eventId is required.");
1838 }
1839 if (alwaysIncludeEmail != null) {
1840 _queryParams["alwaysIncludeEmail"] = ["${alwaysIncludeEmail}"];
1841 }
1842 if (maxAttendees != null) {
1843 _queryParams["maxAttendees"] = ["${maxAttendees}"];
1844 }
1845 if (sendNotifications != null) {
1846 _queryParams["sendNotifications"] = ["${sendNotifications}"];
1847 }
1848
1849
1850 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/events/' + common_internal.Escaper.ecapeVariable('$eventId');
1851
1852 var _response = _requester.request(_url,
1853 "PATCH",
1854 body: _body,
1855 queryParams: _queryParams,
1856 uploadOptions: _uploadOptions,
1857 uploadMedia: _uploadMedia,
1858 downloadOptions: _downloadOptions);
1859 return _response.then((data) => new Event.fromJson(data));
1860 }
1861
1862 /**
1863 * Creates an event based on a simple text string.
1864 *
1865 * Request parameters:
1866 *
1867 * [calendarId] - Calendar identifier.
1868 *
1869 * [text] - The text describing the event to be created.
1870 *
1871 * [sendNotifications] - Whether to send notifications about the creation of
1872 * the event. Optional. The default is False.
1873 *
1874 * Completes with a [Event].
1875 *
1876 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1877 * error.
1878 *
1879 * If the used [http.Client] completes with an error when making a REST call,
1880 * this method will complete with the same error.
1881 */
1882 async.Future<Event> quickAdd(core.String calendarId, core.String text, {core.b ool sendNotifications}) {
1883 var _url = null;
1884 var _queryParams = new core.Map();
1885 var _uploadMedia = null;
1886 var _uploadOptions = null;
1887 var _downloadOptions = common.DownloadOptions.Metadata;
1888 var _body = null;
1889
1890 if (calendarId == null) {
1891 throw new core.ArgumentError("Parameter calendarId is required.");
1892 }
1893 if (text == null) {
1894 throw new core.ArgumentError("Parameter text is required.");
1895 }
1896 _queryParams["text"] = [text];
1897 if (sendNotifications != null) {
1898 _queryParams["sendNotifications"] = ["${sendNotifications}"];
1899 }
1900
1901
1902 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/events/quickAdd';
1903
1904 var _response = _requester.request(_url,
1905 "POST",
1906 body: _body,
1907 queryParams: _queryParams,
1908 uploadOptions: _uploadOptions,
1909 uploadMedia: _uploadMedia,
1910 downloadOptions: _downloadOptions);
1911 return _response.then((data) => new Event.fromJson(data));
1912 }
1913
1914 /**
1915 * Updates an event.
1916 *
1917 * [request] - The metadata request object.
1918 *
1919 * Request parameters:
1920 *
1921 * [calendarId] - Calendar identifier.
1922 *
1923 * [eventId] - Event identifier.
1924 *
1925 * [alwaysIncludeEmail] - Whether to always include a value in the email field
1926 * for the organizer, creator and attendees, even if no real email is
1927 * available (i.e. a generated, non-working value will be provided). The use
1928 * of this option is discouraged and should only be used by clients which
1929 * cannot handle the absence of an email address value in the mentioned
1930 * places. Optional. The default is False.
1931 *
1932 * [maxAttendees] - The maximum number of attendees to include in the
1933 * response. If there are more than the specified number of attendees, only
1934 * the participant is returned. Optional.
1935 *
1936 * [sendNotifications] - Whether to send notifications about the event update
1937 * (e.g. attendee's responses, title changes, etc.). Optional. The default is
1938 * False.
1939 *
1940 * Completes with a [Event].
1941 *
1942 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1943 * error.
1944 *
1945 * If the used [http.Client] completes with an error when making a REST call,
1946 * this method will complete with the same error.
1947 */
1948 async.Future<Event> update(Event request, core.String calendarId, core.String eventId, {core.bool alwaysIncludeEmail, core.int maxAttendees, core.bool sendNot ifications}) {
1949 var _url = null;
1950 var _queryParams = new core.Map();
1951 var _uploadMedia = null;
1952 var _uploadOptions = null;
1953 var _downloadOptions = common.DownloadOptions.Metadata;
1954 var _body = null;
1955
1956 if (request != null) {
1957 _body = convert.JSON.encode((request).toJson());
1958 }
1959 if (calendarId == null) {
1960 throw new core.ArgumentError("Parameter calendarId is required.");
1961 }
1962 if (eventId == null) {
1963 throw new core.ArgumentError("Parameter eventId is required.");
1964 }
1965 if (alwaysIncludeEmail != null) {
1966 _queryParams["alwaysIncludeEmail"] = ["${alwaysIncludeEmail}"];
1967 }
1968 if (maxAttendees != null) {
1969 _queryParams["maxAttendees"] = ["${maxAttendees}"];
1970 }
1971 if (sendNotifications != null) {
1972 _queryParams["sendNotifications"] = ["${sendNotifications}"];
1973 }
1974
1975
1976 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/events/' + common_internal.Escaper.ecapeVariable('$eventId');
1977
1978 var _response = _requester.request(_url,
1979 "PUT",
1980 body: _body,
1981 queryParams: _queryParams,
1982 uploadOptions: _uploadOptions,
1983 uploadMedia: _uploadMedia,
1984 downloadOptions: _downloadOptions);
1985 return _response.then((data) => new Event.fromJson(data));
1986 }
1987
1988 /**
1989 * Watch for changes to Events resources.
1990 *
1991 * [request] - The metadata request object.
1992 *
1993 * Request parameters:
1994 *
1995 * [calendarId] - Calendar identifier.
1996 *
1997 * [alwaysIncludeEmail] - Whether to always include a value in the email field
1998 * for the organizer, creator and attendees, even if no real email is
1999 * available (i.e. a generated, non-working value will be provided). The use
2000 * of this option is discouraged and should only be used by clients which
2001 * cannot handle the absence of an email address value in the mentioned
2002 * places. Optional. The default is False.
2003 *
2004 * [iCalUID] - Specifies event ID in the iCalendar format to be included in
2005 * the response. Optional.
2006 *
2007 * [maxAttendees] - The maximum number of attendees to include in the
2008 * response. If there are more than the specified number of attendees, only
2009 * the participant is returned. Optional.
2010 *
2011 * [maxResults] - Maximum number of events returned on one result page. By
2012 * default the value is 250 events. The page size can never be larger than
2013 * 2500 events. Optional.
2014 *
2015 * [orderBy] - The order of the events returned in the result. Optional. The
2016 * default is an unspecified, stable order.
2017 * Possible string values are:
2018 * - "startTime" : Order by the start date/time (ascending). This is only
2019 * available when querying single events (i.e. the parameter singleEvents is
2020 * True)
2021 * - "updated" : Order by last modification time (ascending).
2022 *
2023 * [pageToken] - Token specifying which result page to return. Optional.
2024 *
2025 * [privateExtendedProperty] - Extended properties constraint specified as
2026 * propertyName=value. Matches only private properties. This parameter might
2027 * be repeated multiple times to return events that match all given
2028 * constraints.
2029 *
2030 * [q] - Free text search terms to find events that match these terms in any
2031 * field, except for extended properties. Optional.
2032 *
2033 * [sharedExtendedProperty] - Extended properties constraint specified as
2034 * propertyName=value. Matches only shared properties. This parameter might be
2035 * repeated multiple times to return events that match all given constraints.
2036 *
2037 * [showDeleted] - Whether to include deleted events (with status equals
2038 * "cancelled") in the result. Cancelled instances of recurring events (but
2039 * not the underlying recurring event) will still be included if showDeleted
2040 * and singleEvents are both False. If showDeleted and singleEvents are both
2041 * True, only single instances of deleted events (but not the underlying
2042 * recurring events) are returned. Optional. The default is False.
2043 *
2044 * [showHiddenInvitations] - Whether to include hidden invitations in the
2045 * result. Optional. The default is False.
2046 *
2047 * [singleEvents] - Whether to expand recurring events into instances and only
2048 * return single one-off events and instances of recurring events, but not the
2049 * underlying recurring events themselves. Optional. The default is False.
2050 *
2051 * [syncToken] - Token obtained from the nextSyncToken field returned on the
2052 * last page of results from the previous list request. It makes the result of
2053 * this list request contain only entries that have changed since then. All
2054 * events deleted since the previous list request will always be in the result
2055 * set and it is not allowed to set showDeleted to False.
2056 * There are several query parameters that cannot be specified together with
2057 * nextSyncToken to ensure consistency of the client state.
2058 *
2059 * These are:
2060 * - iCalUID
2061 * - orderBy
2062 * - privateExtendedProperty
2063 * - q
2064 * - sharedExtendedProperty
2065 * - timeMin
2066 * - timeMax
2067 * - updatedMin If the syncToken expires, the server will respond with a 410
2068 * GONE response code and the client should clear its storage and perform a
2069 * full synchronization without any syncToken.
2070 * Learn more about incremental synchronization.
2071 * Optional. The default is to return all entries.
2072 *
2073 * [timeMax] - Upper bound (exclusive) for an event's start time to filter by.
2074 * Optional. The default is not to filter by start time.
2075 *
2076 * [timeMin] - Lower bound (inclusive) for an event's end time to filter by.
2077 * Optional. The default is not to filter by end time.
2078 *
2079 * [timeZone] - Time zone used in the response. Optional. The default is the
2080 * time zone of the calendar.
2081 *
2082 * [updatedMin] - Lower bound for an event's last modification time (as a RFC
2083 * 3339 timestamp) to filter by. When specified, entries deleted since this
2084 * time will always be included regardless of showDeleted. Optional. The
2085 * default is not to filter by last modification time.
2086 *
2087 * Completes with a [Channel].
2088 *
2089 * Completes with a [common.ApiRequestError] if the API endpoint returned an
2090 * error.
2091 *
2092 * If the used [http.Client] completes with an error when making a REST call,
2093 * this method will complete with the same error.
2094 */
2095 async.Future<Channel> watch(Channel request, core.String calendarId, {core.boo l alwaysIncludeEmail, core.String iCalUID, core.int maxAttendees, core.int maxRe sults, core.String orderBy, core.String pageToken, core.List<core.String> privat eExtendedProperty, core.String q, core.List<core.String> sharedExtendedProperty, core.bool showDeleted, core.bool showHiddenInvitations, core.bool singleEvents, core.String syncToken, core.DateTime timeMax, core.DateTime timeMin, core.Strin g timeZone, core.DateTime updatedMin}) {
2096 var _url = null;
2097 var _queryParams = new core.Map();
2098 var _uploadMedia = null;
2099 var _uploadOptions = null;
2100 var _downloadOptions = common.DownloadOptions.Metadata;
2101 var _body = null;
2102
2103 if (request != null) {
2104 _body = convert.JSON.encode((request).toJson());
2105 }
2106 if (calendarId == null) {
2107 throw new core.ArgumentError("Parameter calendarId is required.");
2108 }
2109 if (alwaysIncludeEmail != null) {
2110 _queryParams["alwaysIncludeEmail"] = ["${alwaysIncludeEmail}"];
2111 }
2112 if (iCalUID != null) {
2113 _queryParams["iCalUID"] = [iCalUID];
2114 }
2115 if (maxAttendees != null) {
2116 _queryParams["maxAttendees"] = ["${maxAttendees}"];
2117 }
2118 if (maxResults != null) {
2119 _queryParams["maxResults"] = ["${maxResults}"];
2120 }
2121 if (orderBy != null) {
2122 _queryParams["orderBy"] = [orderBy];
2123 }
2124 if (pageToken != null) {
2125 _queryParams["pageToken"] = [pageToken];
2126 }
2127 if (privateExtendedProperty != null) {
2128 _queryParams["privateExtendedProperty"] = privateExtendedProperty;
2129 }
2130 if (q != null) {
2131 _queryParams["q"] = [q];
2132 }
2133 if (sharedExtendedProperty != null) {
2134 _queryParams["sharedExtendedProperty"] = sharedExtendedProperty;
2135 }
2136 if (showDeleted != null) {
2137 _queryParams["showDeleted"] = ["${showDeleted}"];
2138 }
2139 if (showHiddenInvitations != null) {
2140 _queryParams["showHiddenInvitations"] = ["${showHiddenInvitations}"];
2141 }
2142 if (singleEvents != null) {
2143 _queryParams["singleEvents"] = ["${singleEvents}"];
2144 }
2145 if (syncToken != null) {
2146 _queryParams["syncToken"] = [syncToken];
2147 }
2148 if (timeMax != null) {
2149 _queryParams["timeMax"] = [(timeMax).toIso8601String()];
2150 }
2151 if (timeMin != null) {
2152 _queryParams["timeMin"] = [(timeMin).toIso8601String()];
2153 }
2154 if (timeZone != null) {
2155 _queryParams["timeZone"] = [timeZone];
2156 }
2157 if (updatedMin != null) {
2158 _queryParams["updatedMin"] = [(updatedMin).toIso8601String()];
2159 }
2160
2161
2162 _url = 'calendars/' + common_internal.Escaper.ecapeVariable('$calendarId') + '/events/watch';
2163
2164 var _response = _requester.request(_url,
2165 "POST",
2166 body: _body,
2167 queryParams: _queryParams,
2168 uploadOptions: _uploadOptions,
2169 uploadMedia: _uploadMedia,
2170 downloadOptions: _downloadOptions);
2171 return _response.then((data) => new Channel.fromJson(data));
2172 }
2173
2174 }
2175
2176
2177 /** Not documented yet. */
2178 class FreebusyResourceApi {
2179 final common_internal.ApiRequester _requester;
2180
2181 FreebusyResourceApi(common_internal.ApiRequester client) :
2182 _requester = client;
2183
2184 /**
2185 * Returns free/busy information for a set of calendars.
2186 *
2187 * [request] - The metadata request object.
2188 *
2189 * Request parameters:
2190 *
2191 * Completes with a [FreeBusyResponse].
2192 *
2193 * Completes with a [common.ApiRequestError] if the API endpoint returned an
2194 * error.
2195 *
2196 * If the used [http.Client] completes with an error when making a REST call,
2197 * this method will complete with the same error.
2198 */
2199 async.Future<FreeBusyResponse> query(FreeBusyRequest request) {
2200 var _url = null;
2201 var _queryParams = new core.Map();
2202 var _uploadMedia = null;
2203 var _uploadOptions = null;
2204 var _downloadOptions = common.DownloadOptions.Metadata;
2205 var _body = null;
2206
2207 if (request != null) {
2208 _body = convert.JSON.encode((request).toJson());
2209 }
2210
2211
2212 _url = 'freeBusy';
2213
2214 var _response = _requester.request(_url,
2215 "POST",
2216 body: _body,
2217 queryParams: _queryParams,
2218 uploadOptions: _uploadOptions,
2219 uploadMedia: _uploadMedia,
2220 downloadOptions: _downloadOptions);
2221 return _response.then((data) => new FreeBusyResponse.fromJson(data));
2222 }
2223
2224 }
2225
2226
2227 /** Not documented yet. */
2228 class SettingsResourceApi {
2229 final common_internal.ApiRequester _requester;
2230
2231 SettingsResourceApi(common_internal.ApiRequester client) :
2232 _requester = client;
2233
2234 /**
2235 * Returns a single user setting.
2236 *
2237 * Request parameters:
2238 *
2239 * [setting] - The id of the user setting.
2240 *
2241 * Completes with a [Setting].
2242 *
2243 * Completes with a [common.ApiRequestError] if the API endpoint returned an
2244 * error.
2245 *
2246 * If the used [http.Client] completes with an error when making a REST call,
2247 * this method will complete with the same error.
2248 */
2249 async.Future<Setting> get(core.String setting) {
2250 var _url = null;
2251 var _queryParams = new core.Map();
2252 var _uploadMedia = null;
2253 var _uploadOptions = null;
2254 var _downloadOptions = common.DownloadOptions.Metadata;
2255 var _body = null;
2256
2257 if (setting == null) {
2258 throw new core.ArgumentError("Parameter setting is required.");
2259 }
2260
2261
2262 _url = 'users/me/settings/' + common_internal.Escaper.ecapeVariable('$settin g');
2263
2264 var _response = _requester.request(_url,
2265 "GET",
2266 body: _body,
2267 queryParams: _queryParams,
2268 uploadOptions: _uploadOptions,
2269 uploadMedia: _uploadMedia,
2270 downloadOptions: _downloadOptions);
2271 return _response.then((data) => new Setting.fromJson(data));
2272 }
2273
2274 /**
2275 * Returns all user settings for the authenticated user.
2276 *
2277 * Request parameters:
2278 *
2279 * [maxResults] - Maximum number of entries returned on one result page. By
2280 * default the value is 100 entries. The page size can never be larger than
2281 * 250 entries. Optional.
2282 *
2283 * [pageToken] - Token specifying which result page to return. Optional.
2284 *
2285 * [syncToken] - Token obtained from the nextSyncToken field returned on the
2286 * last page of results from the previous list request. It makes the result of
2287 * this list request contain only entries that have changed since then.
2288 * If the syncToken expires, the server will respond with a 410 GONE response
2289 * code and the client should clear its storage and perform a full
2290 * synchronization without any syncToken.
2291 * Learn more about incremental synchronization.
2292 * Optional. The default is to return all entries.
2293 *
2294 * Completes with a [Settings].
2295 *
2296 * Completes with a [common.ApiRequestError] if the API endpoint returned an
2297 * error.
2298 *
2299 * If the used [http.Client] completes with an error when making a REST call,
2300 * this method will complete with the same error.
2301 */
2302 async.Future<Settings> list({core.int maxResults, core.String pageToken, core. String syncToken}) {
2303 var _url = null;
2304 var _queryParams = new core.Map();
2305 var _uploadMedia = null;
2306 var _uploadOptions = null;
2307 var _downloadOptions = common.DownloadOptions.Metadata;
2308 var _body = null;
2309
2310 if (maxResults != null) {
2311 _queryParams["maxResults"] = ["${maxResults}"];
2312 }
2313 if (pageToken != null) {
2314 _queryParams["pageToken"] = [pageToken];
2315 }
2316 if (syncToken != null) {
2317 _queryParams["syncToken"] = [syncToken];
2318 }
2319
2320
2321 _url = 'users/me/settings';
2322
2323 var _response = _requester.request(_url,
2324 "GET",
2325 body: _body,
2326 queryParams: _queryParams,
2327 uploadOptions: _uploadOptions,
2328 uploadMedia: _uploadMedia,
2329 downloadOptions: _downloadOptions);
2330 return _response.then((data) => new Settings.fromJson(data));
2331 }
2332
2333 /**
2334 * Watch for changes to Settings resources.
2335 *
2336 * [request] - The metadata request object.
2337 *
2338 * Request parameters:
2339 *
2340 * [maxResults] - Maximum number of entries returned on one result page. By
2341 * default the value is 100 entries. The page size can never be larger than
2342 * 250 entries. Optional.
2343 *
2344 * [pageToken] - Token specifying which result page to return. Optional.
2345 *
2346 * [syncToken] - Token obtained from the nextSyncToken field returned on the
2347 * last page of results from the previous list request. It makes the result of
2348 * this list request contain only entries that have changed since then.
2349 * If the syncToken expires, the server will respond with a 410 GONE response
2350 * code and the client should clear its storage and perform a full
2351 * synchronization without any syncToken.
2352 * Learn more about incremental synchronization.
2353 * Optional. The default is to return all entries.
2354 *
2355 * Completes with a [Channel].
2356 *
2357 * Completes with a [common.ApiRequestError] if the API endpoint returned an
2358 * error.
2359 *
2360 * If the used [http.Client] completes with an error when making a REST call,
2361 * this method will complete with the same error.
2362 */
2363 async.Future<Channel> watch(Channel request, {core.int maxResults, core.String pageToken, core.String syncToken}) {
2364 var _url = null;
2365 var _queryParams = new core.Map();
2366 var _uploadMedia = null;
2367 var _uploadOptions = null;
2368 var _downloadOptions = common.DownloadOptions.Metadata;
2369 var _body = null;
2370
2371 if (request != null) {
2372 _body = convert.JSON.encode((request).toJson());
2373 }
2374 if (maxResults != null) {
2375 _queryParams["maxResults"] = ["${maxResults}"];
2376 }
2377 if (pageToken != null) {
2378 _queryParams["pageToken"] = [pageToken];
2379 }
2380 if (syncToken != null) {
2381 _queryParams["syncToken"] = [syncToken];
2382 }
2383
2384
2385 _url = 'users/me/settings/watch';
2386
2387 var _response = _requester.request(_url,
2388 "POST",
2389 body: _body,
2390 queryParams: _queryParams,
2391 uploadOptions: _uploadOptions,
2392 uploadMedia: _uploadMedia,
2393 downloadOptions: _downloadOptions);
2394 return _response.then((data) => new Channel.fromJson(data));
2395 }
2396
2397 }
2398
2399
2400
2401 /** Not documented yet. */
2402 class Acl {
2403 /** ETag of the collection. */
2404 core.String etag;
2405
2406 /** List of rules on the access control list. */
2407 core.List<AclRule> items;
2408
2409 /** Type of the collection ("calendar#acl"). */
2410 core.String kind;
2411
2412 /**
2413 * Token used to access the next page of this result. Omitted if no further
2414 * results are available, in which case nextSyncToken is provided.
2415 */
2416 core.String nextPageToken;
2417
2418 /**
2419 * Token used at a later point in time to retrieve only the entries that have
2420 * changed since this result was returned. Omitted if further results are
2421 * available, in which case nextPageToken is provided.
2422 */
2423 core.String nextSyncToken;
2424
2425
2426 Acl();
2427
2428 Acl.fromJson(core.Map _json) {
2429 if (_json.containsKey("etag")) {
2430 etag = _json["etag"];
2431 }
2432 if (_json.containsKey("items")) {
2433 items = _json["items"].map((value) => new AclRule.fromJson(value)).toList( );
2434 }
2435 if (_json.containsKey("kind")) {
2436 kind = _json["kind"];
2437 }
2438 if (_json.containsKey("nextPageToken")) {
2439 nextPageToken = _json["nextPageToken"];
2440 }
2441 if (_json.containsKey("nextSyncToken")) {
2442 nextSyncToken = _json["nextSyncToken"];
2443 }
2444 }
2445
2446 core.Map toJson() {
2447 var _json = new core.Map();
2448 if (etag != null) {
2449 _json["etag"] = etag;
2450 }
2451 if (items != null) {
2452 _json["items"] = items.map((value) => (value).toJson()).toList();
2453 }
2454 if (kind != null) {
2455 _json["kind"] = kind;
2456 }
2457 if (nextPageToken != null) {
2458 _json["nextPageToken"] = nextPageToken;
2459 }
2460 if (nextSyncToken != null) {
2461 _json["nextSyncToken"] = nextSyncToken;
2462 }
2463 return _json;
2464 }
2465 }
2466
2467
2468 /** The scope of the rule. */
2469 class AclRuleScope {
2470 /**
2471 * The type of the scope. Possible values are:
2472 * - "default" - The public scope. This is the default value.
2473 * - "user" - Limits the scope to a single user.
2474 * - "group" - Limits the scope to a group.
2475 * - "domain" - Limits the scope to a domain. Note: The permissions granted
2476 * to the "default", or public, scope apply to any user, authenticated or not.
2477 */
2478 core.String type;
2479
2480 /**
2481 * The email address of a user or group, or the name of a domain, depending on
2482 * the scope type. Omitted for type "default".
2483 */
2484 core.String value;
2485
2486
2487 AclRuleScope();
2488
2489 AclRuleScope.fromJson(core.Map _json) {
2490 if (_json.containsKey("type")) {
2491 type = _json["type"];
2492 }
2493 if (_json.containsKey("value")) {
2494 value = _json["value"];
2495 }
2496 }
2497
2498 core.Map toJson() {
2499 var _json = new core.Map();
2500 if (type != null) {
2501 _json["type"] = type;
2502 }
2503 if (value != null) {
2504 _json["value"] = value;
2505 }
2506 return _json;
2507 }
2508 }
2509
2510
2511 /** Not documented yet. */
2512 class AclRule {
2513 /** ETag of the resource. */
2514 core.String etag;
2515
2516 /** Identifier of the ACL rule. */
2517 core.String id;
2518
2519 /** Type of the resource ("calendar#aclRule"). */
2520 core.String kind;
2521
2522 /**
2523 * The role assigned to the scope. Possible values are:
2524 * - "none" - Provides no access.
2525 * - "freeBusyReader" - Provides read access to free/busy information.
2526 * - "reader" - Provides read access to the calendar. Private events will
2527 * appear to users with reader access, but event details will be hidden.
2528 * - "writer" - Provides read and write access to the calendar. Private events
2529 * will appear to users with writer access, and event details will be visible.
2530 * - "owner" - Provides ownership of the calendar. This role has all of the
2531 * permissions of the writer role with the additional ability to see and
2532 * manipulate ACLs.
2533 */
2534 core.String role;
2535
2536 /** The scope of the rule. */
2537 AclRuleScope scope;
2538
2539
2540 AclRule();
2541
2542 AclRule.fromJson(core.Map _json) {
2543 if (_json.containsKey("etag")) {
2544 etag = _json["etag"];
2545 }
2546 if (_json.containsKey("id")) {
2547 id = _json["id"];
2548 }
2549 if (_json.containsKey("kind")) {
2550 kind = _json["kind"];
2551 }
2552 if (_json.containsKey("role")) {
2553 role = _json["role"];
2554 }
2555 if (_json.containsKey("scope")) {
2556 scope = new AclRuleScope.fromJson(_json["scope"]);
2557 }
2558 }
2559
2560 core.Map toJson() {
2561 var _json = new core.Map();
2562 if (etag != null) {
2563 _json["etag"] = etag;
2564 }
2565 if (id != null) {
2566 _json["id"] = id;
2567 }
2568 if (kind != null) {
2569 _json["kind"] = kind;
2570 }
2571 if (role != null) {
2572 _json["role"] = role;
2573 }
2574 if (scope != null) {
2575 _json["scope"] = (scope).toJson();
2576 }
2577 return _json;
2578 }
2579 }
2580
2581
2582 /** Not documented yet. */
2583 class Calendar {
2584 /** Description of the calendar. Optional. */
2585 core.String description;
2586
2587 /** ETag of the resource. */
2588 core.String etag;
2589
2590 /** Identifier of the calendar. */
2591 core.String id;
2592
2593 /** Type of the resource ("calendar#calendar"). */
2594 core.String kind;
2595
2596 /** Geographic location of the calendar as free-form text. Optional. */
2597 core.String location;
2598
2599 /** Title of the calendar. */
2600 core.String summary;
2601
2602 /** The time zone of the calendar. Optional. */
2603 core.String timeZone;
2604
2605
2606 Calendar();
2607
2608 Calendar.fromJson(core.Map _json) {
2609 if (_json.containsKey("description")) {
2610 description = _json["description"];
2611 }
2612 if (_json.containsKey("etag")) {
2613 etag = _json["etag"];
2614 }
2615 if (_json.containsKey("id")) {
2616 id = _json["id"];
2617 }
2618 if (_json.containsKey("kind")) {
2619 kind = _json["kind"];
2620 }
2621 if (_json.containsKey("location")) {
2622 location = _json["location"];
2623 }
2624 if (_json.containsKey("summary")) {
2625 summary = _json["summary"];
2626 }
2627 if (_json.containsKey("timeZone")) {
2628 timeZone = _json["timeZone"];
2629 }
2630 }
2631
2632 core.Map toJson() {
2633 var _json = new core.Map();
2634 if (description != null) {
2635 _json["description"] = description;
2636 }
2637 if (etag != null) {
2638 _json["etag"] = etag;
2639 }
2640 if (id != null) {
2641 _json["id"] = id;
2642 }
2643 if (kind != null) {
2644 _json["kind"] = kind;
2645 }
2646 if (location != null) {
2647 _json["location"] = location;
2648 }
2649 if (summary != null) {
2650 _json["summary"] = summary;
2651 }
2652 if (timeZone != null) {
2653 _json["timeZone"] = timeZone;
2654 }
2655 return _json;
2656 }
2657 }
2658
2659
2660 /** Not documented yet. */
2661 class CalendarList {
2662 /** ETag of the collection. */
2663 core.String etag;
2664
2665 /** Calendars that are present on the user's calendar list. */
2666 core.List<CalendarListEntry> items;
2667
2668 /** Type of the collection ("calendar#calendarList"). */
2669 core.String kind;
2670
2671 /**
2672 * Token used to access the next page of this result. Omitted if no further
2673 * results are available, in which case nextSyncToken is provided.
2674 */
2675 core.String nextPageToken;
2676
2677 /**
2678 * Token used at a later point in time to retrieve only the entries that have
2679 * changed since this result was returned. Omitted if further results are
2680 * available, in which case nextPageToken is provided.
2681 */
2682 core.String nextSyncToken;
2683
2684
2685 CalendarList();
2686
2687 CalendarList.fromJson(core.Map _json) {
2688 if (_json.containsKey("etag")) {
2689 etag = _json["etag"];
2690 }
2691 if (_json.containsKey("items")) {
2692 items = _json["items"].map((value) => new CalendarListEntry.fromJson(value )).toList();
2693 }
2694 if (_json.containsKey("kind")) {
2695 kind = _json["kind"];
2696 }
2697 if (_json.containsKey("nextPageToken")) {
2698 nextPageToken = _json["nextPageToken"];
2699 }
2700 if (_json.containsKey("nextSyncToken")) {
2701 nextSyncToken = _json["nextSyncToken"];
2702 }
2703 }
2704
2705 core.Map toJson() {
2706 var _json = new core.Map();
2707 if (etag != null) {
2708 _json["etag"] = etag;
2709 }
2710 if (items != null) {
2711 _json["items"] = items.map((value) => (value).toJson()).toList();
2712 }
2713 if (kind != null) {
2714 _json["kind"] = kind;
2715 }
2716 if (nextPageToken != null) {
2717 _json["nextPageToken"] = nextPageToken;
2718 }
2719 if (nextSyncToken != null) {
2720 _json["nextSyncToken"] = nextSyncToken;
2721 }
2722 return _json;
2723 }
2724 }
2725
2726
2727 /**
2728 * The notifications that the authenticated user is receiving for this calendar.
2729 */
2730 class CalendarListEntryNotificationSettings {
2731 /** The list of notifications set for this calendar. */
2732 core.List<CalendarNotification> notifications;
2733
2734
2735 CalendarListEntryNotificationSettings();
2736
2737 CalendarListEntryNotificationSettings.fromJson(core.Map _json) {
2738 if (_json.containsKey("notifications")) {
2739 notifications = _json["notifications"].map((value) => new CalendarNotifica tion.fromJson(value)).toList();
2740 }
2741 }
2742
2743 core.Map toJson() {
2744 var _json = new core.Map();
2745 if (notifications != null) {
2746 _json["notifications"] = notifications.map((value) => (value).toJson()).to List();
2747 }
2748 return _json;
2749 }
2750 }
2751
2752
2753 /** Not documented yet. */
2754 class CalendarListEntry {
2755 /**
2756 * The effective access role that the authenticated user has on the calendar.
2757 * Read-only. Possible values are:
2758 * - "freeBusyReader" - Provides read access to free/busy information.
2759 * - "reader" - Provides read access to the calendar. Private events will
2760 * appear to users with reader access, but event details will be hidden.
2761 * - "writer" - Provides read and write access to the calendar. Private events
2762 * will appear to users with writer access, and event details will be visible.
2763 * - "owner" - Provides ownership of the calendar. This role has all of the
2764 * permissions of the writer role with the additional ability to see and
2765 * manipulate ACLs.
2766 */
2767 core.String accessRole;
2768
2769 /**
2770 * The main color of the calendar in the hexadecimal format "#0088aa". This
2771 * property supersedes the index-based colorId property. Optional.
2772 */
2773 core.String backgroundColor;
2774
2775 /**
2776 * The color of the calendar. This is an ID referring to an entry in the
2777 * calendar section of the colors definition (see the colors endpoint).
2778 * Optional.
2779 */
2780 core.String colorId;
2781
2782 /**
2783 * The default reminders that the authenticated user has for this calendar.
2784 */
2785 core.List<EventReminder> defaultReminders;
2786
2787 /**
2788 * Whether this calendar list entry has been deleted from the calendar list.
2789 * Read-only. Optional. The default is False.
2790 */
2791 core.bool deleted;
2792
2793 /** Description of the calendar. Optional. Read-only. */
2794 core.String description;
2795
2796 /** ETag of the resource. */
2797 core.String etag;
2798
2799 /**
2800 * The foreground color of the calendar in the hexadecimal format "#ffffff".
2801 * This property supersedes the index-based colorId property. Optional.
2802 */
2803 core.String foregroundColor;
2804
2805 /**
2806 * Whether the calendar has been hidden from the list. Optional. The default
2807 * is False.
2808 */
2809 core.bool hidden;
2810
2811 /** Identifier of the calendar. */
2812 core.String id;
2813
2814 /** Type of the resource ("calendar#calendarListEntry"). */
2815 core.String kind;
2816
2817 /**
2818 * Geographic location of the calendar as free-form text. Optional. Read-only.
2819 */
2820 core.String location;
2821
2822 /**
2823 * The notifications that the authenticated user is receiving for this
2824 * calendar.
2825 */
2826 CalendarListEntryNotificationSettings notificationSettings;
2827
2828 /**
2829 * Whether the calendar is the primary calendar of the authenticated user.
2830 * Read-only. Optional. The default is False.
2831 */
2832 core.bool primary;
2833
2834 /**
2835 * Whether the calendar content shows up in the calendar UI. Optional. The
2836 * default is False.
2837 */
2838 core.bool selected;
2839
2840 /** Title of the calendar. Read-only. */
2841 core.String summary;
2842
2843 /**
2844 * The summary that the authenticated user has set for this calendar.
2845 * Optional.
2846 */
2847 core.String summaryOverride;
2848
2849 /** The time zone of the calendar. Optional. Read-only. */
2850 core.String timeZone;
2851
2852
2853 CalendarListEntry();
2854
2855 CalendarListEntry.fromJson(core.Map _json) {
2856 if (_json.containsKey("accessRole")) {
2857 accessRole = _json["accessRole"];
2858 }
2859 if (_json.containsKey("backgroundColor")) {
2860 backgroundColor = _json["backgroundColor"];
2861 }
2862 if (_json.containsKey("colorId")) {
2863 colorId = _json["colorId"];
2864 }
2865 if (_json.containsKey("defaultReminders")) {
2866 defaultReminders = _json["defaultReminders"].map((value) => new EventRemin der.fromJson(value)).toList();
2867 }
2868 if (_json.containsKey("deleted")) {
2869 deleted = _json["deleted"];
2870 }
2871 if (_json.containsKey("description")) {
2872 description = _json["description"];
2873 }
2874 if (_json.containsKey("etag")) {
2875 etag = _json["etag"];
2876 }
2877 if (_json.containsKey("foregroundColor")) {
2878 foregroundColor = _json["foregroundColor"];
2879 }
2880 if (_json.containsKey("hidden")) {
2881 hidden = _json["hidden"];
2882 }
2883 if (_json.containsKey("id")) {
2884 id = _json["id"];
2885 }
2886 if (_json.containsKey("kind")) {
2887 kind = _json["kind"];
2888 }
2889 if (_json.containsKey("location")) {
2890 location = _json["location"];
2891 }
2892 if (_json.containsKey("notificationSettings")) {
2893 notificationSettings = new CalendarListEntryNotificationSettings.fromJson( _json["notificationSettings"]);
2894 }
2895 if (_json.containsKey("primary")) {
2896 primary = _json["primary"];
2897 }
2898 if (_json.containsKey("selected")) {
2899 selected = _json["selected"];
2900 }
2901 if (_json.containsKey("summary")) {
2902 summary = _json["summary"];
2903 }
2904 if (_json.containsKey("summaryOverride")) {
2905 summaryOverride = _json["summaryOverride"];
2906 }
2907 if (_json.containsKey("timeZone")) {
2908 timeZone = _json["timeZone"];
2909 }
2910 }
2911
2912 core.Map toJson() {
2913 var _json = new core.Map();
2914 if (accessRole != null) {
2915 _json["accessRole"] = accessRole;
2916 }
2917 if (backgroundColor != null) {
2918 _json["backgroundColor"] = backgroundColor;
2919 }
2920 if (colorId != null) {
2921 _json["colorId"] = colorId;
2922 }
2923 if (defaultReminders != null) {
2924 _json["defaultReminders"] = defaultReminders.map((value) => (value).toJson ()).toList();
2925 }
2926 if (deleted != null) {
2927 _json["deleted"] = deleted;
2928 }
2929 if (description != null) {
2930 _json["description"] = description;
2931 }
2932 if (etag != null) {
2933 _json["etag"] = etag;
2934 }
2935 if (foregroundColor != null) {
2936 _json["foregroundColor"] = foregroundColor;
2937 }
2938 if (hidden != null) {
2939 _json["hidden"] = hidden;
2940 }
2941 if (id != null) {
2942 _json["id"] = id;
2943 }
2944 if (kind != null) {
2945 _json["kind"] = kind;
2946 }
2947 if (location != null) {
2948 _json["location"] = location;
2949 }
2950 if (notificationSettings != null) {
2951 _json["notificationSettings"] = (notificationSettings).toJson();
2952 }
2953 if (primary != null) {
2954 _json["primary"] = primary;
2955 }
2956 if (selected != null) {
2957 _json["selected"] = selected;
2958 }
2959 if (summary != null) {
2960 _json["summary"] = summary;
2961 }
2962 if (summaryOverride != null) {
2963 _json["summaryOverride"] = summaryOverride;
2964 }
2965 if (timeZone != null) {
2966 _json["timeZone"] = timeZone;
2967 }
2968 return _json;
2969 }
2970 }
2971
2972
2973 /** Not documented yet. */
2974 class CalendarNotification {
2975 /**
2976 * The method used to deliver the notification. Possible values are:
2977 * - "email" - Reminders are sent via email.
2978 * - "sms" - Reminders are sent via SMS. This value is read-only and is
2979 * ignored on inserts and updates.
2980 */
2981 core.String method;
2982
2983 /**
2984 * The type of notification. Possible values are:
2985 * - "eventCreation" - Notification sent when a new event is put on the
2986 * calendar.
2987 * - "eventChange" - Notification sent when an event is changed.
2988 * - "eventCancellation" - Notification sent when an event is cancelled.
2989 * - "eventResponse" - Notification sent when an event is changed.
2990 * - "agenda" - An agenda with the events of the day (sent out in the
2991 * morning).
2992 */
2993 core.String type;
2994
2995
2996 CalendarNotification();
2997
2998 CalendarNotification.fromJson(core.Map _json) {
2999 if (_json.containsKey("method")) {
3000 method = _json["method"];
3001 }
3002 if (_json.containsKey("type")) {
3003 type = _json["type"];
3004 }
3005 }
3006
3007 core.Map toJson() {
3008 var _json = new core.Map();
3009 if (method != null) {
3010 _json["method"] = method;
3011 }
3012 if (type != null) {
3013 _json["type"] = type;
3014 }
3015 return _json;
3016 }
3017 }
3018
3019
3020 /** Not documented yet. */
3021 class Channel {
3022 /** The address where notifications are delivered for this channel. */
3023 core.String address;
3024
3025 /**
3026 * Date and time of notification channel expiration, expressed as a Unix
3027 * timestamp, in milliseconds. Optional.
3028 */
3029 core.String expiration;
3030
3031 /** A UUID or similar unique string that identifies this channel. */
3032 core.String id;
3033
3034 /**
3035 * Identifies this as a notification channel used to watch for changes to a
3036 * resource. Value: the fixed string "api#channel".
3037 */
3038 core.String kind;
3039
3040 /** Additional parameters controlling delivery channel behavior. Optional. */
3041 core.Map<core.String, core.String> params;
3042
3043 /** A Boolean value to indicate whether payload is wanted. Optional. */
3044 core.bool payload;
3045
3046 /**
3047 * An opaque ID that identifies the resource being watched on this channel.
3048 * Stable across different API versions.
3049 */
3050 core.String resourceId;
3051
3052 /** A version-specific identifier for the watched resource. */
3053 core.String resourceUri;
3054
3055 /**
3056 * An arbitrary string delivered to the target address with each notification
3057 * delivered over this channel. Optional.
3058 */
3059 core.String token;
3060
3061 /** The type of delivery mechanism used for this channel. */
3062 core.String type;
3063
3064
3065 Channel();
3066
3067 Channel.fromJson(core.Map _json) {
3068 if (_json.containsKey("address")) {
3069 address = _json["address"];
3070 }
3071 if (_json.containsKey("expiration")) {
3072 expiration = _json["expiration"];
3073 }
3074 if (_json.containsKey("id")) {
3075 id = _json["id"];
3076 }
3077 if (_json.containsKey("kind")) {
3078 kind = _json["kind"];
3079 }
3080 if (_json.containsKey("params")) {
3081 params = _json["params"];
3082 }
3083 if (_json.containsKey("payload")) {
3084 payload = _json["payload"];
3085 }
3086 if (_json.containsKey("resourceId")) {
3087 resourceId = _json["resourceId"];
3088 }
3089 if (_json.containsKey("resourceUri")) {
3090 resourceUri = _json["resourceUri"];
3091 }
3092 if (_json.containsKey("token")) {
3093 token = _json["token"];
3094 }
3095 if (_json.containsKey("type")) {
3096 type = _json["type"];
3097 }
3098 }
3099
3100 core.Map toJson() {
3101 var _json = new core.Map();
3102 if (address != null) {
3103 _json["address"] = address;
3104 }
3105 if (expiration != null) {
3106 _json["expiration"] = expiration;
3107 }
3108 if (id != null) {
3109 _json["id"] = id;
3110 }
3111 if (kind != null) {
3112 _json["kind"] = kind;
3113 }
3114 if (params != null) {
3115 _json["params"] = params;
3116 }
3117 if (payload != null) {
3118 _json["payload"] = payload;
3119 }
3120 if (resourceId != null) {
3121 _json["resourceId"] = resourceId;
3122 }
3123 if (resourceUri != null) {
3124 _json["resourceUri"] = resourceUri;
3125 }
3126 if (token != null) {
3127 _json["token"] = token;
3128 }
3129 if (type != null) {
3130 _json["type"] = type;
3131 }
3132 return _json;
3133 }
3134 }
3135
3136
3137 /** Not documented yet. */
3138 class ColorDefinition {
3139 /** The background color associated with this color definition. */
3140 core.String background;
3141
3142 /**
3143 * The foreground color that can be used to write on top of a background with
3144 * 'background' color.
3145 */
3146 core.String foreground;
3147
3148
3149 ColorDefinition();
3150
3151 ColorDefinition.fromJson(core.Map _json) {
3152 if (_json.containsKey("background")) {
3153 background = _json["background"];
3154 }
3155 if (_json.containsKey("foreground")) {
3156 foreground = _json["foreground"];
3157 }
3158 }
3159
3160 core.Map toJson() {
3161 var _json = new core.Map();
3162 if (background != null) {
3163 _json["background"] = background;
3164 }
3165 if (foreground != null) {
3166 _json["foreground"] = foreground;
3167 }
3168 return _json;
3169 }
3170 }
3171
3172
3173 /** Not documented yet. */
3174 class Colors {
3175 /**
3176 * Palette of calendar colors, mapping from the color ID to its definition. A
3177 * calendarListEntry resource refers to one of these color IDs in its color
3178 * field. Read-only.
3179 */
3180 core.Map<core.String, ColorDefinition> calendar;
3181
3182 /**
3183 * Palette of event colors, mapping from the color ID to its definition. An
3184 * event resource may refer to one of these color IDs in its color field.
3185 * Read-only.
3186 */
3187 core.Map<core.String, ColorDefinition> event;
3188
3189 /** Type of the resource ("calendar#colors"). */
3190 core.String kind;
3191
3192 /**
3193 * Last modification time of the color palette (as a RFC 3339 timestamp).
3194 * Read-only.
3195 */
3196 core.DateTime updated;
3197
3198
3199 Colors();
3200
3201 Colors.fromJson(core.Map _json) {
3202 if (_json.containsKey("calendar")) {
3203 calendar = common_internal.mapMap(_json["calendar"], (item) => new ColorDe finition.fromJson(item));
3204 }
3205 if (_json.containsKey("event")) {
3206 event = common_internal.mapMap(_json["event"], (item) => new ColorDefiniti on.fromJson(item));
3207 }
3208 if (_json.containsKey("kind")) {
3209 kind = _json["kind"];
3210 }
3211 if (_json.containsKey("updated")) {
3212 updated = core.DateTime.parse(_json["updated"]);
3213 }
3214 }
3215
3216 core.Map toJson() {
3217 var _json = new core.Map();
3218 if (calendar != null) {
3219 _json["calendar"] = common_internal.mapMap(calendar, (item) => (item).toJs on());
3220 }
3221 if (event != null) {
3222 _json["event"] = common_internal.mapMap(event, (item) => (item).toJson());
3223 }
3224 if (kind != null) {
3225 _json["kind"] = kind;
3226 }
3227 if (updated != null) {
3228 _json["updated"] = (updated).toIso8601String();
3229 }
3230 return _json;
3231 }
3232 }
3233
3234
3235 /** Not documented yet. */
3236 class Error {
3237 /** Domain, or broad category, of the error. */
3238 core.String domain;
3239
3240 /**
3241 * Specific reason for the error. Some of the possible values are:
3242 * - "groupTooBig" - The group of users requested is too large for a single
3243 * query.
3244 * - "tooManyCalendarsRequested" - The number of calendars requested is too
3245 * large for a single query.
3246 * - "notFound" - The requested resource was not found.
3247 * - "internalError" - The API service has encountered an internal error.
3248 * Additional error types may be added in the future, so clients should
3249 * gracefully handle additional error statuses not included in this list.
3250 */
3251 core.String reason;
3252
3253
3254 Error();
3255
3256 Error.fromJson(core.Map _json) {
3257 if (_json.containsKey("domain")) {
3258 domain = _json["domain"];
3259 }
3260 if (_json.containsKey("reason")) {
3261 reason = _json["reason"];
3262 }
3263 }
3264
3265 core.Map toJson() {
3266 var _json = new core.Map();
3267 if (domain != null) {
3268 _json["domain"] = domain;
3269 }
3270 if (reason != null) {
3271 _json["reason"] = reason;
3272 }
3273 return _json;
3274 }
3275 }
3276
3277
3278 /** The creator of the event. Read-only. */
3279 class EventCreator {
3280 /** The creator's name, if available. */
3281 core.String displayName;
3282
3283 /** The creator's email address, if available. */
3284 core.String email;
3285
3286 /** The creator's Profile ID, if available. */
3287 core.String id;
3288
3289 /**
3290 * Whether the creator corresponds to the calendar on which this copy of the
3291 * event appears. Read-only. The default is False.
3292 */
3293 core.bool self;
3294
3295
3296 EventCreator();
3297
3298 EventCreator.fromJson(core.Map _json) {
3299 if (_json.containsKey("displayName")) {
3300 displayName = _json["displayName"];
3301 }
3302 if (_json.containsKey("email")) {
3303 email = _json["email"];
3304 }
3305 if (_json.containsKey("id")) {
3306 id = _json["id"];
3307 }
3308 if (_json.containsKey("self")) {
3309 self = _json["self"];
3310 }
3311 }
3312
3313 core.Map toJson() {
3314 var _json = new core.Map();
3315 if (displayName != null) {
3316 _json["displayName"] = displayName;
3317 }
3318 if (email != null) {
3319 _json["email"] = email;
3320 }
3321 if (id != null) {
3322 _json["id"] = id;
3323 }
3324 if (self != null) {
3325 _json["self"] = self;
3326 }
3327 return _json;
3328 }
3329 }
3330
3331
3332 /** Extended properties of the event. */
3333 class EventExtendedProperties {
3334 /**
3335 * Properties that are private to the copy of the event that appears on this
3336 * calendar.
3337 */
3338 core.Map<core.String, core.String> private;
3339
3340 /**
3341 * Properties that are shared between copies of the event on other attendees'
3342 * calendars.
3343 */
3344 core.Map<core.String, core.String> shared;
3345
3346
3347 EventExtendedProperties();
3348
3349 EventExtendedProperties.fromJson(core.Map _json) {
3350 if (_json.containsKey("private")) {
3351 private = _json["private"];
3352 }
3353 if (_json.containsKey("shared")) {
3354 shared = _json["shared"];
3355 }
3356 }
3357
3358 core.Map toJson() {
3359 var _json = new core.Map();
3360 if (private != null) {
3361 _json["private"] = private;
3362 }
3363 if (shared != null) {
3364 _json["shared"] = shared;
3365 }
3366 return _json;
3367 }
3368 }
3369
3370
3371 /** A gadget that extends this event. */
3372 class EventGadget {
3373 /**
3374 * The gadget's display mode. Optional. Possible values are:
3375 * - "icon" - The gadget displays next to the event's title in the calendar
3376 * view.
3377 * - "chip" - The gadget displays when the event is clicked.
3378 */
3379 core.String display;
3380
3381 /** The gadget's height in pixels. Optional. */
3382 core.int height;
3383
3384 /** The gadget's icon URL. */
3385 core.String iconLink;
3386
3387 /** The gadget's URL. */
3388 core.String link;
3389
3390 /** Preferences. */
3391 core.Map<core.String, core.String> preferences;
3392
3393 /** The gadget's title. */
3394 core.String title;
3395
3396 /** The gadget's type. */
3397 core.String type;
3398
3399 /** The gadget's width in pixels. Optional. */
3400 core.int width;
3401
3402
3403 EventGadget();
3404
3405 EventGadget.fromJson(core.Map _json) {
3406 if (_json.containsKey("display")) {
3407 display = _json["display"];
3408 }
3409 if (_json.containsKey("height")) {
3410 height = _json["height"];
3411 }
3412 if (_json.containsKey("iconLink")) {
3413 iconLink = _json["iconLink"];
3414 }
3415 if (_json.containsKey("link")) {
3416 link = _json["link"];
3417 }
3418 if (_json.containsKey("preferences")) {
3419 preferences = _json["preferences"];
3420 }
3421 if (_json.containsKey("title")) {
3422 title = _json["title"];
3423 }
3424 if (_json.containsKey("type")) {
3425 type = _json["type"];
3426 }
3427 if (_json.containsKey("width")) {
3428 width = _json["width"];
3429 }
3430 }
3431
3432 core.Map toJson() {
3433 var _json = new core.Map();
3434 if (display != null) {
3435 _json["display"] = display;
3436 }
3437 if (height != null) {
3438 _json["height"] = height;
3439 }
3440 if (iconLink != null) {
3441 _json["iconLink"] = iconLink;
3442 }
3443 if (link != null) {
3444 _json["link"] = link;
3445 }
3446 if (preferences != null) {
3447 _json["preferences"] = preferences;
3448 }
3449 if (title != null) {
3450 _json["title"] = title;
3451 }
3452 if (type != null) {
3453 _json["type"] = type;
3454 }
3455 if (width != null) {
3456 _json["width"] = width;
3457 }
3458 return _json;
3459 }
3460 }
3461
3462
3463 /**
3464 * The organizer of the event. If the organizer is also an attendee, this is
3465 * indicated with a separate entry in attendees with the organizer field set to
3466 * True. To change the organizer, use the move operation. Read-only, except when
3467 * importing an event.
3468 */
3469 class EventOrganizer {
3470 /** The organizer's name, if available. */
3471 core.String displayName;
3472
3473 /** The organizer's email address, if available. */
3474 core.String email;
3475
3476 /** The organizer's Profile ID, if available. */
3477 core.String id;
3478
3479 /**
3480 * Whether the organizer corresponds to the calendar on which this copy of the
3481 * event appears. Read-only. The default is False.
3482 */
3483 core.bool self;
3484
3485
3486 EventOrganizer();
3487
3488 EventOrganizer.fromJson(core.Map _json) {
3489 if (_json.containsKey("displayName")) {
3490 displayName = _json["displayName"];
3491 }
3492 if (_json.containsKey("email")) {
3493 email = _json["email"];
3494 }
3495 if (_json.containsKey("id")) {
3496 id = _json["id"];
3497 }
3498 if (_json.containsKey("self")) {
3499 self = _json["self"];
3500 }
3501 }
3502
3503 core.Map toJson() {
3504 var _json = new core.Map();
3505 if (displayName != null) {
3506 _json["displayName"] = displayName;
3507 }
3508 if (email != null) {
3509 _json["email"] = email;
3510 }
3511 if (id != null) {
3512 _json["id"] = id;
3513 }
3514 if (self != null) {
3515 _json["self"] = self;
3516 }
3517 return _json;
3518 }
3519 }
3520
3521
3522 /** Information about the event's reminders for the authenticated user. */
3523 class EventReminders {
3524 /**
3525 * If the event doesn't use the default reminders, this lists the reminders
3526 * specific to the event, or, if not set, indicates that no reminders are set
3527 * for this event.
3528 */
3529 core.List<EventReminder> overrides;
3530
3531 /** Whether the default reminders of the calendar apply to the event. */
3532 core.bool useDefault;
3533
3534
3535 EventReminders();
3536
3537 EventReminders.fromJson(core.Map _json) {
3538 if (_json.containsKey("overrides")) {
3539 overrides = _json["overrides"].map((value) => new EventReminder.fromJson(v alue)).toList();
3540 }
3541 if (_json.containsKey("useDefault")) {
3542 useDefault = _json["useDefault"];
3543 }
3544 }
3545
3546 core.Map toJson() {
3547 var _json = new core.Map();
3548 if (overrides != null) {
3549 _json["overrides"] = overrides.map((value) => (value).toJson()).toList();
3550 }
3551 if (useDefault != null) {
3552 _json["useDefault"] = useDefault;
3553 }
3554 return _json;
3555 }
3556 }
3557
3558
3559 /**
3560 * Source of an event from which it was created; for example a web page, an
3561 * email message or any document identifiable by an URL using HTTP/HTTPS
3562 * protocol. Accessible only by the creator of the event.
3563 */
3564 class EventSource {
3565 /**
3566 * Title of the source; for example a title of a web page or an email subject.
3567 */
3568 core.String title;
3569
3570 /**
3571 * URL of the source pointing to a resource. URL's protocol must be HTTP or
3572 * HTTPS.
3573 */
3574 core.String url;
3575
3576
3577 EventSource();
3578
3579 EventSource.fromJson(core.Map _json) {
3580 if (_json.containsKey("title")) {
3581 title = _json["title"];
3582 }
3583 if (_json.containsKey("url")) {
3584 url = _json["url"];
3585 }
3586 }
3587
3588 core.Map toJson() {
3589 var _json = new core.Map();
3590 if (title != null) {
3591 _json["title"] = title;
3592 }
3593 if (url != null) {
3594 _json["url"] = url;
3595 }
3596 return _json;
3597 }
3598 }
3599
3600
3601 /** Not documented yet. */
3602 class Event {
3603 /**
3604 * Whether anyone can invite themselves to the event. Optional. The default is
3605 * False.
3606 */
3607 core.bool anyoneCanAddSelf;
3608
3609 /** The attendees of the event. */
3610 core.List<EventAttendee> attendees;
3611
3612 /**
3613 * Whether attendees may have been omitted from the event's representation.
3614 * When retrieving an event, this may be due to a restriction specified by the
3615 * maxAttendee query parameter. When updating an event, this can be used to
3616 * only update the participant's response. Optional. The default is False.
3617 */
3618 core.bool attendeesOmitted;
3619
3620 /**
3621 * The color of the event. This is an ID referring to an entry in the event
3622 * section of the colors definition (see the colors endpoint). Optional.
3623 */
3624 core.String colorId;
3625
3626 /** Creation time of the event (as a RFC 3339 timestamp). Read-only. */
3627 core.DateTime created;
3628
3629 /** The creator of the event. Read-only. */
3630 EventCreator creator;
3631
3632 /** Description of the event. Optional. */
3633 core.String description;
3634
3635 /**
3636 * The (exclusive) end time of the event. For a recurring event, this is the
3637 * end time of the first instance.
3638 */
3639 EventDateTime end;
3640
3641 /**
3642 * Whether the end time is actually unspecified. An end time is still provided
3643 * for compatibility reasons, even if this attribute is set to True. The
3644 * default is False.
3645 */
3646 core.bool endTimeUnspecified;
3647
3648 /** ETag of the resource. */
3649 core.String etag;
3650
3651 /** Extended properties of the event. */
3652 EventExtendedProperties extendedProperties;
3653
3654 /** A gadget that extends this event. */
3655 EventGadget gadget;
3656
3657 /**
3658 * Whether attendees other than the organizer can invite others to the event.
3659 * Optional. The default is True.
3660 */
3661 core.bool guestsCanInviteOthers;
3662
3663 /**
3664 * Whether attendees other than the organizer can modify the event. Optional.
3665 * The default is False.
3666 */
3667 core.bool guestsCanModify;
3668
3669 /**
3670 * Whether attendees other than the organizer can see who the event's
3671 * attendees are. Optional. The default is True.
3672 */
3673 core.bool guestsCanSeeOtherGuests;
3674
3675 /**
3676 * An absolute link to the Google+ hangout associated with this event.
3677 * Read-only.
3678 */
3679 core.String hangoutLink;
3680
3681 /**
3682 * An absolute link to this event in the Google Calendar Web UI. Read-only.
3683 */
3684 core.String htmlLink;
3685
3686 /** Event ID in the iCalendar format. */
3687 core.String iCalUID;
3688
3689 /**
3690 * Identifier of the event. When creating new single or recurring events, you
3691 * can specify their IDs. Provided IDs must follow these rules:
3692 * - characters allowed in the ID are those used in base32hex encoding, i.e.
3693 * lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938
3694 * - the length of the ID must be between 5 and 1024 characters
3695 * - the ID must be unique per calendar Due to the globally distributed
3696 * nature of the system, we cannot guarantee that ID collisions will be
3697 * detected at event creation time. To minimize the risk of collisions we
3698 * recommend using an established UUID algorithm such as one described in
3699 * RFC4122.
3700 */
3701 core.String id;
3702
3703 /** Type of the resource ("calendar#event"). */
3704 core.String kind;
3705
3706 /** Geographic location of the event as free-form text. Optional. */
3707 core.String location;
3708
3709 /**
3710 * Whether this is a locked event copy where no changes can be made to the
3711 * main event fields "summary", "description", "location", "start", "end" or
3712 * "recurrence". The default is False. Read-Only.
3713 */
3714 core.bool locked;
3715
3716 /**
3717 * The organizer of the event. If the organizer is also an attendee, this is
3718 * indicated with a separate entry in attendees with the organizer field set
3719 * to True. To change the organizer, use the move operation. Read-only, except
3720 * when importing an event.
3721 */
3722 EventOrganizer organizer;
3723
3724 /**
3725 * For an instance of a recurring event, this is the time at which this event
3726 * would start according to the recurrence data in the recurring event
3727 * identified by recurringEventId. Immutable.
3728 */
3729 EventDateTime originalStartTime;
3730
3731 /**
3732 * Whether this is a private event copy where changes are not shared with
3733 * other copies on other calendars. Optional. Immutable. The default is False.
3734 */
3735 core.bool privateCopy;
3736
3737 /**
3738 * List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event. This
3739 * field is omitted for single events or instances of recurring events.
3740 */
3741 core.List<core.String> recurrence;
3742
3743 /**
3744 * For an instance of a recurring event, this is the event ID of the recurring
3745 * event itself. Immutable.
3746 */
3747 core.String recurringEventId;
3748
3749 /** Information about the event's reminders for the authenticated user. */
3750 EventReminders reminders;
3751
3752 /** Sequence number as per iCalendar. */
3753 core.int sequence;
3754
3755 /**
3756 * Source of an event from which it was created; for example a web page, an
3757 * email message or any document identifiable by an URL using HTTP/HTTPS
3758 * protocol. Accessible only by the creator of the event.
3759 */
3760 EventSource source;
3761
3762 /**
3763 * The (inclusive) start time of the event. For a recurring event, this is the
3764 * start time of the first instance.
3765 */
3766 EventDateTime start;
3767
3768 /**
3769 * Status of the event. Optional. Possible values are:
3770 * - "confirmed" - The event is confirmed. This is the default status.
3771 * - "tentative" - The event is tentatively confirmed.
3772 * - "cancelled" - The event is cancelled.
3773 */
3774 core.String status;
3775
3776 /** Title of the event. */
3777 core.String summary;
3778
3779 /**
3780 * Whether the event blocks time on the calendar. Optional. Possible values
3781 * are:
3782 * - "opaque" - The event blocks time on the calendar. This is the default
3783 * value.
3784 * - "transparent" - The event does not block time on the calendar.
3785 */
3786 core.String transparency;
3787
3788 /**
3789 * Last modification time of the event (as a RFC 3339 timestamp). Read-only.
3790 */
3791 core.DateTime updated;
3792
3793 /**
3794 * Visibility of the event. Optional. Possible values are:
3795 * - "default" - Uses the default visibility for events on the calendar. This
3796 * is the default value.
3797 * - "public" - The event is public and event details are visible to all
3798 * readers of the calendar.
3799 * - "private" - The event is private and only event attendees may view event
3800 * details.
3801 * - "confidential" - The event is private. This value is provided for
3802 * compatibility reasons.
3803 */
3804 core.String visibility;
3805
3806
3807 Event();
3808
3809 Event.fromJson(core.Map _json) {
3810 if (_json.containsKey("anyoneCanAddSelf")) {
3811 anyoneCanAddSelf = _json["anyoneCanAddSelf"];
3812 }
3813 if (_json.containsKey("attendees")) {
3814 attendees = _json["attendees"].map((value) => new EventAttendee.fromJson(v alue)).toList();
3815 }
3816 if (_json.containsKey("attendeesOmitted")) {
3817 attendeesOmitted = _json["attendeesOmitted"];
3818 }
3819 if (_json.containsKey("colorId")) {
3820 colorId = _json["colorId"];
3821 }
3822 if (_json.containsKey("created")) {
3823 created = core.DateTime.parse(_json["created"]);
3824 }
3825 if (_json.containsKey("creator")) {
3826 creator = new EventCreator.fromJson(_json["creator"]);
3827 }
3828 if (_json.containsKey("description")) {
3829 description = _json["description"];
3830 }
3831 if (_json.containsKey("end")) {
3832 end = new EventDateTime.fromJson(_json["end"]);
3833 }
3834 if (_json.containsKey("endTimeUnspecified")) {
3835 endTimeUnspecified = _json["endTimeUnspecified"];
3836 }
3837 if (_json.containsKey("etag")) {
3838 etag = _json["etag"];
3839 }
3840 if (_json.containsKey("extendedProperties")) {
3841 extendedProperties = new EventExtendedProperties.fromJson(_json["extendedP roperties"]);
3842 }
3843 if (_json.containsKey("gadget")) {
3844 gadget = new EventGadget.fromJson(_json["gadget"]);
3845 }
3846 if (_json.containsKey("guestsCanInviteOthers")) {
3847 guestsCanInviteOthers = _json["guestsCanInviteOthers"];
3848 }
3849 if (_json.containsKey("guestsCanModify")) {
3850 guestsCanModify = _json["guestsCanModify"];
3851 }
3852 if (_json.containsKey("guestsCanSeeOtherGuests")) {
3853 guestsCanSeeOtherGuests = _json["guestsCanSeeOtherGuests"];
3854 }
3855 if (_json.containsKey("hangoutLink")) {
3856 hangoutLink = _json["hangoutLink"];
3857 }
3858 if (_json.containsKey("htmlLink")) {
3859 htmlLink = _json["htmlLink"];
3860 }
3861 if (_json.containsKey("iCalUID")) {
3862 iCalUID = _json["iCalUID"];
3863 }
3864 if (_json.containsKey("id")) {
3865 id = _json["id"];
3866 }
3867 if (_json.containsKey("kind")) {
3868 kind = _json["kind"];
3869 }
3870 if (_json.containsKey("location")) {
3871 location = _json["location"];
3872 }
3873 if (_json.containsKey("locked")) {
3874 locked = _json["locked"];
3875 }
3876 if (_json.containsKey("organizer")) {
3877 organizer = new EventOrganizer.fromJson(_json["organizer"]);
3878 }
3879 if (_json.containsKey("originalStartTime")) {
3880 originalStartTime = new EventDateTime.fromJson(_json["originalStartTime"]) ;
3881 }
3882 if (_json.containsKey("privateCopy")) {
3883 privateCopy = _json["privateCopy"];
3884 }
3885 if (_json.containsKey("recurrence")) {
3886 recurrence = _json["recurrence"];
3887 }
3888 if (_json.containsKey("recurringEventId")) {
3889 recurringEventId = _json["recurringEventId"];
3890 }
3891 if (_json.containsKey("reminders")) {
3892 reminders = new EventReminders.fromJson(_json["reminders"]);
3893 }
3894 if (_json.containsKey("sequence")) {
3895 sequence = _json["sequence"];
3896 }
3897 if (_json.containsKey("source")) {
3898 source = new EventSource.fromJson(_json["source"]);
3899 }
3900 if (_json.containsKey("start")) {
3901 start = new EventDateTime.fromJson(_json["start"]);
3902 }
3903 if (_json.containsKey("status")) {
3904 status = _json["status"];
3905 }
3906 if (_json.containsKey("summary")) {
3907 summary = _json["summary"];
3908 }
3909 if (_json.containsKey("transparency")) {
3910 transparency = _json["transparency"];
3911 }
3912 if (_json.containsKey("updated")) {
3913 updated = core.DateTime.parse(_json["updated"]);
3914 }
3915 if (_json.containsKey("visibility")) {
3916 visibility = _json["visibility"];
3917 }
3918 }
3919
3920 core.Map toJson() {
3921 var _json = new core.Map();
3922 if (anyoneCanAddSelf != null) {
3923 _json["anyoneCanAddSelf"] = anyoneCanAddSelf;
3924 }
3925 if (attendees != null) {
3926 _json["attendees"] = attendees.map((value) => (value).toJson()).toList();
3927 }
3928 if (attendeesOmitted != null) {
3929 _json["attendeesOmitted"] = attendeesOmitted;
3930 }
3931 if (colorId != null) {
3932 _json["colorId"] = colorId;
3933 }
3934 if (created != null) {
3935 _json["created"] = (created).toIso8601String();
3936 }
3937 if (creator != null) {
3938 _json["creator"] = (creator).toJson();
3939 }
3940 if (description != null) {
3941 _json["description"] = description;
3942 }
3943 if (end != null) {
3944 _json["end"] = (end).toJson();
3945 }
3946 if (endTimeUnspecified != null) {
3947 _json["endTimeUnspecified"] = endTimeUnspecified;
3948 }
3949 if (etag != null) {
3950 _json["etag"] = etag;
3951 }
3952 if (extendedProperties != null) {
3953 _json["extendedProperties"] = (extendedProperties).toJson();
3954 }
3955 if (gadget != null) {
3956 _json["gadget"] = (gadget).toJson();
3957 }
3958 if (guestsCanInviteOthers != null) {
3959 _json["guestsCanInviteOthers"] = guestsCanInviteOthers;
3960 }
3961 if (guestsCanModify != null) {
3962 _json["guestsCanModify"] = guestsCanModify;
3963 }
3964 if (guestsCanSeeOtherGuests != null) {
3965 _json["guestsCanSeeOtherGuests"] = guestsCanSeeOtherGuests;
3966 }
3967 if (hangoutLink != null) {
3968 _json["hangoutLink"] = hangoutLink;
3969 }
3970 if (htmlLink != null) {
3971 _json["htmlLink"] = htmlLink;
3972 }
3973 if (iCalUID != null) {
3974 _json["iCalUID"] = iCalUID;
3975 }
3976 if (id != null) {
3977 _json["id"] = id;
3978 }
3979 if (kind != null) {
3980 _json["kind"] = kind;
3981 }
3982 if (location != null) {
3983 _json["location"] = location;
3984 }
3985 if (locked != null) {
3986 _json["locked"] = locked;
3987 }
3988 if (organizer != null) {
3989 _json["organizer"] = (organizer).toJson();
3990 }
3991 if (originalStartTime != null) {
3992 _json["originalStartTime"] = (originalStartTime).toJson();
3993 }
3994 if (privateCopy != null) {
3995 _json["privateCopy"] = privateCopy;
3996 }
3997 if (recurrence != null) {
3998 _json["recurrence"] = recurrence;
3999 }
4000 if (recurringEventId != null) {
4001 _json["recurringEventId"] = recurringEventId;
4002 }
4003 if (reminders != null) {
4004 _json["reminders"] = (reminders).toJson();
4005 }
4006 if (sequence != null) {
4007 _json["sequence"] = sequence;
4008 }
4009 if (source != null) {
4010 _json["source"] = (source).toJson();
4011 }
4012 if (start != null) {
4013 _json["start"] = (start).toJson();
4014 }
4015 if (status != null) {
4016 _json["status"] = status;
4017 }
4018 if (summary != null) {
4019 _json["summary"] = summary;
4020 }
4021 if (transparency != null) {
4022 _json["transparency"] = transparency;
4023 }
4024 if (updated != null) {
4025 _json["updated"] = (updated).toIso8601String();
4026 }
4027 if (visibility != null) {
4028 _json["visibility"] = visibility;
4029 }
4030 return _json;
4031 }
4032 }
4033
4034
4035 /** Not documented yet. */
4036 class EventAttendee {
4037 /** Number of additional guests. Optional. The default is 0. */
4038 core.int additionalGuests;
4039
4040 /** The attendee's response comment. Optional. */
4041 core.String comment;
4042
4043 /** The attendee's name, if available. Optional. */
4044 core.String displayName;
4045
4046 /**
4047 * The attendee's email address, if available. This field must be present when
4048 * adding an attendee.
4049 */
4050 core.String email;
4051
4052 /** The attendee's Profile ID, if available. */
4053 core.String id;
4054
4055 /** Whether this is an optional attendee. Optional. The default is False. */
4056 core.bool optional;
4057
4058 /**
4059 * Whether the attendee is the organizer of the event. Read-only. The default
4060 * is False.
4061 */
4062 core.bool organizer;
4063
4064 /** Whether the attendee is a resource. Read-only. The default is False. */
4065 core.bool resource;
4066
4067 /**
4068 * The attendee's response status. Possible values are:
4069 * - "needsAction" - The attendee has not responded to the invitation.
4070 * - "declined" - The attendee has declined the invitation.
4071 * - "tentative" - The attendee has tentatively accepted the invitation.
4072 * - "accepted" - The attendee has accepted the invitation.
4073 */
4074 core.String responseStatus;
4075
4076 /**
4077 * Whether this entry represents the calendar on which this copy of the event
4078 * appears. Read-only. The default is False.
4079 */
4080 core.bool self;
4081
4082
4083 EventAttendee();
4084
4085 EventAttendee.fromJson(core.Map _json) {
4086 if (_json.containsKey("additionalGuests")) {
4087 additionalGuests = _json["additionalGuests"];
4088 }
4089 if (_json.containsKey("comment")) {
4090 comment = _json["comment"];
4091 }
4092 if (_json.containsKey("displayName")) {
4093 displayName = _json["displayName"];
4094 }
4095 if (_json.containsKey("email")) {
4096 email = _json["email"];
4097 }
4098 if (_json.containsKey("id")) {
4099 id = _json["id"];
4100 }
4101 if (_json.containsKey("optional")) {
4102 optional = _json["optional"];
4103 }
4104 if (_json.containsKey("organizer")) {
4105 organizer = _json["organizer"];
4106 }
4107 if (_json.containsKey("resource")) {
4108 resource = _json["resource"];
4109 }
4110 if (_json.containsKey("responseStatus")) {
4111 responseStatus = _json["responseStatus"];
4112 }
4113 if (_json.containsKey("self")) {
4114 self = _json["self"];
4115 }
4116 }
4117
4118 core.Map toJson() {
4119 var _json = new core.Map();
4120 if (additionalGuests != null) {
4121 _json["additionalGuests"] = additionalGuests;
4122 }
4123 if (comment != null) {
4124 _json["comment"] = comment;
4125 }
4126 if (displayName != null) {
4127 _json["displayName"] = displayName;
4128 }
4129 if (email != null) {
4130 _json["email"] = email;
4131 }
4132 if (id != null) {
4133 _json["id"] = id;
4134 }
4135 if (optional != null) {
4136 _json["optional"] = optional;
4137 }
4138 if (organizer != null) {
4139 _json["organizer"] = organizer;
4140 }
4141 if (resource != null) {
4142 _json["resource"] = resource;
4143 }
4144 if (responseStatus != null) {
4145 _json["responseStatus"] = responseStatus;
4146 }
4147 if (self != null) {
4148 _json["self"] = self;
4149 }
4150 return _json;
4151 }
4152 }
4153
4154
4155 /** Not documented yet. */
4156 class EventDateTime {
4157 /** The date, in the format "yyyy-mm-dd", if this is an all-day event. */
4158 core.DateTime date;
4159
4160 /**
4161 * The time, as a combined date-time value (formatted according to RFC 3339).
4162 * A time zone offset is required unless a time zone is explicitly specified
4163 * in timeZone.
4164 */
4165 core.DateTime dateTime;
4166
4167 /**
4168 * The name of the time zone in which the time is specified (e.g.
4169 * "Europe/Zurich"). Optional. The default is the time zone of the calendar.
4170 */
4171 core.String timeZone;
4172
4173
4174 EventDateTime();
4175
4176 EventDateTime.fromJson(core.Map _json) {
4177 if (_json.containsKey("date")) {
4178 date = core.DateTime.parse(_json["date"]);
4179 }
4180 if (_json.containsKey("dateTime")) {
4181 dateTime = core.DateTime.parse(_json["dateTime"]);
4182 }
4183 if (_json.containsKey("timeZone")) {
4184 timeZone = _json["timeZone"];
4185 }
4186 }
4187
4188 core.Map toJson() {
4189 var _json = new core.Map();
4190 if (date != null) {
4191 _json["date"] = "${(date).year.toString().padLeft(4, '0')}-${(date).month. toString().padLeft(2, '0')}-${(date).day.toString().padLeft(2, '0')}";
4192 }
4193 if (dateTime != null) {
4194 _json["dateTime"] = (dateTime).toIso8601String();
4195 }
4196 if (timeZone != null) {
4197 _json["timeZone"] = timeZone;
4198 }
4199 return _json;
4200 }
4201 }
4202
4203
4204 /** Not documented yet. */
4205 class EventReminder {
4206 /**
4207 * The method used by this reminder. Possible values are:
4208 * - "email" - Reminders are sent via email.
4209 * - "sms" - Reminders are sent via SMS.
4210 * - "popup" - Reminders are sent via a UI popup.
4211 */
4212 core.String method;
4213
4214 /**
4215 * Number of minutes before the start of the event when the reminder should
4216 * trigger.
4217 */
4218 core.int minutes;
4219
4220
4221 EventReminder();
4222
4223 EventReminder.fromJson(core.Map _json) {
4224 if (_json.containsKey("method")) {
4225 method = _json["method"];
4226 }
4227 if (_json.containsKey("minutes")) {
4228 minutes = _json["minutes"];
4229 }
4230 }
4231
4232 core.Map toJson() {
4233 var _json = new core.Map();
4234 if (method != null) {
4235 _json["method"] = method;
4236 }
4237 if (minutes != null) {
4238 _json["minutes"] = minutes;
4239 }
4240 return _json;
4241 }
4242 }
4243
4244
4245 /** Not documented yet. */
4246 class Events {
4247 /**
4248 * The user's access role for this calendar. Read-only. Possible values are:
4249 * - "none" - The user has no access.
4250 * - "freeBusyReader" - The user has read access to free/busy information.
4251 * - "reader" - The user has read access to the calendar. Private events will
4252 * appear to users with reader access, but event details will be hidden.
4253 * - "writer" - The user has read and write access to the calendar. Private
4254 * events will appear to users with writer access, and event details will be
4255 * visible.
4256 * - "owner" - The user has ownership of the calendar. This role has all of
4257 * the permissions of the writer role with the additional ability to see and
4258 * manipulate ACLs.
4259 */
4260 core.String accessRole;
4261
4262 /**
4263 * The default reminders on the calendar for the authenticated user. These
4264 * reminders apply to all events on this calendar that do not explicitly
4265 * override them (i.e. do not have reminders.useDefault set to True).
4266 */
4267 core.List<EventReminder> defaultReminders;
4268
4269 /** Description of the calendar. Read-only. */
4270 core.String description;
4271
4272 /** ETag of the collection. */
4273 core.String etag;
4274
4275 /** List of events on the calendar. */
4276 core.List<Event> items;
4277
4278 /** Type of the collection ("calendar#events"). */
4279 core.String kind;
4280
4281 /**
4282 * Token used to access the next page of this result. Omitted if no further
4283 * results are available, in which case nextSyncToken is provided.
4284 */
4285 core.String nextPageToken;
4286
4287 /**
4288 * Token used at a later point in time to retrieve only the entries that have
4289 * changed since this result was returned. Omitted if further results are
4290 * available, in which case nextPageToken is provided.
4291 */
4292 core.String nextSyncToken;
4293
4294 /** Title of the calendar. Read-only. */
4295 core.String summary;
4296
4297 /** The time zone of the calendar. Read-only. */
4298 core.String timeZone;
4299
4300 /**
4301 * Last modification time of the calendar (as a RFC 3339 timestamp).
4302 * Read-only.
4303 */
4304 core.DateTime updated;
4305
4306
4307 Events();
4308
4309 Events.fromJson(core.Map _json) {
4310 if (_json.containsKey("accessRole")) {
4311 accessRole = _json["accessRole"];
4312 }
4313 if (_json.containsKey("defaultReminders")) {
4314 defaultReminders = _json["defaultReminders"].map((value) => new EventRemin der.fromJson(value)).toList();
4315 }
4316 if (_json.containsKey("description")) {
4317 description = _json["description"];
4318 }
4319 if (_json.containsKey("etag")) {
4320 etag = _json["etag"];
4321 }
4322 if (_json.containsKey("items")) {
4323 items = _json["items"].map((value) => new Event.fromJson(value)).toList();
4324 }
4325 if (_json.containsKey("kind")) {
4326 kind = _json["kind"];
4327 }
4328 if (_json.containsKey("nextPageToken")) {
4329 nextPageToken = _json["nextPageToken"];
4330 }
4331 if (_json.containsKey("nextSyncToken")) {
4332 nextSyncToken = _json["nextSyncToken"];
4333 }
4334 if (_json.containsKey("summary")) {
4335 summary = _json["summary"];
4336 }
4337 if (_json.containsKey("timeZone")) {
4338 timeZone = _json["timeZone"];
4339 }
4340 if (_json.containsKey("updated")) {
4341 updated = core.DateTime.parse(_json["updated"]);
4342 }
4343 }
4344
4345 core.Map toJson() {
4346 var _json = new core.Map();
4347 if (accessRole != null) {
4348 _json["accessRole"] = accessRole;
4349 }
4350 if (defaultReminders != null) {
4351 _json["defaultReminders"] = defaultReminders.map((value) => (value).toJson ()).toList();
4352 }
4353 if (description != null) {
4354 _json["description"] = description;
4355 }
4356 if (etag != null) {
4357 _json["etag"] = etag;
4358 }
4359 if (items != null) {
4360 _json["items"] = items.map((value) => (value).toJson()).toList();
4361 }
4362 if (kind != null) {
4363 _json["kind"] = kind;
4364 }
4365 if (nextPageToken != null) {
4366 _json["nextPageToken"] = nextPageToken;
4367 }
4368 if (nextSyncToken != null) {
4369 _json["nextSyncToken"] = nextSyncToken;
4370 }
4371 if (summary != null) {
4372 _json["summary"] = summary;
4373 }
4374 if (timeZone != null) {
4375 _json["timeZone"] = timeZone;
4376 }
4377 if (updated != null) {
4378 _json["updated"] = (updated).toIso8601String();
4379 }
4380 return _json;
4381 }
4382 }
4383
4384
4385 /** Not documented yet. */
4386 class FreeBusyCalendar {
4387 /**
4388 * List of time ranges during which this calendar should be regarded as busy.
4389 */
4390 core.List<TimePeriod> busy;
4391
4392 /** Optional error(s) (if computation for the calendar failed). */
4393 core.List<Error> errors;
4394
4395
4396 FreeBusyCalendar();
4397
4398 FreeBusyCalendar.fromJson(core.Map _json) {
4399 if (_json.containsKey("busy")) {
4400 busy = _json["busy"].map((value) => new TimePeriod.fromJson(value)).toList ();
4401 }
4402 if (_json.containsKey("errors")) {
4403 errors = _json["errors"].map((value) => new Error.fromJson(value)).toList( );
4404 }
4405 }
4406
4407 core.Map toJson() {
4408 var _json = new core.Map();
4409 if (busy != null) {
4410 _json["busy"] = busy.map((value) => (value).toJson()).toList();
4411 }
4412 if (errors != null) {
4413 _json["errors"] = errors.map((value) => (value).toJson()).toList();
4414 }
4415 return _json;
4416 }
4417 }
4418
4419
4420 /** Not documented yet. */
4421 class FreeBusyGroup {
4422 /** List of calendars' identifiers within a group. */
4423 core.List<core.String> calendars;
4424
4425 /** Optional error(s) (if computation for the group failed). */
4426 core.List<Error> errors;
4427
4428
4429 FreeBusyGroup();
4430
4431 FreeBusyGroup.fromJson(core.Map _json) {
4432 if (_json.containsKey("calendars")) {
4433 calendars = _json["calendars"];
4434 }
4435 if (_json.containsKey("errors")) {
4436 errors = _json["errors"].map((value) => new Error.fromJson(value)).toList( );
4437 }
4438 }
4439
4440 core.Map toJson() {
4441 var _json = new core.Map();
4442 if (calendars != null) {
4443 _json["calendars"] = calendars;
4444 }
4445 if (errors != null) {
4446 _json["errors"] = errors.map((value) => (value).toJson()).toList();
4447 }
4448 return _json;
4449 }
4450 }
4451
4452
4453 /** Not documented yet. */
4454 class FreeBusyRequest {
4455 /**
4456 * Maximal number of calendars for which FreeBusy information is to be
4457 * provided. Optional.
4458 */
4459 core.int calendarExpansionMax;
4460
4461 /**
4462 * Maximal number of calendar identifiers to be provided for a single group.
4463 * Optional. An error will be returned for a group with more members than this
4464 * value.
4465 */
4466 core.int groupExpansionMax;
4467
4468 /** List of calendars and/or groups to query. */
4469 core.List<FreeBusyRequestItem> items;
4470
4471 /** The end of the interval for the query. */
4472 core.DateTime timeMax;
4473
4474 /** The start of the interval for the query. */
4475 core.DateTime timeMin;
4476
4477 /** Time zone used in the response. Optional. The default is UTC. */
4478 core.String timeZone;
4479
4480
4481 FreeBusyRequest();
4482
4483 FreeBusyRequest.fromJson(core.Map _json) {
4484 if (_json.containsKey("calendarExpansionMax")) {
4485 calendarExpansionMax = _json["calendarExpansionMax"];
4486 }
4487 if (_json.containsKey("groupExpansionMax")) {
4488 groupExpansionMax = _json["groupExpansionMax"];
4489 }
4490 if (_json.containsKey("items")) {
4491 items = _json["items"].map((value) => new FreeBusyRequestItem.fromJson(val ue)).toList();
4492 }
4493 if (_json.containsKey("timeMax")) {
4494 timeMax = core.DateTime.parse(_json["timeMax"]);
4495 }
4496 if (_json.containsKey("timeMin")) {
4497 timeMin = core.DateTime.parse(_json["timeMin"]);
4498 }
4499 if (_json.containsKey("timeZone")) {
4500 timeZone = _json["timeZone"];
4501 }
4502 }
4503
4504 core.Map toJson() {
4505 var _json = new core.Map();
4506 if (calendarExpansionMax != null) {
4507 _json["calendarExpansionMax"] = calendarExpansionMax;
4508 }
4509 if (groupExpansionMax != null) {
4510 _json["groupExpansionMax"] = groupExpansionMax;
4511 }
4512 if (items != null) {
4513 _json["items"] = items.map((value) => (value).toJson()).toList();
4514 }
4515 if (timeMax != null) {
4516 _json["timeMax"] = (timeMax).toIso8601String();
4517 }
4518 if (timeMin != null) {
4519 _json["timeMin"] = (timeMin).toIso8601String();
4520 }
4521 if (timeZone != null) {
4522 _json["timeZone"] = timeZone;
4523 }
4524 return _json;
4525 }
4526 }
4527
4528
4529 /** Not documented yet. */
4530 class FreeBusyRequestItem {
4531 /** The identifier of a calendar or a group. */
4532 core.String id;
4533
4534
4535 FreeBusyRequestItem();
4536
4537 FreeBusyRequestItem.fromJson(core.Map _json) {
4538 if (_json.containsKey("id")) {
4539 id = _json["id"];
4540 }
4541 }
4542
4543 core.Map toJson() {
4544 var _json = new core.Map();
4545 if (id != null) {
4546 _json["id"] = id;
4547 }
4548 return _json;
4549 }
4550 }
4551
4552
4553 /** Not documented yet. */
4554 class FreeBusyResponse {
4555 /** List of free/busy information for calendars. */
4556 core.Map<core.String, FreeBusyCalendar> calendars;
4557
4558 /** Expansion of groups. */
4559 core.Map<core.String, FreeBusyGroup> groups;
4560
4561 /** Type of the resource ("calendar#freeBusy"). */
4562 core.String kind;
4563
4564 /** The end of the interval. */
4565 core.DateTime timeMax;
4566
4567 /** The start of the interval. */
4568 core.DateTime timeMin;
4569
4570
4571 FreeBusyResponse();
4572
4573 FreeBusyResponse.fromJson(core.Map _json) {
4574 if (_json.containsKey("calendars")) {
4575 calendars = common_internal.mapMap(_json["calendars"], (item) => new FreeB usyCalendar.fromJson(item));
4576 }
4577 if (_json.containsKey("groups")) {
4578 groups = common_internal.mapMap(_json["groups"], (item) => new FreeBusyGro up.fromJson(item));
4579 }
4580 if (_json.containsKey("kind")) {
4581 kind = _json["kind"];
4582 }
4583 if (_json.containsKey("timeMax")) {
4584 timeMax = core.DateTime.parse(_json["timeMax"]);
4585 }
4586 if (_json.containsKey("timeMin")) {
4587 timeMin = core.DateTime.parse(_json["timeMin"]);
4588 }
4589 }
4590
4591 core.Map toJson() {
4592 var _json = new core.Map();
4593 if (calendars != null) {
4594 _json["calendars"] = common_internal.mapMap(calendars, (item) => (item).to Json());
4595 }
4596 if (groups != null) {
4597 _json["groups"] = common_internal.mapMap(groups, (item) => (item).toJson() );
4598 }
4599 if (kind != null) {
4600 _json["kind"] = kind;
4601 }
4602 if (timeMax != null) {
4603 _json["timeMax"] = (timeMax).toIso8601String();
4604 }
4605 if (timeMin != null) {
4606 _json["timeMin"] = (timeMin).toIso8601String();
4607 }
4608 return _json;
4609 }
4610 }
4611
4612
4613 /** Not documented yet. */
4614 class Setting {
4615 /** ETag of the resource. */
4616 core.String etag;
4617
4618 /** The id of the user setting. */
4619 core.String id;
4620
4621 /** Type of the resource ("calendar#setting"). */
4622 core.String kind;
4623
4624 /**
4625 * Value of the user setting. The format of the value depends on the ID of the
4626 * setting. It must always be a UTF-8 string of length up to 1024 characters.
4627 */
4628 core.String value;
4629
4630
4631 Setting();
4632
4633 Setting.fromJson(core.Map _json) {
4634 if (_json.containsKey("etag")) {
4635 etag = _json["etag"];
4636 }
4637 if (_json.containsKey("id")) {
4638 id = _json["id"];
4639 }
4640 if (_json.containsKey("kind")) {
4641 kind = _json["kind"];
4642 }
4643 if (_json.containsKey("value")) {
4644 value = _json["value"];
4645 }
4646 }
4647
4648 core.Map toJson() {
4649 var _json = new core.Map();
4650 if (etag != null) {
4651 _json["etag"] = etag;
4652 }
4653 if (id != null) {
4654 _json["id"] = id;
4655 }
4656 if (kind != null) {
4657 _json["kind"] = kind;
4658 }
4659 if (value != null) {
4660 _json["value"] = value;
4661 }
4662 return _json;
4663 }
4664 }
4665
4666
4667 /** Not documented yet. */
4668 class Settings {
4669 /** Etag of the collection. */
4670 core.String etag;
4671
4672 /** List of user settings. */
4673 core.List<Setting> items;
4674
4675 /** Type of the collection ("calendar#settings"). */
4676 core.String kind;
4677
4678 /**
4679 * Token used to access the next page of this result. Omitted if no further
4680 * results are available, in which case nextSyncToken is provided.
4681 */
4682 core.String nextPageToken;
4683
4684 /**
4685 * Token used at a later point in time to retrieve only the entries that have
4686 * changed since this result was returned. Omitted if further results are
4687 * available, in which case nextPageToken is provided.
4688 */
4689 core.String nextSyncToken;
4690
4691
4692 Settings();
4693
4694 Settings.fromJson(core.Map _json) {
4695 if (_json.containsKey("etag")) {
4696 etag = _json["etag"];
4697 }
4698 if (_json.containsKey("items")) {
4699 items = _json["items"].map((value) => new Setting.fromJson(value)).toList( );
4700 }
4701 if (_json.containsKey("kind")) {
4702 kind = _json["kind"];
4703 }
4704 if (_json.containsKey("nextPageToken")) {
4705 nextPageToken = _json["nextPageToken"];
4706 }
4707 if (_json.containsKey("nextSyncToken")) {
4708 nextSyncToken = _json["nextSyncToken"];
4709 }
4710 }
4711
4712 core.Map toJson() {
4713 var _json = new core.Map();
4714 if (etag != null) {
4715 _json["etag"] = etag;
4716 }
4717 if (items != null) {
4718 _json["items"] = items.map((value) => (value).toJson()).toList();
4719 }
4720 if (kind != null) {
4721 _json["kind"] = kind;
4722 }
4723 if (nextPageToken != null) {
4724 _json["nextPageToken"] = nextPageToken;
4725 }
4726 if (nextSyncToken != null) {
4727 _json["nextSyncToken"] = nextSyncToken;
4728 }
4729 return _json;
4730 }
4731 }
4732
4733
4734 /** Not documented yet. */
4735 class TimePeriod {
4736 /** The (exclusive) end of the time period. */
4737 core.DateTime end;
4738
4739 /** The (inclusive) start of the time period. */
4740 core.DateTime start;
4741
4742
4743 TimePeriod();
4744
4745 TimePeriod.fromJson(core.Map _json) {
4746 if (_json.containsKey("end")) {
4747 end = core.DateTime.parse(_json["end"]);
4748 }
4749 if (_json.containsKey("start")) {
4750 start = core.DateTime.parse(_json["start"]);
4751 }
4752 }
4753
4754 core.Map toJson() {
4755 var _json = new core.Map();
4756 if (end != null) {
4757 _json["end"] = (end).toIso8601String();
4758 }
4759 if (start != null) {
4760 _json["start"] = (start).toIso8601String();
4761 }
4762 return _json;
4763 }
4764 }
4765
4766
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698