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