OLD | NEW |
(Empty) | |
| 1 library googleapis.plus.v1; |
| 2 |
| 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection_1; |
| 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; |
| 7 |
| 8 import "package:crypto/crypto.dart" as crypto; |
| 9 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; |
| 11 import '../common/common.dart' as common; |
| 12 |
| 13 export '../common/common.dart' show ApiRequestError; |
| 14 export '../common/common.dart' show DetailedApiRequestError; |
| 15 |
| 16 /** |
| 17 * The Google+ API enables developers to build on top of the Google+ platform. |
| 18 */ |
| 19 class PlusApi { |
| 20 /** Know your basic profile info and list of people in your circles. */ |
| 21 static const PlusLoginScope = "https://www.googleapis.com/auth/plus.login"; |
| 22 |
| 23 /** Know who you are on Google */ |
| 24 static const PlusMeScope = "https://www.googleapis.com/auth/plus.me"; |
| 25 |
| 26 /** View your email address */ |
| 27 static const UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.em
ail"; |
| 28 |
| 29 /** View your basic profile info */ |
| 30 static const UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo.
profile"; |
| 31 |
| 32 |
| 33 final common_internal.ApiRequester _requester; |
| 34 |
| 35 ActivitiesResourceApi get activities => new ActivitiesResourceApi(_requester); |
| 36 CommentsResourceApi get comments => new CommentsResourceApi(_requester); |
| 37 MomentsResourceApi get moments => new MomentsResourceApi(_requester); |
| 38 PeopleResourceApi get people => new PeopleResourceApi(_requester); |
| 39 |
| 40 PlusApi(http.Client client) : |
| 41 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/plus/v1/"); |
| 42 } |
| 43 |
| 44 |
| 45 /** Not documented yet. */ |
| 46 class ActivitiesResourceApi { |
| 47 final common_internal.ApiRequester _requester; |
| 48 |
| 49 ActivitiesResourceApi(common_internal.ApiRequester client) : |
| 50 _requester = client; |
| 51 |
| 52 /** |
| 53 * Get an activity. |
| 54 * |
| 55 * Request parameters: |
| 56 * |
| 57 * [activityId] - The ID of the activity to get. |
| 58 * |
| 59 * Completes with a [Activity]. |
| 60 * |
| 61 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 62 * error. |
| 63 * |
| 64 * If the used [http.Client] completes with an error when making a REST call, |
| 65 * this method will complete with the same error. |
| 66 */ |
| 67 async.Future<Activity> get(core.String activityId) { |
| 68 var _url = null; |
| 69 var _queryParams = new core.Map(); |
| 70 var _uploadMedia = null; |
| 71 var _uploadOptions = null; |
| 72 var _downloadOptions = common.DownloadOptions.Metadata; |
| 73 var _body = null; |
| 74 |
| 75 if (activityId == null) { |
| 76 throw new core.ArgumentError("Parameter activityId is required."); |
| 77 } |
| 78 |
| 79 |
| 80 _url = 'activities/' + common_internal.Escaper.ecapeVariable('$activityId'); |
| 81 |
| 82 var _response = _requester.request(_url, |
| 83 "GET", |
| 84 body: _body, |
| 85 queryParams: _queryParams, |
| 86 uploadOptions: _uploadOptions, |
| 87 uploadMedia: _uploadMedia, |
| 88 downloadOptions: _downloadOptions); |
| 89 return _response.then((data) => new Activity.fromJson(data)); |
| 90 } |
| 91 |
| 92 /** |
| 93 * List all of the activities in the specified collection for a particular |
| 94 * user. |
| 95 * |
| 96 * Request parameters: |
| 97 * |
| 98 * [userId] - The ID of the user to get activities for. The special value "me" |
| 99 * can be used to indicate the authenticated user. |
| 100 * |
| 101 * [collection] - The collection of activities to list. |
| 102 * Possible string values are: |
| 103 * - "public" : All public activities created by the specified user. |
| 104 * |
| 105 * [maxResults] - The maximum number of activities to include in the response, |
| 106 * which is used for paging. For any response, the actual number returned |
| 107 * might be less than the specified maxResults. |
| 108 * Value must be between "1" and "100". |
| 109 * |
| 110 * [pageToken] - The continuation token, which is used to page through large |
| 111 * result sets. To get the next page of results, set this parameter to the |
| 112 * value of "nextPageToken" from the previous response. |
| 113 * |
| 114 * Completes with a [ActivityFeed]. |
| 115 * |
| 116 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 117 * error. |
| 118 * |
| 119 * If the used [http.Client] completes with an error when making a REST call, |
| 120 * this method will complete with the same error. |
| 121 */ |
| 122 async.Future<ActivityFeed> list(core.String userId, core.String collection, {c
ore.int maxResults, core.String pageToken}) { |
| 123 var _url = null; |
| 124 var _queryParams = new core.Map(); |
| 125 var _uploadMedia = null; |
| 126 var _uploadOptions = null; |
| 127 var _downloadOptions = common.DownloadOptions.Metadata; |
| 128 var _body = null; |
| 129 |
| 130 if (userId == null) { |
| 131 throw new core.ArgumentError("Parameter userId is required."); |
| 132 } |
| 133 if (collection == null) { |
| 134 throw new core.ArgumentError("Parameter collection is required."); |
| 135 } |
| 136 if (maxResults != null) { |
| 137 _queryParams["maxResults"] = ["${maxResults}"]; |
| 138 } |
| 139 if (pageToken != null) { |
| 140 _queryParams["pageToken"] = [pageToken]; |
| 141 } |
| 142 |
| 143 |
| 144 _url = 'people/' + common_internal.Escaper.ecapeVariable('$userId') + '/acti
vities/' + common_internal.Escaper.ecapeVariable('$collection'); |
| 145 |
| 146 var _response = _requester.request(_url, |
| 147 "GET", |
| 148 body: _body, |
| 149 queryParams: _queryParams, |
| 150 uploadOptions: _uploadOptions, |
| 151 uploadMedia: _uploadMedia, |
| 152 downloadOptions: _downloadOptions); |
| 153 return _response.then((data) => new ActivityFeed.fromJson(data)); |
| 154 } |
| 155 |
| 156 /** |
| 157 * Search public activities. |
| 158 * |
| 159 * Request parameters: |
| 160 * |
| 161 * [query] - Full-text search query string. |
| 162 * |
| 163 * [language] - Specify the preferred language to search with. See search |
| 164 * language codes for available values. |
| 165 * |
| 166 * [maxResults] - The maximum number of activities to include in the response, |
| 167 * which is used for paging. For any response, the actual number returned |
| 168 * might be less than the specified maxResults. |
| 169 * Value must be between "1" and "20". |
| 170 * |
| 171 * [orderBy] - Specifies how to order search results. |
| 172 * Possible string values are: |
| 173 * - "best" : Sort activities by relevance to the user, most relevant first. |
| 174 * - "recent" : Sort activities by published date, most recent first. |
| 175 * |
| 176 * [pageToken] - The continuation token, which is used to page through large |
| 177 * result sets. To get the next page of results, set this parameter to the |
| 178 * value of "nextPageToken" from the previous response. This token can be of |
| 179 * any length. |
| 180 * |
| 181 * Completes with a [ActivityFeed]. |
| 182 * |
| 183 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 184 * error. |
| 185 * |
| 186 * If the used [http.Client] completes with an error when making a REST call, |
| 187 * this method will complete with the same error. |
| 188 */ |
| 189 async.Future<ActivityFeed> search(core.String query, {core.String language, co
re.int maxResults, core.String orderBy, core.String pageToken}) { |
| 190 var _url = null; |
| 191 var _queryParams = new core.Map(); |
| 192 var _uploadMedia = null; |
| 193 var _uploadOptions = null; |
| 194 var _downloadOptions = common.DownloadOptions.Metadata; |
| 195 var _body = null; |
| 196 |
| 197 if (query == null) { |
| 198 throw new core.ArgumentError("Parameter query is required."); |
| 199 } |
| 200 _queryParams["query"] = [query]; |
| 201 if (language != null) { |
| 202 _queryParams["language"] = [language]; |
| 203 } |
| 204 if (maxResults != null) { |
| 205 _queryParams["maxResults"] = ["${maxResults}"]; |
| 206 } |
| 207 if (orderBy != null) { |
| 208 _queryParams["orderBy"] = [orderBy]; |
| 209 } |
| 210 if (pageToken != null) { |
| 211 _queryParams["pageToken"] = [pageToken]; |
| 212 } |
| 213 |
| 214 |
| 215 _url = 'activities'; |
| 216 |
| 217 var _response = _requester.request(_url, |
| 218 "GET", |
| 219 body: _body, |
| 220 queryParams: _queryParams, |
| 221 uploadOptions: _uploadOptions, |
| 222 uploadMedia: _uploadMedia, |
| 223 downloadOptions: _downloadOptions); |
| 224 return _response.then((data) => new ActivityFeed.fromJson(data)); |
| 225 } |
| 226 |
| 227 } |
| 228 |
| 229 |
| 230 /** Not documented yet. */ |
| 231 class CommentsResourceApi { |
| 232 final common_internal.ApiRequester _requester; |
| 233 |
| 234 CommentsResourceApi(common_internal.ApiRequester client) : |
| 235 _requester = client; |
| 236 |
| 237 /** |
| 238 * Get a comment. |
| 239 * |
| 240 * Request parameters: |
| 241 * |
| 242 * [commentId] - The ID of the comment to get. |
| 243 * |
| 244 * Completes with a [Comment]. |
| 245 * |
| 246 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 247 * error. |
| 248 * |
| 249 * If the used [http.Client] completes with an error when making a REST call, |
| 250 * this method will complete with the same error. |
| 251 */ |
| 252 async.Future<Comment> get(core.String commentId) { |
| 253 var _url = null; |
| 254 var _queryParams = new core.Map(); |
| 255 var _uploadMedia = null; |
| 256 var _uploadOptions = null; |
| 257 var _downloadOptions = common.DownloadOptions.Metadata; |
| 258 var _body = null; |
| 259 |
| 260 if (commentId == null) { |
| 261 throw new core.ArgumentError("Parameter commentId is required."); |
| 262 } |
| 263 |
| 264 |
| 265 _url = 'comments/' + common_internal.Escaper.ecapeVariable('$commentId'); |
| 266 |
| 267 var _response = _requester.request(_url, |
| 268 "GET", |
| 269 body: _body, |
| 270 queryParams: _queryParams, |
| 271 uploadOptions: _uploadOptions, |
| 272 uploadMedia: _uploadMedia, |
| 273 downloadOptions: _downloadOptions); |
| 274 return _response.then((data) => new Comment.fromJson(data)); |
| 275 } |
| 276 |
| 277 /** |
| 278 * List all of the comments for an activity. |
| 279 * |
| 280 * Request parameters: |
| 281 * |
| 282 * [activityId] - The ID of the activity to get comments for. |
| 283 * |
| 284 * [maxResults] - The maximum number of comments to include in the response, |
| 285 * which is used for paging. For any response, the actual number returned |
| 286 * might be less than the specified maxResults. |
| 287 * Value must be between "0" and "500". |
| 288 * |
| 289 * [pageToken] - The continuation token, which is used to page through large |
| 290 * result sets. To get the next page of results, set this parameter to the |
| 291 * value of "nextPageToken" from the previous response. |
| 292 * |
| 293 * [sortOrder] - The order in which to sort the list of comments. |
| 294 * Possible string values are: |
| 295 * - "ascending" : Sort oldest comments first. |
| 296 * - "descending" : Sort newest comments first. |
| 297 * |
| 298 * Completes with a [CommentFeed]. |
| 299 * |
| 300 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 301 * error. |
| 302 * |
| 303 * If the used [http.Client] completes with an error when making a REST call, |
| 304 * this method will complete with the same error. |
| 305 */ |
| 306 async.Future<CommentFeed> list(core.String activityId, {core.int maxResults, c
ore.String pageToken, core.String sortOrder}) { |
| 307 var _url = null; |
| 308 var _queryParams = new core.Map(); |
| 309 var _uploadMedia = null; |
| 310 var _uploadOptions = null; |
| 311 var _downloadOptions = common.DownloadOptions.Metadata; |
| 312 var _body = null; |
| 313 |
| 314 if (activityId == null) { |
| 315 throw new core.ArgumentError("Parameter activityId is required."); |
| 316 } |
| 317 if (maxResults != null) { |
| 318 _queryParams["maxResults"] = ["${maxResults}"]; |
| 319 } |
| 320 if (pageToken != null) { |
| 321 _queryParams["pageToken"] = [pageToken]; |
| 322 } |
| 323 if (sortOrder != null) { |
| 324 _queryParams["sortOrder"] = [sortOrder]; |
| 325 } |
| 326 |
| 327 |
| 328 _url = 'activities/' + common_internal.Escaper.ecapeVariable('$activityId')
+ '/comments'; |
| 329 |
| 330 var _response = _requester.request(_url, |
| 331 "GET", |
| 332 body: _body, |
| 333 queryParams: _queryParams, |
| 334 uploadOptions: _uploadOptions, |
| 335 uploadMedia: _uploadMedia, |
| 336 downloadOptions: _downloadOptions); |
| 337 return _response.then((data) => new CommentFeed.fromJson(data)); |
| 338 } |
| 339 |
| 340 } |
| 341 |
| 342 |
| 343 /** Not documented yet. */ |
| 344 class MomentsResourceApi { |
| 345 final common_internal.ApiRequester _requester; |
| 346 |
| 347 MomentsResourceApi(common_internal.ApiRequester client) : |
| 348 _requester = client; |
| 349 |
| 350 /** |
| 351 * Record a moment representing a user's action such as making a purchase or |
| 352 * commenting on a blog. |
| 353 * |
| 354 * [request] - The metadata request object. |
| 355 * |
| 356 * Request parameters: |
| 357 * |
| 358 * [userId] - The ID of the user to record actions for. The only valid values |
| 359 * are "me" and the ID of the authenticated user. |
| 360 * |
| 361 * [collection] - The collection to which to write moments. |
| 362 * Possible string values are: |
| 363 * - "vault" : The default collection for writing new moments. |
| 364 * |
| 365 * [debug] - Return the moment as written. Should be used only for debugging. |
| 366 * |
| 367 * Completes with a [Moment]. |
| 368 * |
| 369 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 370 * error. |
| 371 * |
| 372 * If the used [http.Client] completes with an error when making a REST call, |
| 373 * this method will complete with the same error. |
| 374 */ |
| 375 async.Future<Moment> insert(Moment request, core.String userId, core.String co
llection, {core.bool debug}) { |
| 376 var _url = null; |
| 377 var _queryParams = new core.Map(); |
| 378 var _uploadMedia = null; |
| 379 var _uploadOptions = null; |
| 380 var _downloadOptions = common.DownloadOptions.Metadata; |
| 381 var _body = null; |
| 382 |
| 383 if (request != null) { |
| 384 _body = convert.JSON.encode((request).toJson()); |
| 385 } |
| 386 if (userId == null) { |
| 387 throw new core.ArgumentError("Parameter userId is required."); |
| 388 } |
| 389 if (collection == null) { |
| 390 throw new core.ArgumentError("Parameter collection is required."); |
| 391 } |
| 392 if (debug != null) { |
| 393 _queryParams["debug"] = ["${debug}"]; |
| 394 } |
| 395 |
| 396 |
| 397 _url = 'people/' + common_internal.Escaper.ecapeVariable('$userId') + '/mome
nts/' + common_internal.Escaper.ecapeVariable('$collection'); |
| 398 |
| 399 var _response = _requester.request(_url, |
| 400 "POST", |
| 401 body: _body, |
| 402 queryParams: _queryParams, |
| 403 uploadOptions: _uploadOptions, |
| 404 uploadMedia: _uploadMedia, |
| 405 downloadOptions: _downloadOptions); |
| 406 return _response.then((data) => new Moment.fromJson(data)); |
| 407 } |
| 408 |
| 409 /** |
| 410 * List all of the moments for a particular user. |
| 411 * |
| 412 * Request parameters: |
| 413 * |
| 414 * [userId] - The ID of the user to get moments for. The special value "me" |
| 415 * can be used to indicate the authenticated user. |
| 416 * |
| 417 * [collection] - The collection of moments to list. |
| 418 * Possible string values are: |
| 419 * - "vault" : All moments created by the requesting application for the |
| 420 * authenticated user. |
| 421 * |
| 422 * [maxResults] - The maximum number of moments to include in the response, |
| 423 * which is used for paging. For any response, the actual number returned |
| 424 * might be less than the specified maxResults. |
| 425 * Value must be between "1" and "100". |
| 426 * |
| 427 * [pageToken] - The continuation token, which is used to page through large |
| 428 * result sets. To get the next page of results, set this parameter to the |
| 429 * value of "nextPageToken" from the previous response. |
| 430 * |
| 431 * [targetUrl] - Only moments containing this targetUrl will be returned. |
| 432 * |
| 433 * [type] - Only moments of this type will be returned. |
| 434 * |
| 435 * Completes with a [MomentsFeed]. |
| 436 * |
| 437 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 438 * error. |
| 439 * |
| 440 * If the used [http.Client] completes with an error when making a REST call, |
| 441 * this method will complete with the same error. |
| 442 */ |
| 443 async.Future<MomentsFeed> list(core.String userId, core.String collection, {co
re.int maxResults, core.String pageToken, core.String targetUrl, core.String typ
e}) { |
| 444 var _url = null; |
| 445 var _queryParams = new core.Map(); |
| 446 var _uploadMedia = null; |
| 447 var _uploadOptions = null; |
| 448 var _downloadOptions = common.DownloadOptions.Metadata; |
| 449 var _body = null; |
| 450 |
| 451 if (userId == null) { |
| 452 throw new core.ArgumentError("Parameter userId is required."); |
| 453 } |
| 454 if (collection == null) { |
| 455 throw new core.ArgumentError("Parameter collection is required."); |
| 456 } |
| 457 if (maxResults != null) { |
| 458 _queryParams["maxResults"] = ["${maxResults}"]; |
| 459 } |
| 460 if (pageToken != null) { |
| 461 _queryParams["pageToken"] = [pageToken]; |
| 462 } |
| 463 if (targetUrl != null) { |
| 464 _queryParams["targetUrl"] = [targetUrl]; |
| 465 } |
| 466 if (type != null) { |
| 467 _queryParams["type"] = [type]; |
| 468 } |
| 469 |
| 470 |
| 471 _url = 'people/' + common_internal.Escaper.ecapeVariable('$userId') + '/mome
nts/' + common_internal.Escaper.ecapeVariable('$collection'); |
| 472 |
| 473 var _response = _requester.request(_url, |
| 474 "GET", |
| 475 body: _body, |
| 476 queryParams: _queryParams, |
| 477 uploadOptions: _uploadOptions, |
| 478 uploadMedia: _uploadMedia, |
| 479 downloadOptions: _downloadOptions); |
| 480 return _response.then((data) => new MomentsFeed.fromJson(data)); |
| 481 } |
| 482 |
| 483 /** |
| 484 * Delete a moment. |
| 485 * |
| 486 * Request parameters: |
| 487 * |
| 488 * [id] - The ID of the moment to delete. |
| 489 * |
| 490 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 491 * error. |
| 492 * |
| 493 * If the used [http.Client] completes with an error when making a REST call, |
| 494 * this method will complete with the same error. |
| 495 */ |
| 496 async.Future remove(core.String id) { |
| 497 var _url = null; |
| 498 var _queryParams = new core.Map(); |
| 499 var _uploadMedia = null; |
| 500 var _uploadOptions = null; |
| 501 var _downloadOptions = common.DownloadOptions.Metadata; |
| 502 var _body = null; |
| 503 |
| 504 if (id == null) { |
| 505 throw new core.ArgumentError("Parameter id is required."); |
| 506 } |
| 507 |
| 508 _downloadOptions = null; |
| 509 |
| 510 _url = 'moments/' + common_internal.Escaper.ecapeVariable('$id'); |
| 511 |
| 512 var _response = _requester.request(_url, |
| 513 "DELETE", |
| 514 body: _body, |
| 515 queryParams: _queryParams, |
| 516 uploadOptions: _uploadOptions, |
| 517 uploadMedia: _uploadMedia, |
| 518 downloadOptions: _downloadOptions); |
| 519 return _response.then((data) => null); |
| 520 } |
| 521 |
| 522 } |
| 523 |
| 524 |
| 525 /** Not documented yet. */ |
| 526 class PeopleResourceApi { |
| 527 final common_internal.ApiRequester _requester; |
| 528 |
| 529 PeopleResourceApi(common_internal.ApiRequester client) : |
| 530 _requester = client; |
| 531 |
| 532 /** |
| 533 * Get a person's profile. If your app uses scope |
| 534 * https://www.googleapis.com/auth/plus.login, this method is guaranteed to |
| 535 * return ageRange and language. |
| 536 * |
| 537 * Request parameters: |
| 538 * |
| 539 * [userId] - The ID of the person to get the profile for. The special value |
| 540 * "me" can be used to indicate the authenticated user. |
| 541 * |
| 542 * Completes with a [Person]. |
| 543 * |
| 544 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 545 * error. |
| 546 * |
| 547 * If the used [http.Client] completes with an error when making a REST call, |
| 548 * this method will complete with the same error. |
| 549 */ |
| 550 async.Future<Person> get(core.String userId) { |
| 551 var _url = null; |
| 552 var _queryParams = new core.Map(); |
| 553 var _uploadMedia = null; |
| 554 var _uploadOptions = null; |
| 555 var _downloadOptions = common.DownloadOptions.Metadata; |
| 556 var _body = null; |
| 557 |
| 558 if (userId == null) { |
| 559 throw new core.ArgumentError("Parameter userId is required."); |
| 560 } |
| 561 |
| 562 |
| 563 _url = 'people/' + common_internal.Escaper.ecapeVariable('$userId'); |
| 564 |
| 565 var _response = _requester.request(_url, |
| 566 "GET", |
| 567 body: _body, |
| 568 queryParams: _queryParams, |
| 569 uploadOptions: _uploadOptions, |
| 570 uploadMedia: _uploadMedia, |
| 571 downloadOptions: _downloadOptions); |
| 572 return _response.then((data) => new Person.fromJson(data)); |
| 573 } |
| 574 |
| 575 /** |
| 576 * List all of the people in the specified collection. |
| 577 * |
| 578 * Request parameters: |
| 579 * |
| 580 * [userId] - Get the collection of people for the person identified. Use "me" |
| 581 * to indicate the authenticated user. |
| 582 * |
| 583 * [collection] - The collection of people to list. |
| 584 * Possible string values are: |
| 585 * - "connected" : The list of visible people in the authenticated user's |
| 586 * circles who also use the requesting app. This list is limited to users who |
| 587 * made their app activities visible to the authenticated user. |
| 588 * - "visible" : The list of people who this user has added to one or more |
| 589 * circles, limited to the circles visible to the requesting application. |
| 590 * |
| 591 * [maxResults] - The maximum number of people to include in the response, |
| 592 * which is used for paging. For any response, the actual number returned |
| 593 * might be less than the specified maxResults. |
| 594 * Value must be between "1" and "100". |
| 595 * |
| 596 * [orderBy] - The order to return people in. |
| 597 * Possible string values are: |
| 598 * - "alphabetical" : Order the people by their display name. |
| 599 * - "best" : Order people based on the relevence to the viewer. |
| 600 * |
| 601 * [pageToken] - The continuation token, which is used to page through large |
| 602 * result sets. To get the next page of results, set this parameter to the |
| 603 * value of "nextPageToken" from the previous response. |
| 604 * |
| 605 * Completes with a [PeopleFeed]. |
| 606 * |
| 607 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 608 * error. |
| 609 * |
| 610 * If the used [http.Client] completes with an error when making a REST call, |
| 611 * this method will complete with the same error. |
| 612 */ |
| 613 async.Future<PeopleFeed> list(core.String userId, core.String collection, {cor
e.int maxResults, core.String orderBy, core.String pageToken}) { |
| 614 var _url = null; |
| 615 var _queryParams = new core.Map(); |
| 616 var _uploadMedia = null; |
| 617 var _uploadOptions = null; |
| 618 var _downloadOptions = common.DownloadOptions.Metadata; |
| 619 var _body = null; |
| 620 |
| 621 if (userId == null) { |
| 622 throw new core.ArgumentError("Parameter userId is required."); |
| 623 } |
| 624 if (collection == null) { |
| 625 throw new core.ArgumentError("Parameter collection is required."); |
| 626 } |
| 627 if (maxResults != null) { |
| 628 _queryParams["maxResults"] = ["${maxResults}"]; |
| 629 } |
| 630 if (orderBy != null) { |
| 631 _queryParams["orderBy"] = [orderBy]; |
| 632 } |
| 633 if (pageToken != null) { |
| 634 _queryParams["pageToken"] = [pageToken]; |
| 635 } |
| 636 |
| 637 |
| 638 _url = 'people/' + common_internal.Escaper.ecapeVariable('$userId') + '/peop
le/' + common_internal.Escaper.ecapeVariable('$collection'); |
| 639 |
| 640 var _response = _requester.request(_url, |
| 641 "GET", |
| 642 body: _body, |
| 643 queryParams: _queryParams, |
| 644 uploadOptions: _uploadOptions, |
| 645 uploadMedia: _uploadMedia, |
| 646 downloadOptions: _downloadOptions); |
| 647 return _response.then((data) => new PeopleFeed.fromJson(data)); |
| 648 } |
| 649 |
| 650 /** |
| 651 * List all of the people in the specified collection for a particular |
| 652 * activity. |
| 653 * |
| 654 * Request parameters: |
| 655 * |
| 656 * [activityId] - The ID of the activity to get the list of people for. |
| 657 * |
| 658 * [collection] - The collection of people to list. |
| 659 * Possible string values are: |
| 660 * - "plusoners" : List all people who have +1'd this activity. |
| 661 * - "resharers" : List all people who have reshared this activity. |
| 662 * |
| 663 * [maxResults] - The maximum number of people to include in the response, |
| 664 * which is used for paging. For any response, the actual number returned |
| 665 * might be less than the specified maxResults. |
| 666 * Value must be between "1" and "100". |
| 667 * |
| 668 * [pageToken] - The continuation token, which is used to page through large |
| 669 * result sets. To get the next page of results, set this parameter to the |
| 670 * value of "nextPageToken" from the previous response. |
| 671 * |
| 672 * Completes with a [PeopleFeed]. |
| 673 * |
| 674 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 675 * error. |
| 676 * |
| 677 * If the used [http.Client] completes with an error when making a REST call, |
| 678 * this method will complete with the same error. |
| 679 */ |
| 680 async.Future<PeopleFeed> listByActivity(core.String activityId, core.String co
llection, {core.int maxResults, core.String pageToken}) { |
| 681 var _url = null; |
| 682 var _queryParams = new core.Map(); |
| 683 var _uploadMedia = null; |
| 684 var _uploadOptions = null; |
| 685 var _downloadOptions = common.DownloadOptions.Metadata; |
| 686 var _body = null; |
| 687 |
| 688 if (activityId == null) { |
| 689 throw new core.ArgumentError("Parameter activityId is required."); |
| 690 } |
| 691 if (collection == null) { |
| 692 throw new core.ArgumentError("Parameter collection is required."); |
| 693 } |
| 694 if (maxResults != null) { |
| 695 _queryParams["maxResults"] = ["${maxResults}"]; |
| 696 } |
| 697 if (pageToken != null) { |
| 698 _queryParams["pageToken"] = [pageToken]; |
| 699 } |
| 700 |
| 701 |
| 702 _url = 'activities/' + common_internal.Escaper.ecapeVariable('$activityId')
+ '/people/' + common_internal.Escaper.ecapeVariable('$collection'); |
| 703 |
| 704 var _response = _requester.request(_url, |
| 705 "GET", |
| 706 body: _body, |
| 707 queryParams: _queryParams, |
| 708 uploadOptions: _uploadOptions, |
| 709 uploadMedia: _uploadMedia, |
| 710 downloadOptions: _downloadOptions); |
| 711 return _response.then((data) => new PeopleFeed.fromJson(data)); |
| 712 } |
| 713 |
| 714 /** |
| 715 * Search all public profiles. |
| 716 * |
| 717 * Request parameters: |
| 718 * |
| 719 * [query] - Specify a query string for full text search of public text in all |
| 720 * profiles. |
| 721 * |
| 722 * [language] - Specify the preferred language to search with. See search |
| 723 * language codes for available values. |
| 724 * |
| 725 * [maxResults] - The maximum number of people to include in the response, |
| 726 * which is used for paging. For any response, the actual number returned |
| 727 * might be less than the specified maxResults. |
| 728 * Value must be between "1" and "50". |
| 729 * |
| 730 * [pageToken] - The continuation token, which is used to page through large |
| 731 * result sets. To get the next page of results, set this parameter to the |
| 732 * value of "nextPageToken" from the previous response. This token can be of |
| 733 * any length. |
| 734 * |
| 735 * Completes with a [PeopleFeed]. |
| 736 * |
| 737 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 738 * error. |
| 739 * |
| 740 * If the used [http.Client] completes with an error when making a REST call, |
| 741 * this method will complete with the same error. |
| 742 */ |
| 743 async.Future<PeopleFeed> search(core.String query, {core.String language, core
.int maxResults, core.String pageToken}) { |
| 744 var _url = null; |
| 745 var _queryParams = new core.Map(); |
| 746 var _uploadMedia = null; |
| 747 var _uploadOptions = null; |
| 748 var _downloadOptions = common.DownloadOptions.Metadata; |
| 749 var _body = null; |
| 750 |
| 751 if (query == null) { |
| 752 throw new core.ArgumentError("Parameter query is required."); |
| 753 } |
| 754 _queryParams["query"] = [query]; |
| 755 if (language != null) { |
| 756 _queryParams["language"] = [language]; |
| 757 } |
| 758 if (maxResults != null) { |
| 759 _queryParams["maxResults"] = ["${maxResults}"]; |
| 760 } |
| 761 if (pageToken != null) { |
| 762 _queryParams["pageToken"] = [pageToken]; |
| 763 } |
| 764 |
| 765 |
| 766 _url = 'people'; |
| 767 |
| 768 var _response = _requester.request(_url, |
| 769 "GET", |
| 770 body: _body, |
| 771 queryParams: _queryParams, |
| 772 uploadOptions: _uploadOptions, |
| 773 uploadMedia: _uploadMedia, |
| 774 downloadOptions: _downloadOptions); |
| 775 return _response.then((data) => new PeopleFeed.fromJson(data)); |
| 776 } |
| 777 |
| 778 } |
| 779 |
| 780 |
| 781 |
| 782 /** Not documented yet. */ |
| 783 class Acl { |
| 784 /** Description of the access granted, suitable for display. */ |
| 785 core.String description; |
| 786 |
| 787 /** The list of access entries. */ |
| 788 core.List<PlusAclentryResource> items; |
| 789 |
| 790 /** |
| 791 * Identifies this resource as a collection of access controls. Value: |
| 792 * "plus#acl". |
| 793 */ |
| 794 core.String kind; |
| 795 |
| 796 |
| 797 Acl(); |
| 798 |
| 799 Acl.fromJson(core.Map _json) { |
| 800 if (_json.containsKey("description")) { |
| 801 description = _json["description"]; |
| 802 } |
| 803 if (_json.containsKey("items")) { |
| 804 items = _json["items"].map((value) => new PlusAclentryResource.fromJson(va
lue)).toList(); |
| 805 } |
| 806 if (_json.containsKey("kind")) { |
| 807 kind = _json["kind"]; |
| 808 } |
| 809 } |
| 810 |
| 811 core.Map toJson() { |
| 812 var _json = new core.Map(); |
| 813 if (description != null) { |
| 814 _json["description"] = description; |
| 815 } |
| 816 if (items != null) { |
| 817 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 818 } |
| 819 if (kind != null) { |
| 820 _json["kind"] = kind; |
| 821 } |
| 822 return _json; |
| 823 } |
| 824 } |
| 825 |
| 826 |
| 827 /** The image representation of the actor. */ |
| 828 class ActivityActorImage { |
| 829 /** |
| 830 * The URL of the actor's profile photo. To resize the image and crop it to a |
| 831 * square, append the query string ?sz=x, where x is the dimension in pixels |
| 832 * of each side. |
| 833 */ |
| 834 core.String url; |
| 835 |
| 836 |
| 837 ActivityActorImage(); |
| 838 |
| 839 ActivityActorImage.fromJson(core.Map _json) { |
| 840 if (_json.containsKey("url")) { |
| 841 url = _json["url"]; |
| 842 } |
| 843 } |
| 844 |
| 845 core.Map toJson() { |
| 846 var _json = new core.Map(); |
| 847 if (url != null) { |
| 848 _json["url"] = url; |
| 849 } |
| 850 return _json; |
| 851 } |
| 852 } |
| 853 |
| 854 |
| 855 /** An object representation of the individual components of name. */ |
| 856 class ActivityActorName { |
| 857 /** The family name ("last name") of the actor. */ |
| 858 core.String familyName; |
| 859 |
| 860 /** The given name ("first name") of the actor. */ |
| 861 core.String givenName; |
| 862 |
| 863 |
| 864 ActivityActorName(); |
| 865 |
| 866 ActivityActorName.fromJson(core.Map _json) { |
| 867 if (_json.containsKey("familyName")) { |
| 868 familyName = _json["familyName"]; |
| 869 } |
| 870 if (_json.containsKey("givenName")) { |
| 871 givenName = _json["givenName"]; |
| 872 } |
| 873 } |
| 874 |
| 875 core.Map toJson() { |
| 876 var _json = new core.Map(); |
| 877 if (familyName != null) { |
| 878 _json["familyName"] = familyName; |
| 879 } |
| 880 if (givenName != null) { |
| 881 _json["givenName"] = givenName; |
| 882 } |
| 883 return _json; |
| 884 } |
| 885 } |
| 886 |
| 887 |
| 888 /** The person who performed this activity. */ |
| 889 class ActivityActor { |
| 890 /** The name of the actor, suitable for display. */ |
| 891 core.String displayName; |
| 892 |
| 893 /** The ID of the actor's Person resource. */ |
| 894 core.String id; |
| 895 |
| 896 /** The image representation of the actor. */ |
| 897 ActivityActorImage image; |
| 898 |
| 899 /** An object representation of the individual components of name. */ |
| 900 ActivityActorName name; |
| 901 |
| 902 /** The link to the actor's Google profile. */ |
| 903 core.String url; |
| 904 |
| 905 |
| 906 ActivityActor(); |
| 907 |
| 908 ActivityActor.fromJson(core.Map _json) { |
| 909 if (_json.containsKey("displayName")) { |
| 910 displayName = _json["displayName"]; |
| 911 } |
| 912 if (_json.containsKey("id")) { |
| 913 id = _json["id"]; |
| 914 } |
| 915 if (_json.containsKey("image")) { |
| 916 image = new ActivityActorImage.fromJson(_json["image"]); |
| 917 } |
| 918 if (_json.containsKey("name")) { |
| 919 name = new ActivityActorName.fromJson(_json["name"]); |
| 920 } |
| 921 if (_json.containsKey("url")) { |
| 922 url = _json["url"]; |
| 923 } |
| 924 } |
| 925 |
| 926 core.Map toJson() { |
| 927 var _json = new core.Map(); |
| 928 if (displayName != null) { |
| 929 _json["displayName"] = displayName; |
| 930 } |
| 931 if (id != null) { |
| 932 _json["id"] = id; |
| 933 } |
| 934 if (image != null) { |
| 935 _json["image"] = (image).toJson(); |
| 936 } |
| 937 if (name != null) { |
| 938 _json["name"] = (name).toJson(); |
| 939 } |
| 940 if (url != null) { |
| 941 _json["url"] = url; |
| 942 } |
| 943 return _json; |
| 944 } |
| 945 } |
| 946 |
| 947 |
| 948 /** The image representation of the original actor. */ |
| 949 class ActivityObjectActorImage { |
| 950 /** A URL that points to a thumbnail photo of the original actor. */ |
| 951 core.String url; |
| 952 |
| 953 |
| 954 ActivityObjectActorImage(); |
| 955 |
| 956 ActivityObjectActorImage.fromJson(core.Map _json) { |
| 957 if (_json.containsKey("url")) { |
| 958 url = _json["url"]; |
| 959 } |
| 960 } |
| 961 |
| 962 core.Map toJson() { |
| 963 var _json = new core.Map(); |
| 964 if (url != null) { |
| 965 _json["url"] = url; |
| 966 } |
| 967 return _json; |
| 968 } |
| 969 } |
| 970 |
| 971 |
| 972 /** |
| 973 * If this activity's object is itself another activity, such as when a person |
| 974 * reshares an activity, this property specifies the original activity's actor. |
| 975 */ |
| 976 class ActivityObjectActor { |
| 977 /** The original actor's name, which is suitable for display. */ |
| 978 core.String displayName; |
| 979 |
| 980 /** ID of the original actor. */ |
| 981 core.String id; |
| 982 |
| 983 /** The image representation of the original actor. */ |
| 984 ActivityObjectActorImage image; |
| 985 |
| 986 /** A link to the original actor's Google profile. */ |
| 987 core.String url; |
| 988 |
| 989 |
| 990 ActivityObjectActor(); |
| 991 |
| 992 ActivityObjectActor.fromJson(core.Map _json) { |
| 993 if (_json.containsKey("displayName")) { |
| 994 displayName = _json["displayName"]; |
| 995 } |
| 996 if (_json.containsKey("id")) { |
| 997 id = _json["id"]; |
| 998 } |
| 999 if (_json.containsKey("image")) { |
| 1000 image = new ActivityObjectActorImage.fromJson(_json["image"]); |
| 1001 } |
| 1002 if (_json.containsKey("url")) { |
| 1003 url = _json["url"]; |
| 1004 } |
| 1005 } |
| 1006 |
| 1007 core.Map toJson() { |
| 1008 var _json = new core.Map(); |
| 1009 if (displayName != null) { |
| 1010 _json["displayName"] = displayName; |
| 1011 } |
| 1012 if (id != null) { |
| 1013 _json["id"] = id; |
| 1014 } |
| 1015 if (image != null) { |
| 1016 _json["image"] = (image).toJson(); |
| 1017 } |
| 1018 if (url != null) { |
| 1019 _json["url"] = url; |
| 1020 } |
| 1021 return _json; |
| 1022 } |
| 1023 } |
| 1024 |
| 1025 |
| 1026 /** If the attachment is a video, the embeddable link. */ |
| 1027 class ActivityObjectAttachmentsEmbed { |
| 1028 /** Media type of the link. */ |
| 1029 core.String type; |
| 1030 |
| 1031 /** URL of the link. */ |
| 1032 core.String url; |
| 1033 |
| 1034 |
| 1035 ActivityObjectAttachmentsEmbed(); |
| 1036 |
| 1037 ActivityObjectAttachmentsEmbed.fromJson(core.Map _json) { |
| 1038 if (_json.containsKey("type")) { |
| 1039 type = _json["type"]; |
| 1040 } |
| 1041 if (_json.containsKey("url")) { |
| 1042 url = _json["url"]; |
| 1043 } |
| 1044 } |
| 1045 |
| 1046 core.Map toJson() { |
| 1047 var _json = new core.Map(); |
| 1048 if (type != null) { |
| 1049 _json["type"] = type; |
| 1050 } |
| 1051 if (url != null) { |
| 1052 _json["url"] = url; |
| 1053 } |
| 1054 return _json; |
| 1055 } |
| 1056 } |
| 1057 |
| 1058 |
| 1059 /** The full image URL for photo attachments. */ |
| 1060 class ActivityObjectAttachmentsFullImage { |
| 1061 /** The height, in pixels, of the linked resource. */ |
| 1062 core.int height; |
| 1063 |
| 1064 /** Media type of the link. */ |
| 1065 core.String type; |
| 1066 |
| 1067 /** URL of the image. */ |
| 1068 core.String url; |
| 1069 |
| 1070 /** The width, in pixels, of the linked resource. */ |
| 1071 core.int width; |
| 1072 |
| 1073 |
| 1074 ActivityObjectAttachmentsFullImage(); |
| 1075 |
| 1076 ActivityObjectAttachmentsFullImage.fromJson(core.Map _json) { |
| 1077 if (_json.containsKey("height")) { |
| 1078 height = _json["height"]; |
| 1079 } |
| 1080 if (_json.containsKey("type")) { |
| 1081 type = _json["type"]; |
| 1082 } |
| 1083 if (_json.containsKey("url")) { |
| 1084 url = _json["url"]; |
| 1085 } |
| 1086 if (_json.containsKey("width")) { |
| 1087 width = _json["width"]; |
| 1088 } |
| 1089 } |
| 1090 |
| 1091 core.Map toJson() { |
| 1092 var _json = new core.Map(); |
| 1093 if (height != null) { |
| 1094 _json["height"] = height; |
| 1095 } |
| 1096 if (type != null) { |
| 1097 _json["type"] = type; |
| 1098 } |
| 1099 if (url != null) { |
| 1100 _json["url"] = url; |
| 1101 } |
| 1102 if (width != null) { |
| 1103 _json["width"] = width; |
| 1104 } |
| 1105 return _json; |
| 1106 } |
| 1107 } |
| 1108 |
| 1109 |
| 1110 /** The preview image for photos or videos. */ |
| 1111 class ActivityObjectAttachmentsImage { |
| 1112 /** The height, in pixels, of the linked resource. */ |
| 1113 core.int height; |
| 1114 |
| 1115 /** Media type of the link. */ |
| 1116 core.String type; |
| 1117 |
| 1118 /** Image URL. */ |
| 1119 core.String url; |
| 1120 |
| 1121 /** The width, in pixels, of the linked resource. */ |
| 1122 core.int width; |
| 1123 |
| 1124 |
| 1125 ActivityObjectAttachmentsImage(); |
| 1126 |
| 1127 ActivityObjectAttachmentsImage.fromJson(core.Map _json) { |
| 1128 if (_json.containsKey("height")) { |
| 1129 height = _json["height"]; |
| 1130 } |
| 1131 if (_json.containsKey("type")) { |
| 1132 type = _json["type"]; |
| 1133 } |
| 1134 if (_json.containsKey("url")) { |
| 1135 url = _json["url"]; |
| 1136 } |
| 1137 if (_json.containsKey("width")) { |
| 1138 width = _json["width"]; |
| 1139 } |
| 1140 } |
| 1141 |
| 1142 core.Map toJson() { |
| 1143 var _json = new core.Map(); |
| 1144 if (height != null) { |
| 1145 _json["height"] = height; |
| 1146 } |
| 1147 if (type != null) { |
| 1148 _json["type"] = type; |
| 1149 } |
| 1150 if (url != null) { |
| 1151 _json["url"] = url; |
| 1152 } |
| 1153 if (width != null) { |
| 1154 _json["width"] = width; |
| 1155 } |
| 1156 return _json; |
| 1157 } |
| 1158 } |
| 1159 |
| 1160 |
| 1161 /** Image resource. */ |
| 1162 class ActivityObjectAttachmentsThumbnailsImage { |
| 1163 /** The height, in pixels, of the linked resource. */ |
| 1164 core.int height; |
| 1165 |
| 1166 /** Media type of the link. */ |
| 1167 core.String type; |
| 1168 |
| 1169 /** Image url. */ |
| 1170 core.String url; |
| 1171 |
| 1172 /** The width, in pixels, of the linked resource. */ |
| 1173 core.int width; |
| 1174 |
| 1175 |
| 1176 ActivityObjectAttachmentsThumbnailsImage(); |
| 1177 |
| 1178 ActivityObjectAttachmentsThumbnailsImage.fromJson(core.Map _json) { |
| 1179 if (_json.containsKey("height")) { |
| 1180 height = _json["height"]; |
| 1181 } |
| 1182 if (_json.containsKey("type")) { |
| 1183 type = _json["type"]; |
| 1184 } |
| 1185 if (_json.containsKey("url")) { |
| 1186 url = _json["url"]; |
| 1187 } |
| 1188 if (_json.containsKey("width")) { |
| 1189 width = _json["width"]; |
| 1190 } |
| 1191 } |
| 1192 |
| 1193 core.Map toJson() { |
| 1194 var _json = new core.Map(); |
| 1195 if (height != null) { |
| 1196 _json["height"] = height; |
| 1197 } |
| 1198 if (type != null) { |
| 1199 _json["type"] = type; |
| 1200 } |
| 1201 if (url != null) { |
| 1202 _json["url"] = url; |
| 1203 } |
| 1204 if (width != null) { |
| 1205 _json["width"] = width; |
| 1206 } |
| 1207 return _json; |
| 1208 } |
| 1209 } |
| 1210 |
| 1211 |
| 1212 /** Not documented yet. */ |
| 1213 class ActivityObjectAttachmentsThumbnails { |
| 1214 /** Potential name of the thumbnail. */ |
| 1215 core.String description; |
| 1216 |
| 1217 /** Image resource. */ |
| 1218 ActivityObjectAttachmentsThumbnailsImage image; |
| 1219 |
| 1220 /** URL of the webpage containing the image. */ |
| 1221 core.String url; |
| 1222 |
| 1223 |
| 1224 ActivityObjectAttachmentsThumbnails(); |
| 1225 |
| 1226 ActivityObjectAttachmentsThumbnails.fromJson(core.Map _json) { |
| 1227 if (_json.containsKey("description")) { |
| 1228 description = _json["description"]; |
| 1229 } |
| 1230 if (_json.containsKey("image")) { |
| 1231 image = new ActivityObjectAttachmentsThumbnailsImage.fromJson(_json["image
"]); |
| 1232 } |
| 1233 if (_json.containsKey("url")) { |
| 1234 url = _json["url"]; |
| 1235 } |
| 1236 } |
| 1237 |
| 1238 core.Map toJson() { |
| 1239 var _json = new core.Map(); |
| 1240 if (description != null) { |
| 1241 _json["description"] = description; |
| 1242 } |
| 1243 if (image != null) { |
| 1244 _json["image"] = (image).toJson(); |
| 1245 } |
| 1246 if (url != null) { |
| 1247 _json["url"] = url; |
| 1248 } |
| 1249 return _json; |
| 1250 } |
| 1251 } |
| 1252 |
| 1253 |
| 1254 /** Not documented yet. */ |
| 1255 class ActivityObjectAttachments { |
| 1256 /** |
| 1257 * If the attachment is an article, this property contains a snippet of text |
| 1258 * from the article. It can also include descriptions for other types. |
| 1259 */ |
| 1260 core.String content; |
| 1261 |
| 1262 /** |
| 1263 * The title of the attachment, such as a photo caption or an article title. |
| 1264 */ |
| 1265 core.String displayName; |
| 1266 |
| 1267 /** If the attachment is a video, the embeddable link. */ |
| 1268 ActivityObjectAttachmentsEmbed embed; |
| 1269 |
| 1270 /** The full image URL for photo attachments. */ |
| 1271 ActivityObjectAttachmentsFullImage fullImage; |
| 1272 |
| 1273 /** The ID of the attachment. */ |
| 1274 core.String id; |
| 1275 |
| 1276 /** The preview image for photos or videos. */ |
| 1277 ActivityObjectAttachmentsImage image; |
| 1278 |
| 1279 /** |
| 1280 * The type of media object. Possible values include, but are not limited to, |
| 1281 * the following values: |
| 1282 * - "photo" - A photo. |
| 1283 * - "album" - A photo album. |
| 1284 * - "video" - A video. |
| 1285 * - "article" - An article, specified by a link. |
| 1286 */ |
| 1287 core.String objectType; |
| 1288 |
| 1289 /** |
| 1290 * If the attachment is an album, this property is a list of potential |
| 1291 * additional thumbnails from the album. |
| 1292 */ |
| 1293 core.List<ActivityObjectAttachmentsThumbnails> thumbnails; |
| 1294 |
| 1295 /** The link to the attachment, which should be of type text/html. */ |
| 1296 core.String url; |
| 1297 |
| 1298 |
| 1299 ActivityObjectAttachments(); |
| 1300 |
| 1301 ActivityObjectAttachments.fromJson(core.Map _json) { |
| 1302 if (_json.containsKey("content")) { |
| 1303 content = _json["content"]; |
| 1304 } |
| 1305 if (_json.containsKey("displayName")) { |
| 1306 displayName = _json["displayName"]; |
| 1307 } |
| 1308 if (_json.containsKey("embed")) { |
| 1309 embed = new ActivityObjectAttachmentsEmbed.fromJson(_json["embed"]); |
| 1310 } |
| 1311 if (_json.containsKey("fullImage")) { |
| 1312 fullImage = new ActivityObjectAttachmentsFullImage.fromJson(_json["fullIma
ge"]); |
| 1313 } |
| 1314 if (_json.containsKey("id")) { |
| 1315 id = _json["id"]; |
| 1316 } |
| 1317 if (_json.containsKey("image")) { |
| 1318 image = new ActivityObjectAttachmentsImage.fromJson(_json["image"]); |
| 1319 } |
| 1320 if (_json.containsKey("objectType")) { |
| 1321 objectType = _json["objectType"]; |
| 1322 } |
| 1323 if (_json.containsKey("thumbnails")) { |
| 1324 thumbnails = _json["thumbnails"].map((value) => new ActivityObjectAttachme
ntsThumbnails.fromJson(value)).toList(); |
| 1325 } |
| 1326 if (_json.containsKey("url")) { |
| 1327 url = _json["url"]; |
| 1328 } |
| 1329 } |
| 1330 |
| 1331 core.Map toJson() { |
| 1332 var _json = new core.Map(); |
| 1333 if (content != null) { |
| 1334 _json["content"] = content; |
| 1335 } |
| 1336 if (displayName != null) { |
| 1337 _json["displayName"] = displayName; |
| 1338 } |
| 1339 if (embed != null) { |
| 1340 _json["embed"] = (embed).toJson(); |
| 1341 } |
| 1342 if (fullImage != null) { |
| 1343 _json["fullImage"] = (fullImage).toJson(); |
| 1344 } |
| 1345 if (id != null) { |
| 1346 _json["id"] = id; |
| 1347 } |
| 1348 if (image != null) { |
| 1349 _json["image"] = (image).toJson(); |
| 1350 } |
| 1351 if (objectType != null) { |
| 1352 _json["objectType"] = objectType; |
| 1353 } |
| 1354 if (thumbnails != null) { |
| 1355 _json["thumbnails"] = thumbnails.map((value) => (value).toJson()).toList()
; |
| 1356 } |
| 1357 if (url != null) { |
| 1358 _json["url"] = url; |
| 1359 } |
| 1360 return _json; |
| 1361 } |
| 1362 } |
| 1363 |
| 1364 |
| 1365 /** People who +1'd this activity. */ |
| 1366 class ActivityObjectPlusoners { |
| 1367 /** The URL for the collection of people who +1'd this activity. */ |
| 1368 core.String selfLink; |
| 1369 |
| 1370 /** Total number of people who +1'd this activity. */ |
| 1371 core.int totalItems; |
| 1372 |
| 1373 |
| 1374 ActivityObjectPlusoners(); |
| 1375 |
| 1376 ActivityObjectPlusoners.fromJson(core.Map _json) { |
| 1377 if (_json.containsKey("selfLink")) { |
| 1378 selfLink = _json["selfLink"]; |
| 1379 } |
| 1380 if (_json.containsKey("totalItems")) { |
| 1381 totalItems = _json["totalItems"]; |
| 1382 } |
| 1383 } |
| 1384 |
| 1385 core.Map toJson() { |
| 1386 var _json = new core.Map(); |
| 1387 if (selfLink != null) { |
| 1388 _json["selfLink"] = selfLink; |
| 1389 } |
| 1390 if (totalItems != null) { |
| 1391 _json["totalItems"] = totalItems; |
| 1392 } |
| 1393 return _json; |
| 1394 } |
| 1395 } |
| 1396 |
| 1397 |
| 1398 /** Comments in reply to this activity. */ |
| 1399 class ActivityObjectReplies { |
| 1400 /** The URL for the collection of comments in reply to this activity. */ |
| 1401 core.String selfLink; |
| 1402 |
| 1403 /** Total number of comments on this activity. */ |
| 1404 core.int totalItems; |
| 1405 |
| 1406 |
| 1407 ActivityObjectReplies(); |
| 1408 |
| 1409 ActivityObjectReplies.fromJson(core.Map _json) { |
| 1410 if (_json.containsKey("selfLink")) { |
| 1411 selfLink = _json["selfLink"]; |
| 1412 } |
| 1413 if (_json.containsKey("totalItems")) { |
| 1414 totalItems = _json["totalItems"]; |
| 1415 } |
| 1416 } |
| 1417 |
| 1418 core.Map toJson() { |
| 1419 var _json = new core.Map(); |
| 1420 if (selfLink != null) { |
| 1421 _json["selfLink"] = selfLink; |
| 1422 } |
| 1423 if (totalItems != null) { |
| 1424 _json["totalItems"] = totalItems; |
| 1425 } |
| 1426 return _json; |
| 1427 } |
| 1428 } |
| 1429 |
| 1430 |
| 1431 /** People who reshared this activity. */ |
| 1432 class ActivityObjectResharers { |
| 1433 /** The URL for the collection of resharers. */ |
| 1434 core.String selfLink; |
| 1435 |
| 1436 /** Total number of people who reshared this activity. */ |
| 1437 core.int totalItems; |
| 1438 |
| 1439 |
| 1440 ActivityObjectResharers(); |
| 1441 |
| 1442 ActivityObjectResharers.fromJson(core.Map _json) { |
| 1443 if (_json.containsKey("selfLink")) { |
| 1444 selfLink = _json["selfLink"]; |
| 1445 } |
| 1446 if (_json.containsKey("totalItems")) { |
| 1447 totalItems = _json["totalItems"]; |
| 1448 } |
| 1449 } |
| 1450 |
| 1451 core.Map toJson() { |
| 1452 var _json = new core.Map(); |
| 1453 if (selfLink != null) { |
| 1454 _json["selfLink"] = selfLink; |
| 1455 } |
| 1456 if (totalItems != null) { |
| 1457 _json["totalItems"] = totalItems; |
| 1458 } |
| 1459 return _json; |
| 1460 } |
| 1461 } |
| 1462 |
| 1463 |
| 1464 /** The object of this activity. */ |
| 1465 class ActivityObject { |
| 1466 /** |
| 1467 * If this activity's object is itself another activity, such as when a person |
| 1468 * reshares an activity, this property specifies the original activity's |
| 1469 * actor. |
| 1470 */ |
| 1471 ActivityObjectActor actor; |
| 1472 |
| 1473 /** The media objects attached to this activity. */ |
| 1474 core.List<ActivityObjectAttachments> attachments; |
| 1475 |
| 1476 /** The HTML-formatted content, which is suitable for display. */ |
| 1477 core.String content; |
| 1478 |
| 1479 /** |
| 1480 * The ID of the object. When resharing an activity, this is the ID of the |
| 1481 * activity that is being reshared. |
| 1482 */ |
| 1483 core.String id; |
| 1484 |
| 1485 /** |
| 1486 * The type of the object. Possible values include, but are not limited to, |
| 1487 * the following values: |
| 1488 * - "note" - Textual content. |
| 1489 * - "activity" - A Google+ activity. |
| 1490 */ |
| 1491 core.String objectType; |
| 1492 |
| 1493 /** |
| 1494 * The content (text) as provided by the author, which is stored without any |
| 1495 * HTML formatting. When creating or updating an activity, this value must be |
| 1496 * supplied as plain text in the request. |
| 1497 */ |
| 1498 core.String originalContent; |
| 1499 |
| 1500 /** People who +1'd this activity. */ |
| 1501 ActivityObjectPlusoners plusoners; |
| 1502 |
| 1503 /** Comments in reply to this activity. */ |
| 1504 ActivityObjectReplies replies; |
| 1505 |
| 1506 /** People who reshared this activity. */ |
| 1507 ActivityObjectResharers resharers; |
| 1508 |
| 1509 /** The URL that points to the linked resource. */ |
| 1510 core.String url; |
| 1511 |
| 1512 |
| 1513 ActivityObject(); |
| 1514 |
| 1515 ActivityObject.fromJson(core.Map _json) { |
| 1516 if (_json.containsKey("actor")) { |
| 1517 actor = new ActivityObjectActor.fromJson(_json["actor"]); |
| 1518 } |
| 1519 if (_json.containsKey("attachments")) { |
| 1520 attachments = _json["attachments"].map((value) => new ActivityObjectAttach
ments.fromJson(value)).toList(); |
| 1521 } |
| 1522 if (_json.containsKey("content")) { |
| 1523 content = _json["content"]; |
| 1524 } |
| 1525 if (_json.containsKey("id")) { |
| 1526 id = _json["id"]; |
| 1527 } |
| 1528 if (_json.containsKey("objectType")) { |
| 1529 objectType = _json["objectType"]; |
| 1530 } |
| 1531 if (_json.containsKey("originalContent")) { |
| 1532 originalContent = _json["originalContent"]; |
| 1533 } |
| 1534 if (_json.containsKey("plusoners")) { |
| 1535 plusoners = new ActivityObjectPlusoners.fromJson(_json["plusoners"]); |
| 1536 } |
| 1537 if (_json.containsKey("replies")) { |
| 1538 replies = new ActivityObjectReplies.fromJson(_json["replies"]); |
| 1539 } |
| 1540 if (_json.containsKey("resharers")) { |
| 1541 resharers = new ActivityObjectResharers.fromJson(_json["resharers"]); |
| 1542 } |
| 1543 if (_json.containsKey("url")) { |
| 1544 url = _json["url"]; |
| 1545 } |
| 1546 } |
| 1547 |
| 1548 core.Map toJson() { |
| 1549 var _json = new core.Map(); |
| 1550 if (actor != null) { |
| 1551 _json["actor"] = (actor).toJson(); |
| 1552 } |
| 1553 if (attachments != null) { |
| 1554 _json["attachments"] = attachments.map((value) => (value).toJson()).toList
(); |
| 1555 } |
| 1556 if (content != null) { |
| 1557 _json["content"] = content; |
| 1558 } |
| 1559 if (id != null) { |
| 1560 _json["id"] = id; |
| 1561 } |
| 1562 if (objectType != null) { |
| 1563 _json["objectType"] = objectType; |
| 1564 } |
| 1565 if (originalContent != null) { |
| 1566 _json["originalContent"] = originalContent; |
| 1567 } |
| 1568 if (plusoners != null) { |
| 1569 _json["plusoners"] = (plusoners).toJson(); |
| 1570 } |
| 1571 if (replies != null) { |
| 1572 _json["replies"] = (replies).toJson(); |
| 1573 } |
| 1574 if (resharers != null) { |
| 1575 _json["resharers"] = (resharers).toJson(); |
| 1576 } |
| 1577 if (url != null) { |
| 1578 _json["url"] = url; |
| 1579 } |
| 1580 return _json; |
| 1581 } |
| 1582 } |
| 1583 |
| 1584 |
| 1585 /** The service provider that initially published this activity. */ |
| 1586 class ActivityProvider { |
| 1587 /** Name of the service provider. */ |
| 1588 core.String title; |
| 1589 |
| 1590 |
| 1591 ActivityProvider(); |
| 1592 |
| 1593 ActivityProvider.fromJson(core.Map _json) { |
| 1594 if (_json.containsKey("title")) { |
| 1595 title = _json["title"]; |
| 1596 } |
| 1597 } |
| 1598 |
| 1599 core.Map toJson() { |
| 1600 var _json = new core.Map(); |
| 1601 if (title != null) { |
| 1602 _json["title"] = title; |
| 1603 } |
| 1604 return _json; |
| 1605 } |
| 1606 } |
| 1607 |
| 1608 |
| 1609 /** Not documented yet. */ |
| 1610 class Activity { |
| 1611 /** Identifies who has access to see this activity. */ |
| 1612 Acl access; |
| 1613 |
| 1614 /** The person who performed this activity. */ |
| 1615 ActivityActor actor; |
| 1616 |
| 1617 /** Street address where this activity occurred. */ |
| 1618 core.String address; |
| 1619 |
| 1620 /** |
| 1621 * Additional content added by the person who shared this activity, applicable |
| 1622 * only when resharing an activity. |
| 1623 */ |
| 1624 core.String annotation; |
| 1625 |
| 1626 /** |
| 1627 * If this activity is a crosspost from another system, this property |
| 1628 * specifies the ID of the original activity. |
| 1629 */ |
| 1630 core.String crosspostSource; |
| 1631 |
| 1632 /** ETag of this response for caching purposes. */ |
| 1633 core.String etag; |
| 1634 |
| 1635 /** |
| 1636 * Latitude and longitude where this activity occurred. Format is latitude |
| 1637 * followed by longitude, space separated. |
| 1638 */ |
| 1639 core.String geocode; |
| 1640 |
| 1641 /** The ID of this activity. */ |
| 1642 core.String id; |
| 1643 |
| 1644 /** Identifies this resource as an activity. Value: "plus#activity". */ |
| 1645 core.String kind; |
| 1646 |
| 1647 /** The location where this activity occurred. */ |
| 1648 Place location; |
| 1649 |
| 1650 /** The object of this activity. */ |
| 1651 ActivityObject object; |
| 1652 |
| 1653 /** ID of the place where this activity occurred. */ |
| 1654 core.String placeId; |
| 1655 |
| 1656 /** Name of the place where this activity occurred. */ |
| 1657 core.String placeName; |
| 1658 |
| 1659 /** The service provider that initially published this activity. */ |
| 1660 ActivityProvider provider; |
| 1661 |
| 1662 /** |
| 1663 * The time at which this activity was initially published. Formatted as an |
| 1664 * RFC 3339 timestamp. |
| 1665 */ |
| 1666 core.DateTime published; |
| 1667 |
| 1668 /** |
| 1669 * Radius, in meters, of the region where this activity occurred, centered at |
| 1670 * the latitude and longitude identified in geocode. |
| 1671 */ |
| 1672 core.String radius; |
| 1673 |
| 1674 /** Title of this activity. */ |
| 1675 core.String title; |
| 1676 |
| 1677 /** |
| 1678 * The time at which this activity was last updated. Formatted as an RFC 3339 |
| 1679 * timestamp. |
| 1680 */ |
| 1681 core.DateTime updated; |
| 1682 |
| 1683 /** The link to this activity. */ |
| 1684 core.String url; |
| 1685 |
| 1686 /** |
| 1687 * This activity's verb, which indicates the action that was performed. |
| 1688 * Possible values include, but are not limited to, the following values: |
| 1689 * - "post" - Publish content to the stream. |
| 1690 * - "share" - Reshare an activity. |
| 1691 */ |
| 1692 core.String verb; |
| 1693 |
| 1694 |
| 1695 Activity(); |
| 1696 |
| 1697 Activity.fromJson(core.Map _json) { |
| 1698 if (_json.containsKey("access")) { |
| 1699 access = new Acl.fromJson(_json["access"]); |
| 1700 } |
| 1701 if (_json.containsKey("actor")) { |
| 1702 actor = new ActivityActor.fromJson(_json["actor"]); |
| 1703 } |
| 1704 if (_json.containsKey("address")) { |
| 1705 address = _json["address"]; |
| 1706 } |
| 1707 if (_json.containsKey("annotation")) { |
| 1708 annotation = _json["annotation"]; |
| 1709 } |
| 1710 if (_json.containsKey("crosspostSource")) { |
| 1711 crosspostSource = _json["crosspostSource"]; |
| 1712 } |
| 1713 if (_json.containsKey("etag")) { |
| 1714 etag = _json["etag"]; |
| 1715 } |
| 1716 if (_json.containsKey("geocode")) { |
| 1717 geocode = _json["geocode"]; |
| 1718 } |
| 1719 if (_json.containsKey("id")) { |
| 1720 id = _json["id"]; |
| 1721 } |
| 1722 if (_json.containsKey("kind")) { |
| 1723 kind = _json["kind"]; |
| 1724 } |
| 1725 if (_json.containsKey("location")) { |
| 1726 location = new Place.fromJson(_json["location"]); |
| 1727 } |
| 1728 if (_json.containsKey("object")) { |
| 1729 object = new ActivityObject.fromJson(_json["object"]); |
| 1730 } |
| 1731 if (_json.containsKey("placeId")) { |
| 1732 placeId = _json["placeId"]; |
| 1733 } |
| 1734 if (_json.containsKey("placeName")) { |
| 1735 placeName = _json["placeName"]; |
| 1736 } |
| 1737 if (_json.containsKey("provider")) { |
| 1738 provider = new ActivityProvider.fromJson(_json["provider"]); |
| 1739 } |
| 1740 if (_json.containsKey("published")) { |
| 1741 published = core.DateTime.parse(_json["published"]); |
| 1742 } |
| 1743 if (_json.containsKey("radius")) { |
| 1744 radius = _json["radius"]; |
| 1745 } |
| 1746 if (_json.containsKey("title")) { |
| 1747 title = _json["title"]; |
| 1748 } |
| 1749 if (_json.containsKey("updated")) { |
| 1750 updated = core.DateTime.parse(_json["updated"]); |
| 1751 } |
| 1752 if (_json.containsKey("url")) { |
| 1753 url = _json["url"]; |
| 1754 } |
| 1755 if (_json.containsKey("verb")) { |
| 1756 verb = _json["verb"]; |
| 1757 } |
| 1758 } |
| 1759 |
| 1760 core.Map toJson() { |
| 1761 var _json = new core.Map(); |
| 1762 if (access != null) { |
| 1763 _json["access"] = (access).toJson(); |
| 1764 } |
| 1765 if (actor != null) { |
| 1766 _json["actor"] = (actor).toJson(); |
| 1767 } |
| 1768 if (address != null) { |
| 1769 _json["address"] = address; |
| 1770 } |
| 1771 if (annotation != null) { |
| 1772 _json["annotation"] = annotation; |
| 1773 } |
| 1774 if (crosspostSource != null) { |
| 1775 _json["crosspostSource"] = crosspostSource; |
| 1776 } |
| 1777 if (etag != null) { |
| 1778 _json["etag"] = etag; |
| 1779 } |
| 1780 if (geocode != null) { |
| 1781 _json["geocode"] = geocode; |
| 1782 } |
| 1783 if (id != null) { |
| 1784 _json["id"] = id; |
| 1785 } |
| 1786 if (kind != null) { |
| 1787 _json["kind"] = kind; |
| 1788 } |
| 1789 if (location != null) { |
| 1790 _json["location"] = (location).toJson(); |
| 1791 } |
| 1792 if (object != null) { |
| 1793 _json["object"] = (object).toJson(); |
| 1794 } |
| 1795 if (placeId != null) { |
| 1796 _json["placeId"] = placeId; |
| 1797 } |
| 1798 if (placeName != null) { |
| 1799 _json["placeName"] = placeName; |
| 1800 } |
| 1801 if (provider != null) { |
| 1802 _json["provider"] = (provider).toJson(); |
| 1803 } |
| 1804 if (published != null) { |
| 1805 _json["published"] = (published).toIso8601String(); |
| 1806 } |
| 1807 if (radius != null) { |
| 1808 _json["radius"] = radius; |
| 1809 } |
| 1810 if (title != null) { |
| 1811 _json["title"] = title; |
| 1812 } |
| 1813 if (updated != null) { |
| 1814 _json["updated"] = (updated).toIso8601String(); |
| 1815 } |
| 1816 if (url != null) { |
| 1817 _json["url"] = url; |
| 1818 } |
| 1819 if (verb != null) { |
| 1820 _json["verb"] = verb; |
| 1821 } |
| 1822 return _json; |
| 1823 } |
| 1824 } |
| 1825 |
| 1826 |
| 1827 /** Not documented yet. */ |
| 1828 class ActivityFeed { |
| 1829 /** ETag of this response for caching purposes. */ |
| 1830 core.String etag; |
| 1831 |
| 1832 /** The ID of this collection of activities. Deprecated. */ |
| 1833 core.String id; |
| 1834 |
| 1835 /** The activities in this page of results. */ |
| 1836 core.List<Activity> items; |
| 1837 |
| 1838 /** |
| 1839 * Identifies this resource as a collection of activities. Value: |
| 1840 * "plus#activityFeed". |
| 1841 */ |
| 1842 core.String kind; |
| 1843 |
| 1844 /** Link to the next page of activities. */ |
| 1845 core.String nextLink; |
| 1846 |
| 1847 /** |
| 1848 * The continuation token, which is used to page through large result sets. |
| 1849 * Provide this value in a subsequent request to return the next page of |
| 1850 * results. |
| 1851 */ |
| 1852 core.String nextPageToken; |
| 1853 |
| 1854 /** Link to this activity resource. */ |
| 1855 core.String selfLink; |
| 1856 |
| 1857 /** |
| 1858 * The title of this collection of activities, which is a truncated portion of |
| 1859 * the content. |
| 1860 */ |
| 1861 core.String title; |
| 1862 |
| 1863 /** |
| 1864 * The time at which this collection of activities was last updated. Formatted |
| 1865 * as an RFC 3339 timestamp. |
| 1866 */ |
| 1867 core.DateTime updated; |
| 1868 |
| 1869 |
| 1870 ActivityFeed(); |
| 1871 |
| 1872 ActivityFeed.fromJson(core.Map _json) { |
| 1873 if (_json.containsKey("etag")) { |
| 1874 etag = _json["etag"]; |
| 1875 } |
| 1876 if (_json.containsKey("id")) { |
| 1877 id = _json["id"]; |
| 1878 } |
| 1879 if (_json.containsKey("items")) { |
| 1880 items = _json["items"].map((value) => new Activity.fromJson(value)).toList
(); |
| 1881 } |
| 1882 if (_json.containsKey("kind")) { |
| 1883 kind = _json["kind"]; |
| 1884 } |
| 1885 if (_json.containsKey("nextLink")) { |
| 1886 nextLink = _json["nextLink"]; |
| 1887 } |
| 1888 if (_json.containsKey("nextPageToken")) { |
| 1889 nextPageToken = _json["nextPageToken"]; |
| 1890 } |
| 1891 if (_json.containsKey("selfLink")) { |
| 1892 selfLink = _json["selfLink"]; |
| 1893 } |
| 1894 if (_json.containsKey("title")) { |
| 1895 title = _json["title"]; |
| 1896 } |
| 1897 if (_json.containsKey("updated")) { |
| 1898 updated = core.DateTime.parse(_json["updated"]); |
| 1899 } |
| 1900 } |
| 1901 |
| 1902 core.Map toJson() { |
| 1903 var _json = new core.Map(); |
| 1904 if (etag != null) { |
| 1905 _json["etag"] = etag; |
| 1906 } |
| 1907 if (id != null) { |
| 1908 _json["id"] = id; |
| 1909 } |
| 1910 if (items != null) { |
| 1911 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 1912 } |
| 1913 if (kind != null) { |
| 1914 _json["kind"] = kind; |
| 1915 } |
| 1916 if (nextLink != null) { |
| 1917 _json["nextLink"] = nextLink; |
| 1918 } |
| 1919 if (nextPageToken != null) { |
| 1920 _json["nextPageToken"] = nextPageToken; |
| 1921 } |
| 1922 if (selfLink != null) { |
| 1923 _json["selfLink"] = selfLink; |
| 1924 } |
| 1925 if (title != null) { |
| 1926 _json["title"] = title; |
| 1927 } |
| 1928 if (updated != null) { |
| 1929 _json["updated"] = (updated).toIso8601String(); |
| 1930 } |
| 1931 return _json; |
| 1932 } |
| 1933 } |
| 1934 |
| 1935 |
| 1936 /** The image representation of this actor. */ |
| 1937 class CommentActorImage { |
| 1938 /** |
| 1939 * The URL of the actor's profile photo. To resize the image and crop it to a |
| 1940 * square, append the query string ?sz=x, where x is the dimension in pixels |
| 1941 * of each side. |
| 1942 */ |
| 1943 core.String url; |
| 1944 |
| 1945 |
| 1946 CommentActorImage(); |
| 1947 |
| 1948 CommentActorImage.fromJson(core.Map _json) { |
| 1949 if (_json.containsKey("url")) { |
| 1950 url = _json["url"]; |
| 1951 } |
| 1952 } |
| 1953 |
| 1954 core.Map toJson() { |
| 1955 var _json = new core.Map(); |
| 1956 if (url != null) { |
| 1957 _json["url"] = url; |
| 1958 } |
| 1959 return _json; |
| 1960 } |
| 1961 } |
| 1962 |
| 1963 |
| 1964 /** The person who posted this comment. */ |
| 1965 class CommentActor { |
| 1966 /** The name of this actor, suitable for display. */ |
| 1967 core.String displayName; |
| 1968 |
| 1969 /** The ID of the actor. */ |
| 1970 core.String id; |
| 1971 |
| 1972 /** The image representation of this actor. */ |
| 1973 CommentActorImage image; |
| 1974 |
| 1975 /** A link to the Person resource for this actor. */ |
| 1976 core.String url; |
| 1977 |
| 1978 |
| 1979 CommentActor(); |
| 1980 |
| 1981 CommentActor.fromJson(core.Map _json) { |
| 1982 if (_json.containsKey("displayName")) { |
| 1983 displayName = _json["displayName"]; |
| 1984 } |
| 1985 if (_json.containsKey("id")) { |
| 1986 id = _json["id"]; |
| 1987 } |
| 1988 if (_json.containsKey("image")) { |
| 1989 image = new CommentActorImage.fromJson(_json["image"]); |
| 1990 } |
| 1991 if (_json.containsKey("url")) { |
| 1992 url = _json["url"]; |
| 1993 } |
| 1994 } |
| 1995 |
| 1996 core.Map toJson() { |
| 1997 var _json = new core.Map(); |
| 1998 if (displayName != null) { |
| 1999 _json["displayName"] = displayName; |
| 2000 } |
| 2001 if (id != null) { |
| 2002 _json["id"] = id; |
| 2003 } |
| 2004 if (image != null) { |
| 2005 _json["image"] = (image).toJson(); |
| 2006 } |
| 2007 if (url != null) { |
| 2008 _json["url"] = url; |
| 2009 } |
| 2010 return _json; |
| 2011 } |
| 2012 } |
| 2013 |
| 2014 |
| 2015 /** Not documented yet. */ |
| 2016 class CommentInReplyTo { |
| 2017 /** The ID of the activity. */ |
| 2018 core.String id; |
| 2019 |
| 2020 /** The URL of the activity. */ |
| 2021 core.String url; |
| 2022 |
| 2023 |
| 2024 CommentInReplyTo(); |
| 2025 |
| 2026 CommentInReplyTo.fromJson(core.Map _json) { |
| 2027 if (_json.containsKey("id")) { |
| 2028 id = _json["id"]; |
| 2029 } |
| 2030 if (_json.containsKey("url")) { |
| 2031 url = _json["url"]; |
| 2032 } |
| 2033 } |
| 2034 |
| 2035 core.Map toJson() { |
| 2036 var _json = new core.Map(); |
| 2037 if (id != null) { |
| 2038 _json["id"] = id; |
| 2039 } |
| 2040 if (url != null) { |
| 2041 _json["url"] = url; |
| 2042 } |
| 2043 return _json; |
| 2044 } |
| 2045 } |
| 2046 |
| 2047 |
| 2048 /** The object of this comment. */ |
| 2049 class CommentObject { |
| 2050 /** The HTML-formatted content, suitable for display. */ |
| 2051 core.String content; |
| 2052 |
| 2053 /** |
| 2054 * The object type of this comment. Possible values are: |
| 2055 * - "comment" - A comment in reply to an activity. |
| 2056 */ |
| 2057 core.String objectType; |
| 2058 |
| 2059 /** |
| 2060 * The content (text) as provided by the author, stored without any HTML |
| 2061 * formatting. When creating or updating a comment, this value must be |
| 2062 * supplied as plain text in the request. |
| 2063 */ |
| 2064 core.String originalContent; |
| 2065 |
| 2066 |
| 2067 CommentObject(); |
| 2068 |
| 2069 CommentObject.fromJson(core.Map _json) { |
| 2070 if (_json.containsKey("content")) { |
| 2071 content = _json["content"]; |
| 2072 } |
| 2073 if (_json.containsKey("objectType")) { |
| 2074 objectType = _json["objectType"]; |
| 2075 } |
| 2076 if (_json.containsKey("originalContent")) { |
| 2077 originalContent = _json["originalContent"]; |
| 2078 } |
| 2079 } |
| 2080 |
| 2081 core.Map toJson() { |
| 2082 var _json = new core.Map(); |
| 2083 if (content != null) { |
| 2084 _json["content"] = content; |
| 2085 } |
| 2086 if (objectType != null) { |
| 2087 _json["objectType"] = objectType; |
| 2088 } |
| 2089 if (originalContent != null) { |
| 2090 _json["originalContent"] = originalContent; |
| 2091 } |
| 2092 return _json; |
| 2093 } |
| 2094 } |
| 2095 |
| 2096 |
| 2097 /** People who +1'd this comment. */ |
| 2098 class CommentPlusoners { |
| 2099 /** Total number of people who +1'd this comment. */ |
| 2100 core.int totalItems; |
| 2101 |
| 2102 |
| 2103 CommentPlusoners(); |
| 2104 |
| 2105 CommentPlusoners.fromJson(core.Map _json) { |
| 2106 if (_json.containsKey("totalItems")) { |
| 2107 totalItems = _json["totalItems"]; |
| 2108 } |
| 2109 } |
| 2110 |
| 2111 core.Map toJson() { |
| 2112 var _json = new core.Map(); |
| 2113 if (totalItems != null) { |
| 2114 _json["totalItems"] = totalItems; |
| 2115 } |
| 2116 return _json; |
| 2117 } |
| 2118 } |
| 2119 |
| 2120 |
| 2121 /** Not documented yet. */ |
| 2122 class Comment { |
| 2123 /** The person who posted this comment. */ |
| 2124 CommentActor actor; |
| 2125 |
| 2126 /** ETag of this response for caching purposes. */ |
| 2127 core.String etag; |
| 2128 |
| 2129 /** The ID of this comment. */ |
| 2130 core.String id; |
| 2131 |
| 2132 /** The activity this comment replied to. */ |
| 2133 core.List<CommentInReplyTo> inReplyTo; |
| 2134 |
| 2135 /** Identifies this resource as a comment. Value: "plus#comment". */ |
| 2136 core.String kind; |
| 2137 |
| 2138 /** The object of this comment. */ |
| 2139 CommentObject object; |
| 2140 |
| 2141 /** People who +1'd this comment. */ |
| 2142 CommentPlusoners plusoners; |
| 2143 |
| 2144 /** |
| 2145 * The time at which this comment was initially published. Formatted as an RFC |
| 2146 * 3339 timestamp. |
| 2147 */ |
| 2148 core.DateTime published; |
| 2149 |
| 2150 /** Link to this comment resource. */ |
| 2151 core.String selfLink; |
| 2152 |
| 2153 /** |
| 2154 * The time at which this comment was last updated. Formatted as an RFC 3339 |
| 2155 * timestamp. |
| 2156 */ |
| 2157 core.DateTime updated; |
| 2158 |
| 2159 /** |
| 2160 * This comment's verb, indicating what action was performed. Possible values |
| 2161 * are: |
| 2162 * - "post" - Publish content to the stream. |
| 2163 */ |
| 2164 core.String verb; |
| 2165 |
| 2166 |
| 2167 Comment(); |
| 2168 |
| 2169 Comment.fromJson(core.Map _json) { |
| 2170 if (_json.containsKey("actor")) { |
| 2171 actor = new CommentActor.fromJson(_json["actor"]); |
| 2172 } |
| 2173 if (_json.containsKey("etag")) { |
| 2174 etag = _json["etag"]; |
| 2175 } |
| 2176 if (_json.containsKey("id")) { |
| 2177 id = _json["id"]; |
| 2178 } |
| 2179 if (_json.containsKey("inReplyTo")) { |
| 2180 inReplyTo = _json["inReplyTo"].map((value) => new CommentInReplyTo.fromJso
n(value)).toList(); |
| 2181 } |
| 2182 if (_json.containsKey("kind")) { |
| 2183 kind = _json["kind"]; |
| 2184 } |
| 2185 if (_json.containsKey("object")) { |
| 2186 object = new CommentObject.fromJson(_json["object"]); |
| 2187 } |
| 2188 if (_json.containsKey("plusoners")) { |
| 2189 plusoners = new CommentPlusoners.fromJson(_json["plusoners"]); |
| 2190 } |
| 2191 if (_json.containsKey("published")) { |
| 2192 published = core.DateTime.parse(_json["published"]); |
| 2193 } |
| 2194 if (_json.containsKey("selfLink")) { |
| 2195 selfLink = _json["selfLink"]; |
| 2196 } |
| 2197 if (_json.containsKey("updated")) { |
| 2198 updated = core.DateTime.parse(_json["updated"]); |
| 2199 } |
| 2200 if (_json.containsKey("verb")) { |
| 2201 verb = _json["verb"]; |
| 2202 } |
| 2203 } |
| 2204 |
| 2205 core.Map toJson() { |
| 2206 var _json = new core.Map(); |
| 2207 if (actor != null) { |
| 2208 _json["actor"] = (actor).toJson(); |
| 2209 } |
| 2210 if (etag != null) { |
| 2211 _json["etag"] = etag; |
| 2212 } |
| 2213 if (id != null) { |
| 2214 _json["id"] = id; |
| 2215 } |
| 2216 if (inReplyTo != null) { |
| 2217 _json["inReplyTo"] = inReplyTo.map((value) => (value).toJson()).toList(); |
| 2218 } |
| 2219 if (kind != null) { |
| 2220 _json["kind"] = kind; |
| 2221 } |
| 2222 if (object != null) { |
| 2223 _json["object"] = (object).toJson(); |
| 2224 } |
| 2225 if (plusoners != null) { |
| 2226 _json["plusoners"] = (plusoners).toJson(); |
| 2227 } |
| 2228 if (published != null) { |
| 2229 _json["published"] = (published).toIso8601String(); |
| 2230 } |
| 2231 if (selfLink != null) { |
| 2232 _json["selfLink"] = selfLink; |
| 2233 } |
| 2234 if (updated != null) { |
| 2235 _json["updated"] = (updated).toIso8601String(); |
| 2236 } |
| 2237 if (verb != null) { |
| 2238 _json["verb"] = verb; |
| 2239 } |
| 2240 return _json; |
| 2241 } |
| 2242 } |
| 2243 |
| 2244 |
| 2245 /** Not documented yet. */ |
| 2246 class CommentFeed { |
| 2247 /** ETag of this response for caching purposes. */ |
| 2248 core.String etag; |
| 2249 |
| 2250 /** The ID of this collection of comments. */ |
| 2251 core.String id; |
| 2252 |
| 2253 /** The comments in this page of results. */ |
| 2254 core.List<Comment> items; |
| 2255 |
| 2256 /** |
| 2257 * Identifies this resource as a collection of comments. Value: |
| 2258 * "plus#commentFeed". |
| 2259 */ |
| 2260 core.String kind; |
| 2261 |
| 2262 /** Link to the next page of activities. */ |
| 2263 core.String nextLink; |
| 2264 |
| 2265 /** |
| 2266 * The continuation token, which is used to page through large result sets. |
| 2267 * Provide this value in a subsequent request to return the next page of |
| 2268 * results. |
| 2269 */ |
| 2270 core.String nextPageToken; |
| 2271 |
| 2272 /** The title of this collection of comments. */ |
| 2273 core.String title; |
| 2274 |
| 2275 /** |
| 2276 * The time at which this collection of comments was last updated. Formatted |
| 2277 * as an RFC 3339 timestamp. |
| 2278 */ |
| 2279 core.DateTime updated; |
| 2280 |
| 2281 |
| 2282 CommentFeed(); |
| 2283 |
| 2284 CommentFeed.fromJson(core.Map _json) { |
| 2285 if (_json.containsKey("etag")) { |
| 2286 etag = _json["etag"]; |
| 2287 } |
| 2288 if (_json.containsKey("id")) { |
| 2289 id = _json["id"]; |
| 2290 } |
| 2291 if (_json.containsKey("items")) { |
| 2292 items = _json["items"].map((value) => new Comment.fromJson(value)).toList(
); |
| 2293 } |
| 2294 if (_json.containsKey("kind")) { |
| 2295 kind = _json["kind"]; |
| 2296 } |
| 2297 if (_json.containsKey("nextLink")) { |
| 2298 nextLink = _json["nextLink"]; |
| 2299 } |
| 2300 if (_json.containsKey("nextPageToken")) { |
| 2301 nextPageToken = _json["nextPageToken"]; |
| 2302 } |
| 2303 if (_json.containsKey("title")) { |
| 2304 title = _json["title"]; |
| 2305 } |
| 2306 if (_json.containsKey("updated")) { |
| 2307 updated = core.DateTime.parse(_json["updated"]); |
| 2308 } |
| 2309 } |
| 2310 |
| 2311 core.Map toJson() { |
| 2312 var _json = new core.Map(); |
| 2313 if (etag != null) { |
| 2314 _json["etag"] = etag; |
| 2315 } |
| 2316 if (id != null) { |
| 2317 _json["id"] = id; |
| 2318 } |
| 2319 if (items != null) { |
| 2320 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 2321 } |
| 2322 if (kind != null) { |
| 2323 _json["kind"] = kind; |
| 2324 } |
| 2325 if (nextLink != null) { |
| 2326 _json["nextLink"] = nextLink; |
| 2327 } |
| 2328 if (nextPageToken != null) { |
| 2329 _json["nextPageToken"] = nextPageToken; |
| 2330 } |
| 2331 if (title != null) { |
| 2332 _json["title"] = title; |
| 2333 } |
| 2334 if (updated != null) { |
| 2335 _json["updated"] = (updated).toIso8601String(); |
| 2336 } |
| 2337 return _json; |
| 2338 } |
| 2339 } |
| 2340 |
| 2341 |
| 2342 /** Not documented yet. */ |
| 2343 class ItemScope { |
| 2344 /** The subject matter of the content. */ |
| 2345 ItemScope about; |
| 2346 |
| 2347 /** An additional name for a Person, can be used for a middle name. */ |
| 2348 core.List<core.String> additionalName; |
| 2349 |
| 2350 /** Postal address. */ |
| 2351 ItemScope address; |
| 2352 |
| 2353 /** Address country. */ |
| 2354 core.String addressCountry; |
| 2355 |
| 2356 /** Address locality. */ |
| 2357 core.String addressLocality; |
| 2358 |
| 2359 /** Address region. */ |
| 2360 core.String addressRegion; |
| 2361 |
| 2362 /** The encoding. */ |
| 2363 core.List<ItemScope> associatedMedia; |
| 2364 |
| 2365 /** Number of attendees. */ |
| 2366 core.int attendeeCount; |
| 2367 |
| 2368 /** A person attending the event. */ |
| 2369 core.List<ItemScope> attendees; |
| 2370 |
| 2371 /** From http://schema.org/MusicRecording, the audio file. */ |
| 2372 ItemScope audio; |
| 2373 |
| 2374 /** |
| 2375 * The person or persons who created this result. In the example of restaurant |
| 2376 * reviews, this might be the reviewer's name. |
| 2377 */ |
| 2378 core.List<ItemScope> author; |
| 2379 |
| 2380 /** |
| 2381 * Best possible rating value that a result might obtain. This property |
| 2382 * defines the upper bound for the ratingValue. For example, you might have a |
| 2383 * 5 star rating scale, you would provide 5 as the value for this property. |
| 2384 */ |
| 2385 core.String bestRating; |
| 2386 |
| 2387 /** Date of birth. */ |
| 2388 core.String birthDate; |
| 2389 |
| 2390 /** |
| 2391 * From http://schema.org/MusicRecording, the artist that performed this |
| 2392 * recording. |
| 2393 */ |
| 2394 ItemScope byArtist; |
| 2395 |
| 2396 /** The caption for this object. */ |
| 2397 core.String caption; |
| 2398 |
| 2399 /** File size in (mega/kilo) bytes. */ |
| 2400 core.String contentSize; |
| 2401 |
| 2402 /** |
| 2403 * Actual bytes of the media object, for example the image file or video file. |
| 2404 */ |
| 2405 core.String contentUrl; |
| 2406 |
| 2407 /** A list of contributors to this result. */ |
| 2408 core.List<ItemScope> contributor; |
| 2409 |
| 2410 /** |
| 2411 * The date the result was created such as the date that a review was first |
| 2412 * created. |
| 2413 */ |
| 2414 core.String dateCreated; |
| 2415 |
| 2416 /** |
| 2417 * The date the result was last modified such as the date that a review was |
| 2418 * last edited. |
| 2419 */ |
| 2420 core.String dateModified; |
| 2421 |
| 2422 /** |
| 2423 * The initial date that the result was published. For example, a user writes |
| 2424 * a comment on a blog, which has a result.dateCreated of when they submit it. |
| 2425 * If the blog users comment moderation, the result.datePublished value would |
| 2426 * match the date when the owner approved the message. |
| 2427 */ |
| 2428 core.String datePublished; |
| 2429 |
| 2430 /** The string that describes the content of the result. */ |
| 2431 core.String description; |
| 2432 |
| 2433 /** |
| 2434 * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 |
| 2435 * date format. |
| 2436 */ |
| 2437 core.String duration; |
| 2438 |
| 2439 /** |
| 2440 * A URL pointing to a player for a specific video. In general, this is the |
| 2441 * information in the src element of an embed tag and should not be the same |
| 2442 * as the content of the loc tag. |
| 2443 */ |
| 2444 core.String embedUrl; |
| 2445 |
| 2446 /** The end date and time of the event (in ISO 8601 date format). */ |
| 2447 core.String endDate; |
| 2448 |
| 2449 /** |
| 2450 * Family name. This property can be used with givenName instead of the name |
| 2451 * property. |
| 2452 */ |
| 2453 core.String familyName; |
| 2454 |
| 2455 /** Gender of the person. */ |
| 2456 core.String gender; |
| 2457 |
| 2458 /** Geo coordinates. */ |
| 2459 ItemScope geo; |
| 2460 |
| 2461 /** |
| 2462 * Given name. This property can be used with familyName instead of the name |
| 2463 * property. |
| 2464 */ |
| 2465 core.String givenName; |
| 2466 |
| 2467 /** The height of the media object. */ |
| 2468 core.String height; |
| 2469 |
| 2470 /** |
| 2471 * An identifier for the object. Your app can choose how to identify objects. |
| 2472 * The object.id is required if you are writing an action that does not have a |
| 2473 * corresponding web page or object.url property. |
| 2474 */ |
| 2475 core.String id; |
| 2476 |
| 2477 /** |
| 2478 * A URL to the image that represents this result. For example, if a user |
| 2479 * writes a review of a restaurant and attaches a photo of their meal, you |
| 2480 * might use that photo as the result.image. |
| 2481 */ |
| 2482 core.String image; |
| 2483 |
| 2484 /** From http://schema.org/MusicRecording, which album a song is in. */ |
| 2485 ItemScope inAlbum; |
| 2486 |
| 2487 /** Identifies this resource as an itemScope. */ |
| 2488 core.String kind; |
| 2489 |
| 2490 /** Latitude. */ |
| 2491 core.double latitude; |
| 2492 |
| 2493 /** The location of the event or organization. */ |
| 2494 ItemScope location; |
| 2495 |
| 2496 /** Longitude. */ |
| 2497 core.double longitude; |
| 2498 |
| 2499 /** |
| 2500 * The name of the result. In the example of a restaurant review, this might |
| 2501 * be the summary the user gave their review such as "Great ambiance, but |
| 2502 * overpriced." |
| 2503 */ |
| 2504 core.String name; |
| 2505 |
| 2506 /** |
| 2507 * Property of http://schema.org/TVEpisode indicating which series the episode |
| 2508 * belongs to. |
| 2509 */ |
| 2510 ItemScope partOfTVSeries; |
| 2511 |
| 2512 /** |
| 2513 * The main performer or performers of the event-for example, a presenter, |
| 2514 * musician, or actor. |
| 2515 */ |
| 2516 core.List<ItemScope> performers; |
| 2517 |
| 2518 /** Player type that is required. For example: Flash or Silverlight. */ |
| 2519 core.String playerType; |
| 2520 |
| 2521 /** Post office box number. */ |
| 2522 core.String postOfficeBoxNumber; |
| 2523 |
| 2524 /** Postal code. */ |
| 2525 core.String postalCode; |
| 2526 |
| 2527 /** Rating value. */ |
| 2528 core.String ratingValue; |
| 2529 |
| 2530 /** Review rating. */ |
| 2531 ItemScope reviewRating; |
| 2532 |
| 2533 /** The start date and time of the event (in ISO 8601 date format). */ |
| 2534 core.String startDate; |
| 2535 |
| 2536 /** Street address. */ |
| 2537 core.String streetAddress; |
| 2538 |
| 2539 /** |
| 2540 * The text that is the result of the app activity. For example, if a user |
| 2541 * leaves a review of a restaurant, this might be the text of the review. |
| 2542 */ |
| 2543 core.String text; |
| 2544 |
| 2545 /** Thumbnail image for an image or video. */ |
| 2546 ItemScope thumbnail; |
| 2547 |
| 2548 /** A URL to a thumbnail image that represents this result. */ |
| 2549 core.String thumbnailUrl; |
| 2550 |
| 2551 /** |
| 2552 * The exchange traded instrument associated with a Corporation object. The |
| 2553 * tickerSymbol is expressed as an exchange and an instrument name separated |
| 2554 * by a space character. For the exchange component of the tickerSymbol |
| 2555 * attribute, we recommend using the controlled vocabulary of Market |
| 2556 * Identifier Codes (MIC) specified in ISO15022. |
| 2557 */ |
| 2558 core.String tickerSymbol; |
| 2559 |
| 2560 /** |
| 2561 * The schema.org URL that best describes the referenced object and matches |
| 2562 * the type of moment. |
| 2563 */ |
| 2564 core.String type; |
| 2565 |
| 2566 /** |
| 2567 * The URL that points to the result object. For example, a permalink directly |
| 2568 * to a restaurant reviewer's comment. |
| 2569 */ |
| 2570 core.String url; |
| 2571 |
| 2572 /** The width of the media object. */ |
| 2573 core.String width; |
| 2574 |
| 2575 /** |
| 2576 * Worst possible rating value that a result might obtain. This property |
| 2577 * defines the lower bound for the ratingValue. |
| 2578 */ |
| 2579 core.String worstRating; |
| 2580 |
| 2581 |
| 2582 ItemScope(); |
| 2583 |
| 2584 ItemScope.fromJson(core.Map _json) { |
| 2585 if (_json.containsKey("about")) { |
| 2586 about = new ItemScope.fromJson(_json["about"]); |
| 2587 } |
| 2588 if (_json.containsKey("additionalName")) { |
| 2589 additionalName = _json["additionalName"]; |
| 2590 } |
| 2591 if (_json.containsKey("address")) { |
| 2592 address = new ItemScope.fromJson(_json["address"]); |
| 2593 } |
| 2594 if (_json.containsKey("addressCountry")) { |
| 2595 addressCountry = _json["addressCountry"]; |
| 2596 } |
| 2597 if (_json.containsKey("addressLocality")) { |
| 2598 addressLocality = _json["addressLocality"]; |
| 2599 } |
| 2600 if (_json.containsKey("addressRegion")) { |
| 2601 addressRegion = _json["addressRegion"]; |
| 2602 } |
| 2603 if (_json.containsKey("associated_media")) { |
| 2604 associatedMedia = _json["associated_media"].map((value) => new ItemScope.f
romJson(value)).toList(); |
| 2605 } |
| 2606 if (_json.containsKey("attendeeCount")) { |
| 2607 attendeeCount = _json["attendeeCount"]; |
| 2608 } |
| 2609 if (_json.containsKey("attendees")) { |
| 2610 attendees = _json["attendees"].map((value) => new ItemScope.fromJson(value
)).toList(); |
| 2611 } |
| 2612 if (_json.containsKey("audio")) { |
| 2613 audio = new ItemScope.fromJson(_json["audio"]); |
| 2614 } |
| 2615 if (_json.containsKey("author")) { |
| 2616 author = _json["author"].map((value) => new ItemScope.fromJson(value)).toL
ist(); |
| 2617 } |
| 2618 if (_json.containsKey("bestRating")) { |
| 2619 bestRating = _json["bestRating"]; |
| 2620 } |
| 2621 if (_json.containsKey("birthDate")) { |
| 2622 birthDate = _json["birthDate"]; |
| 2623 } |
| 2624 if (_json.containsKey("byArtist")) { |
| 2625 byArtist = new ItemScope.fromJson(_json["byArtist"]); |
| 2626 } |
| 2627 if (_json.containsKey("caption")) { |
| 2628 caption = _json["caption"]; |
| 2629 } |
| 2630 if (_json.containsKey("contentSize")) { |
| 2631 contentSize = _json["contentSize"]; |
| 2632 } |
| 2633 if (_json.containsKey("contentUrl")) { |
| 2634 contentUrl = _json["contentUrl"]; |
| 2635 } |
| 2636 if (_json.containsKey("contributor")) { |
| 2637 contributor = _json["contributor"].map((value) => new ItemScope.fromJson(v
alue)).toList(); |
| 2638 } |
| 2639 if (_json.containsKey("dateCreated")) { |
| 2640 dateCreated = _json["dateCreated"]; |
| 2641 } |
| 2642 if (_json.containsKey("dateModified")) { |
| 2643 dateModified = _json["dateModified"]; |
| 2644 } |
| 2645 if (_json.containsKey("datePublished")) { |
| 2646 datePublished = _json["datePublished"]; |
| 2647 } |
| 2648 if (_json.containsKey("description")) { |
| 2649 description = _json["description"]; |
| 2650 } |
| 2651 if (_json.containsKey("duration")) { |
| 2652 duration = _json["duration"]; |
| 2653 } |
| 2654 if (_json.containsKey("embedUrl")) { |
| 2655 embedUrl = _json["embedUrl"]; |
| 2656 } |
| 2657 if (_json.containsKey("endDate")) { |
| 2658 endDate = _json["endDate"]; |
| 2659 } |
| 2660 if (_json.containsKey("familyName")) { |
| 2661 familyName = _json["familyName"]; |
| 2662 } |
| 2663 if (_json.containsKey("gender")) { |
| 2664 gender = _json["gender"]; |
| 2665 } |
| 2666 if (_json.containsKey("geo")) { |
| 2667 geo = new ItemScope.fromJson(_json["geo"]); |
| 2668 } |
| 2669 if (_json.containsKey("givenName")) { |
| 2670 givenName = _json["givenName"]; |
| 2671 } |
| 2672 if (_json.containsKey("height")) { |
| 2673 height = _json["height"]; |
| 2674 } |
| 2675 if (_json.containsKey("id")) { |
| 2676 id = _json["id"]; |
| 2677 } |
| 2678 if (_json.containsKey("image")) { |
| 2679 image = _json["image"]; |
| 2680 } |
| 2681 if (_json.containsKey("inAlbum")) { |
| 2682 inAlbum = new ItemScope.fromJson(_json["inAlbum"]); |
| 2683 } |
| 2684 if (_json.containsKey("kind")) { |
| 2685 kind = _json["kind"]; |
| 2686 } |
| 2687 if (_json.containsKey("latitude")) { |
| 2688 latitude = _json["latitude"]; |
| 2689 } |
| 2690 if (_json.containsKey("location")) { |
| 2691 location = new ItemScope.fromJson(_json["location"]); |
| 2692 } |
| 2693 if (_json.containsKey("longitude")) { |
| 2694 longitude = _json["longitude"]; |
| 2695 } |
| 2696 if (_json.containsKey("name")) { |
| 2697 name = _json["name"]; |
| 2698 } |
| 2699 if (_json.containsKey("partOfTVSeries")) { |
| 2700 partOfTVSeries = new ItemScope.fromJson(_json["partOfTVSeries"]); |
| 2701 } |
| 2702 if (_json.containsKey("performers")) { |
| 2703 performers = _json["performers"].map((value) => new ItemScope.fromJson(val
ue)).toList(); |
| 2704 } |
| 2705 if (_json.containsKey("playerType")) { |
| 2706 playerType = _json["playerType"]; |
| 2707 } |
| 2708 if (_json.containsKey("postOfficeBoxNumber")) { |
| 2709 postOfficeBoxNumber = _json["postOfficeBoxNumber"]; |
| 2710 } |
| 2711 if (_json.containsKey("postalCode")) { |
| 2712 postalCode = _json["postalCode"]; |
| 2713 } |
| 2714 if (_json.containsKey("ratingValue")) { |
| 2715 ratingValue = _json["ratingValue"]; |
| 2716 } |
| 2717 if (_json.containsKey("reviewRating")) { |
| 2718 reviewRating = new ItemScope.fromJson(_json["reviewRating"]); |
| 2719 } |
| 2720 if (_json.containsKey("startDate")) { |
| 2721 startDate = _json["startDate"]; |
| 2722 } |
| 2723 if (_json.containsKey("streetAddress")) { |
| 2724 streetAddress = _json["streetAddress"]; |
| 2725 } |
| 2726 if (_json.containsKey("text")) { |
| 2727 text = _json["text"]; |
| 2728 } |
| 2729 if (_json.containsKey("thumbnail")) { |
| 2730 thumbnail = new ItemScope.fromJson(_json["thumbnail"]); |
| 2731 } |
| 2732 if (_json.containsKey("thumbnailUrl")) { |
| 2733 thumbnailUrl = _json["thumbnailUrl"]; |
| 2734 } |
| 2735 if (_json.containsKey("tickerSymbol")) { |
| 2736 tickerSymbol = _json["tickerSymbol"]; |
| 2737 } |
| 2738 if (_json.containsKey("type")) { |
| 2739 type = _json["type"]; |
| 2740 } |
| 2741 if (_json.containsKey("url")) { |
| 2742 url = _json["url"]; |
| 2743 } |
| 2744 if (_json.containsKey("width")) { |
| 2745 width = _json["width"]; |
| 2746 } |
| 2747 if (_json.containsKey("worstRating")) { |
| 2748 worstRating = _json["worstRating"]; |
| 2749 } |
| 2750 } |
| 2751 |
| 2752 core.Map toJson() { |
| 2753 var _json = new core.Map(); |
| 2754 if (about != null) { |
| 2755 _json["about"] = (about).toJson(); |
| 2756 } |
| 2757 if (additionalName != null) { |
| 2758 _json["additionalName"] = additionalName; |
| 2759 } |
| 2760 if (address != null) { |
| 2761 _json["address"] = (address).toJson(); |
| 2762 } |
| 2763 if (addressCountry != null) { |
| 2764 _json["addressCountry"] = addressCountry; |
| 2765 } |
| 2766 if (addressLocality != null) { |
| 2767 _json["addressLocality"] = addressLocality; |
| 2768 } |
| 2769 if (addressRegion != null) { |
| 2770 _json["addressRegion"] = addressRegion; |
| 2771 } |
| 2772 if (associatedMedia != null) { |
| 2773 _json["associated_media"] = associatedMedia.map((value) => (value).toJson(
)).toList(); |
| 2774 } |
| 2775 if (attendeeCount != null) { |
| 2776 _json["attendeeCount"] = attendeeCount; |
| 2777 } |
| 2778 if (attendees != null) { |
| 2779 _json["attendees"] = attendees.map((value) => (value).toJson()).toList(); |
| 2780 } |
| 2781 if (audio != null) { |
| 2782 _json["audio"] = (audio).toJson(); |
| 2783 } |
| 2784 if (author != null) { |
| 2785 _json["author"] = author.map((value) => (value).toJson()).toList(); |
| 2786 } |
| 2787 if (bestRating != null) { |
| 2788 _json["bestRating"] = bestRating; |
| 2789 } |
| 2790 if (birthDate != null) { |
| 2791 _json["birthDate"] = birthDate; |
| 2792 } |
| 2793 if (byArtist != null) { |
| 2794 _json["byArtist"] = (byArtist).toJson(); |
| 2795 } |
| 2796 if (caption != null) { |
| 2797 _json["caption"] = caption; |
| 2798 } |
| 2799 if (contentSize != null) { |
| 2800 _json["contentSize"] = contentSize; |
| 2801 } |
| 2802 if (contentUrl != null) { |
| 2803 _json["contentUrl"] = contentUrl; |
| 2804 } |
| 2805 if (contributor != null) { |
| 2806 _json["contributor"] = contributor.map((value) => (value).toJson()).toList
(); |
| 2807 } |
| 2808 if (dateCreated != null) { |
| 2809 _json["dateCreated"] = dateCreated; |
| 2810 } |
| 2811 if (dateModified != null) { |
| 2812 _json["dateModified"] = dateModified; |
| 2813 } |
| 2814 if (datePublished != null) { |
| 2815 _json["datePublished"] = datePublished; |
| 2816 } |
| 2817 if (description != null) { |
| 2818 _json["description"] = description; |
| 2819 } |
| 2820 if (duration != null) { |
| 2821 _json["duration"] = duration; |
| 2822 } |
| 2823 if (embedUrl != null) { |
| 2824 _json["embedUrl"] = embedUrl; |
| 2825 } |
| 2826 if (endDate != null) { |
| 2827 _json["endDate"] = endDate; |
| 2828 } |
| 2829 if (familyName != null) { |
| 2830 _json["familyName"] = familyName; |
| 2831 } |
| 2832 if (gender != null) { |
| 2833 _json["gender"] = gender; |
| 2834 } |
| 2835 if (geo != null) { |
| 2836 _json["geo"] = (geo).toJson(); |
| 2837 } |
| 2838 if (givenName != null) { |
| 2839 _json["givenName"] = givenName; |
| 2840 } |
| 2841 if (height != null) { |
| 2842 _json["height"] = height; |
| 2843 } |
| 2844 if (id != null) { |
| 2845 _json["id"] = id; |
| 2846 } |
| 2847 if (image != null) { |
| 2848 _json["image"] = image; |
| 2849 } |
| 2850 if (inAlbum != null) { |
| 2851 _json["inAlbum"] = (inAlbum).toJson(); |
| 2852 } |
| 2853 if (kind != null) { |
| 2854 _json["kind"] = kind; |
| 2855 } |
| 2856 if (latitude != null) { |
| 2857 _json["latitude"] = latitude; |
| 2858 } |
| 2859 if (location != null) { |
| 2860 _json["location"] = (location).toJson(); |
| 2861 } |
| 2862 if (longitude != null) { |
| 2863 _json["longitude"] = longitude; |
| 2864 } |
| 2865 if (name != null) { |
| 2866 _json["name"] = name; |
| 2867 } |
| 2868 if (partOfTVSeries != null) { |
| 2869 _json["partOfTVSeries"] = (partOfTVSeries).toJson(); |
| 2870 } |
| 2871 if (performers != null) { |
| 2872 _json["performers"] = performers.map((value) => (value).toJson()).toList()
; |
| 2873 } |
| 2874 if (playerType != null) { |
| 2875 _json["playerType"] = playerType; |
| 2876 } |
| 2877 if (postOfficeBoxNumber != null) { |
| 2878 _json["postOfficeBoxNumber"] = postOfficeBoxNumber; |
| 2879 } |
| 2880 if (postalCode != null) { |
| 2881 _json["postalCode"] = postalCode; |
| 2882 } |
| 2883 if (ratingValue != null) { |
| 2884 _json["ratingValue"] = ratingValue; |
| 2885 } |
| 2886 if (reviewRating != null) { |
| 2887 _json["reviewRating"] = (reviewRating).toJson(); |
| 2888 } |
| 2889 if (startDate != null) { |
| 2890 _json["startDate"] = startDate; |
| 2891 } |
| 2892 if (streetAddress != null) { |
| 2893 _json["streetAddress"] = streetAddress; |
| 2894 } |
| 2895 if (text != null) { |
| 2896 _json["text"] = text; |
| 2897 } |
| 2898 if (thumbnail != null) { |
| 2899 _json["thumbnail"] = (thumbnail).toJson(); |
| 2900 } |
| 2901 if (thumbnailUrl != null) { |
| 2902 _json["thumbnailUrl"] = thumbnailUrl; |
| 2903 } |
| 2904 if (tickerSymbol != null) { |
| 2905 _json["tickerSymbol"] = tickerSymbol; |
| 2906 } |
| 2907 if (type != null) { |
| 2908 _json["type"] = type; |
| 2909 } |
| 2910 if (url != null) { |
| 2911 _json["url"] = url; |
| 2912 } |
| 2913 if (width != null) { |
| 2914 _json["width"] = width; |
| 2915 } |
| 2916 if (worstRating != null) { |
| 2917 _json["worstRating"] = worstRating; |
| 2918 } |
| 2919 return _json; |
| 2920 } |
| 2921 } |
| 2922 |
| 2923 |
| 2924 /** Not documented yet. */ |
| 2925 class Moment { |
| 2926 /** The moment ID. */ |
| 2927 core.String id; |
| 2928 |
| 2929 /** Identifies this resource as a moment. */ |
| 2930 core.String kind; |
| 2931 |
| 2932 /** |
| 2933 * The object on which the action was performed. Specifying this is equivalent |
| 2934 * with specifying "target". Note that responses from the server will use the |
| 2935 * "target" field instead for backward-compatibility with older clients. |
| 2936 */ |
| 2937 ItemScope object; |
| 2938 |
| 2939 /** |
| 2940 * The object generated by performing the action on the object. For example, a |
| 2941 * user writes a review of a restaurant, the object is the restaurant and the |
| 2942 * result is the review. |
| 2943 */ |
| 2944 ItemScope result; |
| 2945 |
| 2946 /** Time stamp of when the action occurred in RFC3339 format. */ |
| 2947 core.DateTime startDate; |
| 2948 |
| 2949 /** The object on which the action was performed. */ |
| 2950 ItemScope target; |
| 2951 |
| 2952 /** |
| 2953 * The schema.org type for the type of moment to write. For example, |
| 2954 * http://schema.org/AddAction. Note that responses from the server will use |
| 2955 * the Google schema type instead for backward-compatibility with older |
| 2956 * clients. For example, http://schemas.google.com/AddActivity. |
| 2957 */ |
| 2958 core.String type; |
| 2959 |
| 2960 |
| 2961 Moment(); |
| 2962 |
| 2963 Moment.fromJson(core.Map _json) { |
| 2964 if (_json.containsKey("id")) { |
| 2965 id = _json["id"]; |
| 2966 } |
| 2967 if (_json.containsKey("kind")) { |
| 2968 kind = _json["kind"]; |
| 2969 } |
| 2970 if (_json.containsKey("object")) { |
| 2971 object = new ItemScope.fromJson(_json["object"]); |
| 2972 } |
| 2973 if (_json.containsKey("result")) { |
| 2974 result = new ItemScope.fromJson(_json["result"]); |
| 2975 } |
| 2976 if (_json.containsKey("startDate")) { |
| 2977 startDate = core.DateTime.parse(_json["startDate"]); |
| 2978 } |
| 2979 if (_json.containsKey("target")) { |
| 2980 target = new ItemScope.fromJson(_json["target"]); |
| 2981 } |
| 2982 if (_json.containsKey("type")) { |
| 2983 type = _json["type"]; |
| 2984 } |
| 2985 } |
| 2986 |
| 2987 core.Map toJson() { |
| 2988 var _json = new core.Map(); |
| 2989 if (id != null) { |
| 2990 _json["id"] = id; |
| 2991 } |
| 2992 if (kind != null) { |
| 2993 _json["kind"] = kind; |
| 2994 } |
| 2995 if (object != null) { |
| 2996 _json["object"] = (object).toJson(); |
| 2997 } |
| 2998 if (result != null) { |
| 2999 _json["result"] = (result).toJson(); |
| 3000 } |
| 3001 if (startDate != null) { |
| 3002 _json["startDate"] = (startDate).toIso8601String(); |
| 3003 } |
| 3004 if (target != null) { |
| 3005 _json["target"] = (target).toJson(); |
| 3006 } |
| 3007 if (type != null) { |
| 3008 _json["type"] = type; |
| 3009 } |
| 3010 return _json; |
| 3011 } |
| 3012 } |
| 3013 |
| 3014 |
| 3015 /** Not documented yet. */ |
| 3016 class MomentsFeed { |
| 3017 /** ETag of this response for caching purposes. */ |
| 3018 core.String etag; |
| 3019 |
| 3020 /** The moments in this page of results. */ |
| 3021 core.List<Moment> items; |
| 3022 |
| 3023 /** |
| 3024 * Identifies this resource as a collection of moments. Value: |
| 3025 * "plus#momentsFeed". |
| 3026 */ |
| 3027 core.String kind; |
| 3028 |
| 3029 /** Link to the next page of moments. */ |
| 3030 core.String nextLink; |
| 3031 |
| 3032 /** |
| 3033 * The continuation token, which is used to page through large result sets. |
| 3034 * Provide this value in a subsequent request to return the next page of |
| 3035 * results. |
| 3036 */ |
| 3037 core.String nextPageToken; |
| 3038 |
| 3039 /** Link to this page of moments. */ |
| 3040 core.String selfLink; |
| 3041 |
| 3042 /** The title of this collection of moments. */ |
| 3043 core.String title; |
| 3044 |
| 3045 /** |
| 3046 * The RFC 339 timestamp for when this collection of moments was last updated. |
| 3047 */ |
| 3048 core.DateTime updated; |
| 3049 |
| 3050 |
| 3051 MomentsFeed(); |
| 3052 |
| 3053 MomentsFeed.fromJson(core.Map _json) { |
| 3054 if (_json.containsKey("etag")) { |
| 3055 etag = _json["etag"]; |
| 3056 } |
| 3057 if (_json.containsKey("items")) { |
| 3058 items = _json["items"].map((value) => new Moment.fromJson(value)).toList()
; |
| 3059 } |
| 3060 if (_json.containsKey("kind")) { |
| 3061 kind = _json["kind"]; |
| 3062 } |
| 3063 if (_json.containsKey("nextLink")) { |
| 3064 nextLink = _json["nextLink"]; |
| 3065 } |
| 3066 if (_json.containsKey("nextPageToken")) { |
| 3067 nextPageToken = _json["nextPageToken"]; |
| 3068 } |
| 3069 if (_json.containsKey("selfLink")) { |
| 3070 selfLink = _json["selfLink"]; |
| 3071 } |
| 3072 if (_json.containsKey("title")) { |
| 3073 title = _json["title"]; |
| 3074 } |
| 3075 if (_json.containsKey("updated")) { |
| 3076 updated = core.DateTime.parse(_json["updated"]); |
| 3077 } |
| 3078 } |
| 3079 |
| 3080 core.Map toJson() { |
| 3081 var _json = new core.Map(); |
| 3082 if (etag != null) { |
| 3083 _json["etag"] = etag; |
| 3084 } |
| 3085 if (items != null) { |
| 3086 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 3087 } |
| 3088 if (kind != null) { |
| 3089 _json["kind"] = kind; |
| 3090 } |
| 3091 if (nextLink != null) { |
| 3092 _json["nextLink"] = nextLink; |
| 3093 } |
| 3094 if (nextPageToken != null) { |
| 3095 _json["nextPageToken"] = nextPageToken; |
| 3096 } |
| 3097 if (selfLink != null) { |
| 3098 _json["selfLink"] = selfLink; |
| 3099 } |
| 3100 if (title != null) { |
| 3101 _json["title"] = title; |
| 3102 } |
| 3103 if (updated != null) { |
| 3104 _json["updated"] = (updated).toIso8601String(); |
| 3105 } |
| 3106 return _json; |
| 3107 } |
| 3108 } |
| 3109 |
| 3110 |
| 3111 /** Not documented yet. */ |
| 3112 class PeopleFeed { |
| 3113 /** ETag of this response for caching purposes. */ |
| 3114 core.String etag; |
| 3115 |
| 3116 /** |
| 3117 * The people in this page of results. Each item includes the id, displayName, |
| 3118 * image, and url for the person. To retrieve additional profile data, see the |
| 3119 * people.get method. |
| 3120 */ |
| 3121 core.List<Person> items; |
| 3122 |
| 3123 /** |
| 3124 * Identifies this resource as a collection of people. Value: |
| 3125 * "plus#peopleFeed". |
| 3126 */ |
| 3127 core.String kind; |
| 3128 |
| 3129 /** |
| 3130 * The continuation token, which is used to page through large result sets. |
| 3131 * Provide this value in a subsequent request to return the next page of |
| 3132 * results. |
| 3133 */ |
| 3134 core.String nextPageToken; |
| 3135 |
| 3136 /** Link to this resource. */ |
| 3137 core.String selfLink; |
| 3138 |
| 3139 /** The title of this collection of people. */ |
| 3140 core.String title; |
| 3141 |
| 3142 /** |
| 3143 * The total number of people available in this list. The number of people in |
| 3144 * a response might be smaller due to paging. This might not be set for all |
| 3145 * collections. |
| 3146 */ |
| 3147 core.int totalItems; |
| 3148 |
| 3149 |
| 3150 PeopleFeed(); |
| 3151 |
| 3152 PeopleFeed.fromJson(core.Map _json) { |
| 3153 if (_json.containsKey("etag")) { |
| 3154 etag = _json["etag"]; |
| 3155 } |
| 3156 if (_json.containsKey("items")) { |
| 3157 items = _json["items"].map((value) => new Person.fromJson(value)).toList()
; |
| 3158 } |
| 3159 if (_json.containsKey("kind")) { |
| 3160 kind = _json["kind"]; |
| 3161 } |
| 3162 if (_json.containsKey("nextPageToken")) { |
| 3163 nextPageToken = _json["nextPageToken"]; |
| 3164 } |
| 3165 if (_json.containsKey("selfLink")) { |
| 3166 selfLink = _json["selfLink"]; |
| 3167 } |
| 3168 if (_json.containsKey("title")) { |
| 3169 title = _json["title"]; |
| 3170 } |
| 3171 if (_json.containsKey("totalItems")) { |
| 3172 totalItems = _json["totalItems"]; |
| 3173 } |
| 3174 } |
| 3175 |
| 3176 core.Map toJson() { |
| 3177 var _json = new core.Map(); |
| 3178 if (etag != null) { |
| 3179 _json["etag"] = etag; |
| 3180 } |
| 3181 if (items != null) { |
| 3182 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 3183 } |
| 3184 if (kind != null) { |
| 3185 _json["kind"] = kind; |
| 3186 } |
| 3187 if (nextPageToken != null) { |
| 3188 _json["nextPageToken"] = nextPageToken; |
| 3189 } |
| 3190 if (selfLink != null) { |
| 3191 _json["selfLink"] = selfLink; |
| 3192 } |
| 3193 if (title != null) { |
| 3194 _json["title"] = title; |
| 3195 } |
| 3196 if (totalItems != null) { |
| 3197 _json["totalItems"] = totalItems; |
| 3198 } |
| 3199 return _json; |
| 3200 } |
| 3201 } |
| 3202 |
| 3203 |
| 3204 /** |
| 3205 * The age range of the person. Valid ranges are 17 or younger, 18 to 20, and 21 |
| 3206 * or older. Age is determined from the user's birthday using Western age |
| 3207 * reckoning. |
| 3208 */ |
| 3209 class PersonAgeRange { |
| 3210 /** |
| 3211 * The age range's upper bound, if any. Possible values include, but are not |
| 3212 * limited to, the following: |
| 3213 * - "17" - for age 17 |
| 3214 * - "20" - for age 20 |
| 3215 */ |
| 3216 core.int max; |
| 3217 |
| 3218 /** |
| 3219 * The age range's lower bound, if any. Possible values include, but are not |
| 3220 * limited to, the following: |
| 3221 * - "21" - for age 21 |
| 3222 * - "18" - for age 18 |
| 3223 */ |
| 3224 core.int min; |
| 3225 |
| 3226 |
| 3227 PersonAgeRange(); |
| 3228 |
| 3229 PersonAgeRange.fromJson(core.Map _json) { |
| 3230 if (_json.containsKey("max")) { |
| 3231 max = _json["max"]; |
| 3232 } |
| 3233 if (_json.containsKey("min")) { |
| 3234 min = _json["min"]; |
| 3235 } |
| 3236 } |
| 3237 |
| 3238 core.Map toJson() { |
| 3239 var _json = new core.Map(); |
| 3240 if (max != null) { |
| 3241 _json["max"] = max; |
| 3242 } |
| 3243 if (min != null) { |
| 3244 _json["min"] = min; |
| 3245 } |
| 3246 return _json; |
| 3247 } |
| 3248 } |
| 3249 |
| 3250 |
| 3251 /** Extra information about the cover photo. */ |
| 3252 class PersonCoverCoverInfo { |
| 3253 /** |
| 3254 * The difference between the left position of the cover image and the actual |
| 3255 * displayed cover image. Only valid for banner layout. |
| 3256 */ |
| 3257 core.int leftImageOffset; |
| 3258 |
| 3259 /** |
| 3260 * The difference between the top position of the cover image and the actual |
| 3261 * displayed cover image. Only valid for banner layout. |
| 3262 */ |
| 3263 core.int topImageOffset; |
| 3264 |
| 3265 |
| 3266 PersonCoverCoverInfo(); |
| 3267 |
| 3268 PersonCoverCoverInfo.fromJson(core.Map _json) { |
| 3269 if (_json.containsKey("leftImageOffset")) { |
| 3270 leftImageOffset = _json["leftImageOffset"]; |
| 3271 } |
| 3272 if (_json.containsKey("topImageOffset")) { |
| 3273 topImageOffset = _json["topImageOffset"]; |
| 3274 } |
| 3275 } |
| 3276 |
| 3277 core.Map toJson() { |
| 3278 var _json = new core.Map(); |
| 3279 if (leftImageOffset != null) { |
| 3280 _json["leftImageOffset"] = leftImageOffset; |
| 3281 } |
| 3282 if (topImageOffset != null) { |
| 3283 _json["topImageOffset"] = topImageOffset; |
| 3284 } |
| 3285 return _json; |
| 3286 } |
| 3287 } |
| 3288 |
| 3289 |
| 3290 /** The person's primary cover image. */ |
| 3291 class PersonCoverCoverPhoto { |
| 3292 /** The height of the image. */ |
| 3293 core.int height; |
| 3294 |
| 3295 /** The URL of the image. */ |
| 3296 core.String url; |
| 3297 |
| 3298 /** The width of the image. */ |
| 3299 core.int width; |
| 3300 |
| 3301 |
| 3302 PersonCoverCoverPhoto(); |
| 3303 |
| 3304 PersonCoverCoverPhoto.fromJson(core.Map _json) { |
| 3305 if (_json.containsKey("height")) { |
| 3306 height = _json["height"]; |
| 3307 } |
| 3308 if (_json.containsKey("url")) { |
| 3309 url = _json["url"]; |
| 3310 } |
| 3311 if (_json.containsKey("width")) { |
| 3312 width = _json["width"]; |
| 3313 } |
| 3314 } |
| 3315 |
| 3316 core.Map toJson() { |
| 3317 var _json = new core.Map(); |
| 3318 if (height != null) { |
| 3319 _json["height"] = height; |
| 3320 } |
| 3321 if (url != null) { |
| 3322 _json["url"] = url; |
| 3323 } |
| 3324 if (width != null) { |
| 3325 _json["width"] = width; |
| 3326 } |
| 3327 return _json; |
| 3328 } |
| 3329 } |
| 3330 |
| 3331 |
| 3332 /** The cover photo content. */ |
| 3333 class PersonCover { |
| 3334 /** Extra information about the cover photo. */ |
| 3335 PersonCoverCoverInfo coverInfo; |
| 3336 |
| 3337 /** The person's primary cover image. */ |
| 3338 PersonCoverCoverPhoto coverPhoto; |
| 3339 |
| 3340 /** |
| 3341 * The layout of the cover art. Possible values include, but are not limited |
| 3342 * to, the following values: |
| 3343 * - "banner" - One large image banner. |
| 3344 */ |
| 3345 core.String layout; |
| 3346 |
| 3347 |
| 3348 PersonCover(); |
| 3349 |
| 3350 PersonCover.fromJson(core.Map _json) { |
| 3351 if (_json.containsKey("coverInfo")) { |
| 3352 coverInfo = new PersonCoverCoverInfo.fromJson(_json["coverInfo"]); |
| 3353 } |
| 3354 if (_json.containsKey("coverPhoto")) { |
| 3355 coverPhoto = new PersonCoverCoverPhoto.fromJson(_json["coverPhoto"]); |
| 3356 } |
| 3357 if (_json.containsKey("layout")) { |
| 3358 layout = _json["layout"]; |
| 3359 } |
| 3360 } |
| 3361 |
| 3362 core.Map toJson() { |
| 3363 var _json = new core.Map(); |
| 3364 if (coverInfo != null) { |
| 3365 _json["coverInfo"] = (coverInfo).toJson(); |
| 3366 } |
| 3367 if (coverPhoto != null) { |
| 3368 _json["coverPhoto"] = (coverPhoto).toJson(); |
| 3369 } |
| 3370 if (layout != null) { |
| 3371 _json["layout"] = layout; |
| 3372 } |
| 3373 return _json; |
| 3374 } |
| 3375 } |
| 3376 |
| 3377 |
| 3378 /** Not documented yet. */ |
| 3379 class PersonEmails { |
| 3380 /** |
| 3381 * The type of address. Possible values include, but are not limited to, the |
| 3382 * following values: |
| 3383 * - "account" - Google account email address. |
| 3384 * - "home" - Home email address. |
| 3385 * - "work" - Work email address. |
| 3386 * - "other" - Other. |
| 3387 */ |
| 3388 core.String type; |
| 3389 |
| 3390 /** The email address. */ |
| 3391 core.String value; |
| 3392 |
| 3393 |
| 3394 PersonEmails(); |
| 3395 |
| 3396 PersonEmails.fromJson(core.Map _json) { |
| 3397 if (_json.containsKey("type")) { |
| 3398 type = _json["type"]; |
| 3399 } |
| 3400 if (_json.containsKey("value")) { |
| 3401 value = _json["value"]; |
| 3402 } |
| 3403 } |
| 3404 |
| 3405 core.Map toJson() { |
| 3406 var _json = new core.Map(); |
| 3407 if (type != null) { |
| 3408 _json["type"] = type; |
| 3409 } |
| 3410 if (value != null) { |
| 3411 _json["value"] = value; |
| 3412 } |
| 3413 return _json; |
| 3414 } |
| 3415 } |
| 3416 |
| 3417 |
| 3418 /** The representation of the person's profile photo. */ |
| 3419 class PersonImage { |
| 3420 /** Whether the person's profile photo is the default one */ |
| 3421 core.bool isDefault; |
| 3422 |
| 3423 /** |
| 3424 * The URL of the person's profile photo. To resize the image and crop it to a |
| 3425 * square, append the query string ?sz=x, where x is the dimension in pixels |
| 3426 * of each side. |
| 3427 */ |
| 3428 core.String url; |
| 3429 |
| 3430 |
| 3431 PersonImage(); |
| 3432 |
| 3433 PersonImage.fromJson(core.Map _json) { |
| 3434 if (_json.containsKey("isDefault")) { |
| 3435 isDefault = _json["isDefault"]; |
| 3436 } |
| 3437 if (_json.containsKey("url")) { |
| 3438 url = _json["url"]; |
| 3439 } |
| 3440 } |
| 3441 |
| 3442 core.Map toJson() { |
| 3443 var _json = new core.Map(); |
| 3444 if (isDefault != null) { |
| 3445 _json["isDefault"] = isDefault; |
| 3446 } |
| 3447 if (url != null) { |
| 3448 _json["url"] = url; |
| 3449 } |
| 3450 return _json; |
| 3451 } |
| 3452 } |
| 3453 |
| 3454 |
| 3455 /** |
| 3456 * An object representation of the individual components of a person's name. |
| 3457 */ |
| 3458 class PersonName { |
| 3459 /** The family name (last name) of this person. */ |
| 3460 core.String familyName; |
| 3461 |
| 3462 /** The full name of this person, including middle names, suffixes, etc. */ |
| 3463 core.String formatted; |
| 3464 |
| 3465 /** The given name (first name) of this person. */ |
| 3466 core.String givenName; |
| 3467 |
| 3468 /** The honorific prefixes (such as "Dr." or "Mrs.") for this person. */ |
| 3469 core.String honorificPrefix; |
| 3470 |
| 3471 /** The honorific suffixes (such as "Jr.") for this person. */ |
| 3472 core.String honorificSuffix; |
| 3473 |
| 3474 /** The middle name of this person. */ |
| 3475 core.String middleName; |
| 3476 |
| 3477 |
| 3478 PersonName(); |
| 3479 |
| 3480 PersonName.fromJson(core.Map _json) { |
| 3481 if (_json.containsKey("familyName")) { |
| 3482 familyName = _json["familyName"]; |
| 3483 } |
| 3484 if (_json.containsKey("formatted")) { |
| 3485 formatted = _json["formatted"]; |
| 3486 } |
| 3487 if (_json.containsKey("givenName")) { |
| 3488 givenName = _json["givenName"]; |
| 3489 } |
| 3490 if (_json.containsKey("honorificPrefix")) { |
| 3491 honorificPrefix = _json["honorificPrefix"]; |
| 3492 } |
| 3493 if (_json.containsKey("honorificSuffix")) { |
| 3494 honorificSuffix = _json["honorificSuffix"]; |
| 3495 } |
| 3496 if (_json.containsKey("middleName")) { |
| 3497 middleName = _json["middleName"]; |
| 3498 } |
| 3499 } |
| 3500 |
| 3501 core.Map toJson() { |
| 3502 var _json = new core.Map(); |
| 3503 if (familyName != null) { |
| 3504 _json["familyName"] = familyName; |
| 3505 } |
| 3506 if (formatted != null) { |
| 3507 _json["formatted"] = formatted; |
| 3508 } |
| 3509 if (givenName != null) { |
| 3510 _json["givenName"] = givenName; |
| 3511 } |
| 3512 if (honorificPrefix != null) { |
| 3513 _json["honorificPrefix"] = honorificPrefix; |
| 3514 } |
| 3515 if (honorificSuffix != null) { |
| 3516 _json["honorificSuffix"] = honorificSuffix; |
| 3517 } |
| 3518 if (middleName != null) { |
| 3519 _json["middleName"] = middleName; |
| 3520 } |
| 3521 return _json; |
| 3522 } |
| 3523 } |
| 3524 |
| 3525 |
| 3526 /** Not documented yet. */ |
| 3527 class PersonOrganizations { |
| 3528 /** The department within the organization. Deprecated. */ |
| 3529 core.String department; |
| 3530 |
| 3531 /** |
| 3532 * A short description of the person's role in this organization. Deprecated. |
| 3533 */ |
| 3534 core.String description; |
| 3535 |
| 3536 /** The date that the person left this organization. */ |
| 3537 core.String endDate; |
| 3538 |
| 3539 /** The location of this organization. Deprecated. */ |
| 3540 core.String location; |
| 3541 |
| 3542 /** The name of the organization. */ |
| 3543 core.String name; |
| 3544 |
| 3545 /** |
| 3546 * If "true", indicates this organization is the person's primary one, which |
| 3547 * is typically interpreted as the current one. |
| 3548 */ |
| 3549 core.bool primary; |
| 3550 |
| 3551 /** The date that the person joined this organization. */ |
| 3552 core.String startDate; |
| 3553 |
| 3554 /** The person's job title or role within the organization. */ |
| 3555 core.String title; |
| 3556 |
| 3557 /** |
| 3558 * The type of organization. Possible values include, but are not limited to, |
| 3559 * the following values: |
| 3560 * - "work" - Work. |
| 3561 * - "school" - School. |
| 3562 */ |
| 3563 core.String type; |
| 3564 |
| 3565 |
| 3566 PersonOrganizations(); |
| 3567 |
| 3568 PersonOrganizations.fromJson(core.Map _json) { |
| 3569 if (_json.containsKey("department")) { |
| 3570 department = _json["department"]; |
| 3571 } |
| 3572 if (_json.containsKey("description")) { |
| 3573 description = _json["description"]; |
| 3574 } |
| 3575 if (_json.containsKey("endDate")) { |
| 3576 endDate = _json["endDate"]; |
| 3577 } |
| 3578 if (_json.containsKey("location")) { |
| 3579 location = _json["location"]; |
| 3580 } |
| 3581 if (_json.containsKey("name")) { |
| 3582 name = _json["name"]; |
| 3583 } |
| 3584 if (_json.containsKey("primary")) { |
| 3585 primary = _json["primary"]; |
| 3586 } |
| 3587 if (_json.containsKey("startDate")) { |
| 3588 startDate = _json["startDate"]; |
| 3589 } |
| 3590 if (_json.containsKey("title")) { |
| 3591 title = _json["title"]; |
| 3592 } |
| 3593 if (_json.containsKey("type")) { |
| 3594 type = _json["type"]; |
| 3595 } |
| 3596 } |
| 3597 |
| 3598 core.Map toJson() { |
| 3599 var _json = new core.Map(); |
| 3600 if (department != null) { |
| 3601 _json["department"] = department; |
| 3602 } |
| 3603 if (description != null) { |
| 3604 _json["description"] = description; |
| 3605 } |
| 3606 if (endDate != null) { |
| 3607 _json["endDate"] = endDate; |
| 3608 } |
| 3609 if (location != null) { |
| 3610 _json["location"] = location; |
| 3611 } |
| 3612 if (name != null) { |
| 3613 _json["name"] = name; |
| 3614 } |
| 3615 if (primary != null) { |
| 3616 _json["primary"] = primary; |
| 3617 } |
| 3618 if (startDate != null) { |
| 3619 _json["startDate"] = startDate; |
| 3620 } |
| 3621 if (title != null) { |
| 3622 _json["title"] = title; |
| 3623 } |
| 3624 if (type != null) { |
| 3625 _json["type"] = type; |
| 3626 } |
| 3627 return _json; |
| 3628 } |
| 3629 } |
| 3630 |
| 3631 |
| 3632 /** Not documented yet. */ |
| 3633 class PersonPlacesLived { |
| 3634 /** If "true", this place of residence is this person's primary residence. */ |
| 3635 core.bool primary; |
| 3636 |
| 3637 /** |
| 3638 * A place where this person has lived. For example: "Seattle, WA", "Near |
| 3639 * Toronto". |
| 3640 */ |
| 3641 core.String value; |
| 3642 |
| 3643 |
| 3644 PersonPlacesLived(); |
| 3645 |
| 3646 PersonPlacesLived.fromJson(core.Map _json) { |
| 3647 if (_json.containsKey("primary")) { |
| 3648 primary = _json["primary"]; |
| 3649 } |
| 3650 if (_json.containsKey("value")) { |
| 3651 value = _json["value"]; |
| 3652 } |
| 3653 } |
| 3654 |
| 3655 core.Map toJson() { |
| 3656 var _json = new core.Map(); |
| 3657 if (primary != null) { |
| 3658 _json["primary"] = primary; |
| 3659 } |
| 3660 if (value != null) { |
| 3661 _json["value"] = value; |
| 3662 } |
| 3663 return _json; |
| 3664 } |
| 3665 } |
| 3666 |
| 3667 |
| 3668 /** Not documented yet. */ |
| 3669 class PersonUrls { |
| 3670 /** The label of the URL. */ |
| 3671 core.String label; |
| 3672 |
| 3673 /** |
| 3674 * The type of URL. Possible values include, but are not limited to, the |
| 3675 * following values: |
| 3676 * - "otherProfile" - URL for another profile. |
| 3677 * - "contributor" - URL to a site for which this person is a contributor. |
| 3678 * - "website" - URL for this Google+ Page's primary website. |
| 3679 * - "other" - Other URL. |
| 3680 */ |
| 3681 core.String type; |
| 3682 |
| 3683 /** The URL value. */ |
| 3684 core.String value; |
| 3685 |
| 3686 |
| 3687 PersonUrls(); |
| 3688 |
| 3689 PersonUrls.fromJson(core.Map _json) { |
| 3690 if (_json.containsKey("label")) { |
| 3691 label = _json["label"]; |
| 3692 } |
| 3693 if (_json.containsKey("type")) { |
| 3694 type = _json["type"]; |
| 3695 } |
| 3696 if (_json.containsKey("value")) { |
| 3697 value = _json["value"]; |
| 3698 } |
| 3699 } |
| 3700 |
| 3701 core.Map toJson() { |
| 3702 var _json = new core.Map(); |
| 3703 if (label != null) { |
| 3704 _json["label"] = label; |
| 3705 } |
| 3706 if (type != null) { |
| 3707 _json["type"] = type; |
| 3708 } |
| 3709 if (value != null) { |
| 3710 _json["value"] = value; |
| 3711 } |
| 3712 return _json; |
| 3713 } |
| 3714 } |
| 3715 |
| 3716 |
| 3717 /** Not documented yet. */ |
| 3718 class Person { |
| 3719 /** A short biography for this person. */ |
| 3720 core.String aboutMe; |
| 3721 |
| 3722 /** |
| 3723 * The age range of the person. Valid ranges are 17 or younger, 18 to 20, and |
| 3724 * 21 or older. Age is determined from the user's birthday using Western age |
| 3725 * reckoning. |
| 3726 */ |
| 3727 PersonAgeRange ageRange; |
| 3728 |
| 3729 /** The person's date of birth, represented as YYYY-MM-DD. */ |
| 3730 core.String birthday; |
| 3731 |
| 3732 /** The "bragging rights" line of this person. */ |
| 3733 core.String braggingRights; |
| 3734 |
| 3735 /** |
| 3736 * For followers who are visible, the number of people who have added this |
| 3737 * person or page to a circle. |
| 3738 */ |
| 3739 core.int circledByCount; |
| 3740 |
| 3741 /** The cover photo content. */ |
| 3742 PersonCover cover; |
| 3743 |
| 3744 /** (this field is not currently used) */ |
| 3745 core.String currentLocation; |
| 3746 |
| 3747 /** The name of this person, which is suitable for display. */ |
| 3748 core.String displayName; |
| 3749 |
| 3750 /** |
| 3751 * The hosted domain name for the user's Google Apps account. For instance, |
| 3752 * example.com. The plus.profile.emails.read or email scope is needed to get |
| 3753 * this domain name. |
| 3754 */ |
| 3755 core.String domain; |
| 3756 |
| 3757 /** |
| 3758 * A list of email addresses that this person has, including their Google |
| 3759 * account email address, and the public verified email addresses on their |
| 3760 * Google+ profile. The plus.profile.emails.read scope is needed to retrieve |
| 3761 * these email addresses, or the email scope can be used to retrieve just the |
| 3762 * Google account email address. |
| 3763 */ |
| 3764 core.List<PersonEmails> emails; |
| 3765 |
| 3766 /** ETag of this response for caching purposes. */ |
| 3767 core.String etag; |
| 3768 |
| 3769 /** |
| 3770 * The person's gender. Possible values include, but are not limited to, the |
| 3771 * following values: |
| 3772 * - "male" - Male gender. |
| 3773 * - "female" - Female gender. |
| 3774 * - "other" - Other. |
| 3775 */ |
| 3776 core.String gender; |
| 3777 |
| 3778 /** The ID of this person. */ |
| 3779 core.String id; |
| 3780 |
| 3781 /** The representation of the person's profile photo. */ |
| 3782 PersonImage image; |
| 3783 |
| 3784 /** Whether this user has signed up for Google+. */ |
| 3785 core.bool isPlusUser; |
| 3786 |
| 3787 /** Identifies this resource as a person. Value: "plus#person". */ |
| 3788 core.String kind; |
| 3789 |
| 3790 /** The user's preferred language for rendering. */ |
| 3791 core.String language; |
| 3792 |
| 3793 /** |
| 3794 * An object representation of the individual components of a person's name. |
| 3795 */ |
| 3796 PersonName name; |
| 3797 |
| 3798 /** The nickname of this person. */ |
| 3799 core.String nickname; |
| 3800 |
| 3801 /** |
| 3802 * Type of person within Google+. Possible values include, but are not limited |
| 3803 * to, the following values: |
| 3804 * - "person" - represents an actual person. |
| 3805 * - "page" - represents a page. |
| 3806 */ |
| 3807 core.String objectType; |
| 3808 |
| 3809 /** The occupation of this person. */ |
| 3810 core.String occupation; |
| 3811 |
| 3812 /** |
| 3813 * A list of current or past organizations with which this person is |
| 3814 * associated. |
| 3815 */ |
| 3816 core.List<PersonOrganizations> organizations; |
| 3817 |
| 3818 /** A list of places where this person has lived. */ |
| 3819 core.List<PersonPlacesLived> placesLived; |
| 3820 |
| 3821 /** If a Google+ Page, the number of people who have +1'd this page. */ |
| 3822 core.int plusOneCount; |
| 3823 |
| 3824 /** |
| 3825 * The person's relationship status. Possible values include, but are not |
| 3826 * limited to, the following values: |
| 3827 * - "single" - Person is single. |
| 3828 * - "in_a_relationship" - Person is in a relationship. |
| 3829 * - "engaged" - Person is engaged. |
| 3830 * - "married" - Person is married. |
| 3831 * - "its_complicated" - The relationship is complicated. |
| 3832 * - "open_relationship" - Person is in an open relationship. |
| 3833 * - "widowed" - Person is widowed. |
| 3834 * - "in_domestic_partnership" - Person is in a domestic partnership. |
| 3835 * - "in_civil_union" - Person is in a civil union. |
| 3836 */ |
| 3837 core.String relationshipStatus; |
| 3838 |
| 3839 /** The person's skills. */ |
| 3840 core.String skills; |
| 3841 |
| 3842 /** The brief description (tagline) of this person. */ |
| 3843 core.String tagline; |
| 3844 |
| 3845 /** The URL of this person's profile. */ |
| 3846 core.String url; |
| 3847 |
| 3848 /** A list of URLs for this person. */ |
| 3849 core.List<PersonUrls> urls; |
| 3850 |
| 3851 /** Whether the person or Google+ Page has been verified. */ |
| 3852 core.bool verified; |
| 3853 |
| 3854 |
| 3855 Person(); |
| 3856 |
| 3857 Person.fromJson(core.Map _json) { |
| 3858 if (_json.containsKey("aboutMe")) { |
| 3859 aboutMe = _json["aboutMe"]; |
| 3860 } |
| 3861 if (_json.containsKey("ageRange")) { |
| 3862 ageRange = new PersonAgeRange.fromJson(_json["ageRange"]); |
| 3863 } |
| 3864 if (_json.containsKey("birthday")) { |
| 3865 birthday = _json["birthday"]; |
| 3866 } |
| 3867 if (_json.containsKey("braggingRights")) { |
| 3868 braggingRights = _json["braggingRights"]; |
| 3869 } |
| 3870 if (_json.containsKey("circledByCount")) { |
| 3871 circledByCount = _json["circledByCount"]; |
| 3872 } |
| 3873 if (_json.containsKey("cover")) { |
| 3874 cover = new PersonCover.fromJson(_json["cover"]); |
| 3875 } |
| 3876 if (_json.containsKey("currentLocation")) { |
| 3877 currentLocation = _json["currentLocation"]; |
| 3878 } |
| 3879 if (_json.containsKey("displayName")) { |
| 3880 displayName = _json["displayName"]; |
| 3881 } |
| 3882 if (_json.containsKey("domain")) { |
| 3883 domain = _json["domain"]; |
| 3884 } |
| 3885 if (_json.containsKey("emails")) { |
| 3886 emails = _json["emails"].map((value) => new PersonEmails.fromJson(value)).
toList(); |
| 3887 } |
| 3888 if (_json.containsKey("etag")) { |
| 3889 etag = _json["etag"]; |
| 3890 } |
| 3891 if (_json.containsKey("gender")) { |
| 3892 gender = _json["gender"]; |
| 3893 } |
| 3894 if (_json.containsKey("id")) { |
| 3895 id = _json["id"]; |
| 3896 } |
| 3897 if (_json.containsKey("image")) { |
| 3898 image = new PersonImage.fromJson(_json["image"]); |
| 3899 } |
| 3900 if (_json.containsKey("isPlusUser")) { |
| 3901 isPlusUser = _json["isPlusUser"]; |
| 3902 } |
| 3903 if (_json.containsKey("kind")) { |
| 3904 kind = _json["kind"]; |
| 3905 } |
| 3906 if (_json.containsKey("language")) { |
| 3907 language = _json["language"]; |
| 3908 } |
| 3909 if (_json.containsKey("name")) { |
| 3910 name = new PersonName.fromJson(_json["name"]); |
| 3911 } |
| 3912 if (_json.containsKey("nickname")) { |
| 3913 nickname = _json["nickname"]; |
| 3914 } |
| 3915 if (_json.containsKey("objectType")) { |
| 3916 objectType = _json["objectType"]; |
| 3917 } |
| 3918 if (_json.containsKey("occupation")) { |
| 3919 occupation = _json["occupation"]; |
| 3920 } |
| 3921 if (_json.containsKey("organizations")) { |
| 3922 organizations = _json["organizations"].map((value) => new PersonOrganizati
ons.fromJson(value)).toList(); |
| 3923 } |
| 3924 if (_json.containsKey("placesLived")) { |
| 3925 placesLived = _json["placesLived"].map((value) => new PersonPlacesLived.fr
omJson(value)).toList(); |
| 3926 } |
| 3927 if (_json.containsKey("plusOneCount")) { |
| 3928 plusOneCount = _json["plusOneCount"]; |
| 3929 } |
| 3930 if (_json.containsKey("relationshipStatus")) { |
| 3931 relationshipStatus = _json["relationshipStatus"]; |
| 3932 } |
| 3933 if (_json.containsKey("skills")) { |
| 3934 skills = _json["skills"]; |
| 3935 } |
| 3936 if (_json.containsKey("tagline")) { |
| 3937 tagline = _json["tagline"]; |
| 3938 } |
| 3939 if (_json.containsKey("url")) { |
| 3940 url = _json["url"]; |
| 3941 } |
| 3942 if (_json.containsKey("urls")) { |
| 3943 urls = _json["urls"].map((value) => new PersonUrls.fromJson(value)).toList
(); |
| 3944 } |
| 3945 if (_json.containsKey("verified")) { |
| 3946 verified = _json["verified"]; |
| 3947 } |
| 3948 } |
| 3949 |
| 3950 core.Map toJson() { |
| 3951 var _json = new core.Map(); |
| 3952 if (aboutMe != null) { |
| 3953 _json["aboutMe"] = aboutMe; |
| 3954 } |
| 3955 if (ageRange != null) { |
| 3956 _json["ageRange"] = (ageRange).toJson(); |
| 3957 } |
| 3958 if (birthday != null) { |
| 3959 _json["birthday"] = birthday; |
| 3960 } |
| 3961 if (braggingRights != null) { |
| 3962 _json["braggingRights"] = braggingRights; |
| 3963 } |
| 3964 if (circledByCount != null) { |
| 3965 _json["circledByCount"] = circledByCount; |
| 3966 } |
| 3967 if (cover != null) { |
| 3968 _json["cover"] = (cover).toJson(); |
| 3969 } |
| 3970 if (currentLocation != null) { |
| 3971 _json["currentLocation"] = currentLocation; |
| 3972 } |
| 3973 if (displayName != null) { |
| 3974 _json["displayName"] = displayName; |
| 3975 } |
| 3976 if (domain != null) { |
| 3977 _json["domain"] = domain; |
| 3978 } |
| 3979 if (emails != null) { |
| 3980 _json["emails"] = emails.map((value) => (value).toJson()).toList(); |
| 3981 } |
| 3982 if (etag != null) { |
| 3983 _json["etag"] = etag; |
| 3984 } |
| 3985 if (gender != null) { |
| 3986 _json["gender"] = gender; |
| 3987 } |
| 3988 if (id != null) { |
| 3989 _json["id"] = id; |
| 3990 } |
| 3991 if (image != null) { |
| 3992 _json["image"] = (image).toJson(); |
| 3993 } |
| 3994 if (isPlusUser != null) { |
| 3995 _json["isPlusUser"] = isPlusUser; |
| 3996 } |
| 3997 if (kind != null) { |
| 3998 _json["kind"] = kind; |
| 3999 } |
| 4000 if (language != null) { |
| 4001 _json["language"] = language; |
| 4002 } |
| 4003 if (name != null) { |
| 4004 _json["name"] = (name).toJson(); |
| 4005 } |
| 4006 if (nickname != null) { |
| 4007 _json["nickname"] = nickname; |
| 4008 } |
| 4009 if (objectType != null) { |
| 4010 _json["objectType"] = objectType; |
| 4011 } |
| 4012 if (occupation != null) { |
| 4013 _json["occupation"] = occupation; |
| 4014 } |
| 4015 if (organizations != null) { |
| 4016 _json["organizations"] = organizations.map((value) => (value).toJson()).to
List(); |
| 4017 } |
| 4018 if (placesLived != null) { |
| 4019 _json["placesLived"] = placesLived.map((value) => (value).toJson()).toList
(); |
| 4020 } |
| 4021 if (plusOneCount != null) { |
| 4022 _json["plusOneCount"] = plusOneCount; |
| 4023 } |
| 4024 if (relationshipStatus != null) { |
| 4025 _json["relationshipStatus"] = relationshipStatus; |
| 4026 } |
| 4027 if (skills != null) { |
| 4028 _json["skills"] = skills; |
| 4029 } |
| 4030 if (tagline != null) { |
| 4031 _json["tagline"] = tagline; |
| 4032 } |
| 4033 if (url != null) { |
| 4034 _json["url"] = url; |
| 4035 } |
| 4036 if (urls != null) { |
| 4037 _json["urls"] = urls.map((value) => (value).toJson()).toList(); |
| 4038 } |
| 4039 if (verified != null) { |
| 4040 _json["verified"] = verified; |
| 4041 } |
| 4042 return _json; |
| 4043 } |
| 4044 } |
| 4045 |
| 4046 |
| 4047 /** The physical address of the place. */ |
| 4048 class PlaceAddress { |
| 4049 /** The formatted address for display. */ |
| 4050 core.String formatted; |
| 4051 |
| 4052 |
| 4053 PlaceAddress(); |
| 4054 |
| 4055 PlaceAddress.fromJson(core.Map _json) { |
| 4056 if (_json.containsKey("formatted")) { |
| 4057 formatted = _json["formatted"]; |
| 4058 } |
| 4059 } |
| 4060 |
| 4061 core.Map toJson() { |
| 4062 var _json = new core.Map(); |
| 4063 if (formatted != null) { |
| 4064 _json["formatted"] = formatted; |
| 4065 } |
| 4066 return _json; |
| 4067 } |
| 4068 } |
| 4069 |
| 4070 |
| 4071 /** The position of the place. */ |
| 4072 class PlacePosition { |
| 4073 /** The latitude of this position. */ |
| 4074 core.double latitude; |
| 4075 |
| 4076 /** The longitude of this position. */ |
| 4077 core.double longitude; |
| 4078 |
| 4079 |
| 4080 PlacePosition(); |
| 4081 |
| 4082 PlacePosition.fromJson(core.Map _json) { |
| 4083 if (_json.containsKey("latitude")) { |
| 4084 latitude = _json["latitude"]; |
| 4085 } |
| 4086 if (_json.containsKey("longitude")) { |
| 4087 longitude = _json["longitude"]; |
| 4088 } |
| 4089 } |
| 4090 |
| 4091 core.Map toJson() { |
| 4092 var _json = new core.Map(); |
| 4093 if (latitude != null) { |
| 4094 _json["latitude"] = latitude; |
| 4095 } |
| 4096 if (longitude != null) { |
| 4097 _json["longitude"] = longitude; |
| 4098 } |
| 4099 return _json; |
| 4100 } |
| 4101 } |
| 4102 |
| 4103 |
| 4104 /** Not documented yet. */ |
| 4105 class Place { |
| 4106 /** The physical address of the place. */ |
| 4107 PlaceAddress address; |
| 4108 |
| 4109 /** The display name of the place. */ |
| 4110 core.String displayName; |
| 4111 |
| 4112 /** The id of the place. */ |
| 4113 core.String id; |
| 4114 |
| 4115 /** Identifies this resource as a place. Value: "plus#place". */ |
| 4116 core.String kind; |
| 4117 |
| 4118 /** The position of the place. */ |
| 4119 PlacePosition position; |
| 4120 |
| 4121 |
| 4122 Place(); |
| 4123 |
| 4124 Place.fromJson(core.Map _json) { |
| 4125 if (_json.containsKey("address")) { |
| 4126 address = new PlaceAddress.fromJson(_json["address"]); |
| 4127 } |
| 4128 if (_json.containsKey("displayName")) { |
| 4129 displayName = _json["displayName"]; |
| 4130 } |
| 4131 if (_json.containsKey("id")) { |
| 4132 id = _json["id"]; |
| 4133 } |
| 4134 if (_json.containsKey("kind")) { |
| 4135 kind = _json["kind"]; |
| 4136 } |
| 4137 if (_json.containsKey("position")) { |
| 4138 position = new PlacePosition.fromJson(_json["position"]); |
| 4139 } |
| 4140 } |
| 4141 |
| 4142 core.Map toJson() { |
| 4143 var _json = new core.Map(); |
| 4144 if (address != null) { |
| 4145 _json["address"] = (address).toJson(); |
| 4146 } |
| 4147 if (displayName != null) { |
| 4148 _json["displayName"] = displayName; |
| 4149 } |
| 4150 if (id != null) { |
| 4151 _json["id"] = id; |
| 4152 } |
| 4153 if (kind != null) { |
| 4154 _json["kind"] = kind; |
| 4155 } |
| 4156 if (position != null) { |
| 4157 _json["position"] = (position).toJson(); |
| 4158 } |
| 4159 return _json; |
| 4160 } |
| 4161 } |
| 4162 |
| 4163 |
| 4164 /** Not documented yet. */ |
| 4165 class PlusAclentryResource { |
| 4166 /** A descriptive name for this entry. Suitable for display. */ |
| 4167 core.String displayName; |
| 4168 |
| 4169 /** |
| 4170 * The ID of the entry. For entries of type "person" or "circle", this is the |
| 4171 * ID of the resource. For other types, this property is not set. |
| 4172 */ |
| 4173 core.String id; |
| 4174 |
| 4175 /** |
| 4176 * The type of entry describing to whom access is granted. Possible values |
| 4177 * are: |
| 4178 * - "person" - Access to an individual. |
| 4179 * - "circle" - Access to members of a circle. |
| 4180 * - "myCircles" - Access to members of all the person's circles. |
| 4181 * - "extendedCircles" - Access to members of all the person's circles, plus |
| 4182 * all of the people in their circles. |
| 4183 * - "domain" - Access to members of the person's Google Apps domain. |
| 4184 * - "public" - Access to anyone on the web. |
| 4185 */ |
| 4186 core.String type; |
| 4187 |
| 4188 |
| 4189 PlusAclentryResource(); |
| 4190 |
| 4191 PlusAclentryResource.fromJson(core.Map _json) { |
| 4192 if (_json.containsKey("displayName")) { |
| 4193 displayName = _json["displayName"]; |
| 4194 } |
| 4195 if (_json.containsKey("id")) { |
| 4196 id = _json["id"]; |
| 4197 } |
| 4198 if (_json.containsKey("type")) { |
| 4199 type = _json["type"]; |
| 4200 } |
| 4201 } |
| 4202 |
| 4203 core.Map toJson() { |
| 4204 var _json = new core.Map(); |
| 4205 if (displayName != null) { |
| 4206 _json["displayName"] = displayName; |
| 4207 } |
| 4208 if (id != null) { |
| 4209 _json["id"] = id; |
| 4210 } |
| 4211 if (type != null) { |
| 4212 _json["type"] = type; |
| 4213 } |
| 4214 return _json; |
| 4215 } |
| 4216 } |
| 4217 |
| 4218 |
OLD | NEW |