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