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

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

Issue 1797933002: Api-roll 33: 2016-03-14 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Added resources/*/CHANGELOG.md, addresssed comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « generated/googleapis/lib/pagespeedonline/v2.dart ('k') | generated/googleapis/lib/plus/v1.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // This is a generated file (see the discoveryapis_generator project).
2
3 library googleapis.people.v1;
4
5 import 'dart:core' as core;
6 import 'dart:async' as async;
7 import 'dart:convert' as convert;
8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http;
11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
13 ApiRequestError, DetailedApiRequestError;
14
15 const core.String USER_AGENT = 'dart-api-client people/v1';
16
17 /**
18 * The Google People API service gives access to information about profiles and
19 * contacts.
20 */
21 class PeopleApi {
22 /** Manage your contacts */
23 static const ContactsScope = "https://www.googleapis.com/auth/contacts";
24
25 /** View your contacts */
26 static const ContactsReadonlyScope = "https://www.googleapis.com/auth/contacts .readonly";
27
28 /** Know your basic profile info and list of people in your circles. */
29 static const PlusLoginScope = "https://www.googleapis.com/auth/plus.login";
30
31 /** View your street addresses */
32 static const UserAddressesReadScope = "https://www.googleapis.com/auth/user.ad dresses.read";
33
34 /** View your complete date of birth */
35 static const UserBirthdayReadScope = "https://www.googleapis.com/auth/user.bir thday.read";
36
37 /** View your email addresses */
38 static const UserEmailsReadScope = "https://www.googleapis.com/auth/user.email s.read";
39
40 /** View your phone numbers */
41 static const UserPhonenumbersReadScope = "https://www.googleapis.com/auth/user .phonenumbers.read";
42
43 /** View your email address */
44 static const UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.em ail";
45
46 /** View your basic profile info */
47 static const UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo. profile";
48
49
50 final commons.ApiRequester _requester;
51
52 PeopleResourceApi get people => new PeopleResourceApi(_requester);
53
54 PeopleApi(http.Client client, {core.String rootUrl: "https://people.googleapis .com/", core.String servicePath: ""}) :
55 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
56 }
57
58
59 class PeopleResourceApi {
60 final commons.ApiRequester _requester;
61
62 PeopleConnectionsResourceApi get connections => new PeopleConnectionsResourceA pi(_requester);
63
64 PeopleResourceApi(commons.ApiRequester client) :
65 _requester = client;
66
67 /**
68 * Provides information about a person resource for a resource name. Use
69 * `people/me` to indicate the authenticated user.
70 *
71 * Request parameters:
72 *
73 * [resourceName] - The resource name of the person to provide information
74 * about. - To get information about the authenticated user, specify
75 * `people/me`. - To get information about any user, specify the resource name
76 * that identifies the user, such as the resource names returned by
77 * [`people.connections.list`](/people/api/rest/v1/people.connections/list).
78 * Value must have pattern "^people/[^/]*$".
79 *
80 * [requestMask_includeField] - Comma-separated list of fields to be included
81 * in the response. Omitting this field will include all fields. Each path
82 * should start with `person.`: for example, `person.names` or
83 * `person.photos`.
84 *
85 * Completes with a [Person].
86 *
87 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
88 * error.
89 *
90 * If the used [http.Client] completes with an error when making a REST call,
91 * this method will complete with the same error.
92 */
93 async.Future<Person> get(core.String resourceName, {core.String requestMask_in cludeField}) {
94 var _url = null;
95 var _queryParams = new core.Map();
96 var _uploadMedia = null;
97 var _uploadOptions = null;
98 var _downloadOptions = commons.DownloadOptions.Metadata;
99 var _body = null;
100
101 if (resourceName == null) {
102 throw new core.ArgumentError("Parameter resourceName is required.");
103 }
104 if (requestMask_includeField != null) {
105 _queryParams["requestMask.includeField"] = [requestMask_includeField];
106 }
107
108 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName');
109
110 var _response = _requester.request(_url,
111 "GET",
112 body: _body,
113 queryParams: _queryParams,
114 uploadOptions: _uploadOptions,
115 uploadMedia: _uploadMedia,
116 downloadOptions: _downloadOptions);
117 return _response.then((data) => new Person.fromJson(data));
118 }
119
120 /**
121 * Provides information about a list of specific people by specifying a list
122 * of requested resource names. Use `people/me` to indicate the authenticated
123 * user.
124 *
125 * Request parameters:
126 *
127 * [resourceNames] - The resource name, such as one returned by
128 * [`people.connections.list`](/people/api/rest/v1/people.connections/list),
129 * of one of the people to provide information about. You can include this
130 * parameter up to 50 times in one request.
131 *
132 * [requestMask_includeField] - Comma-separated list of fields to be included
133 * in the response. Omitting this field will include all fields. Each path
134 * should start with `person.`: for example, `person.names` or
135 * `person.photos`.
136 *
137 * Completes with a [GetPeopleResponse].
138 *
139 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
140 * error.
141 *
142 * If the used [http.Client] completes with an error when making a REST call,
143 * this method will complete with the same error.
144 */
145 async.Future<GetPeopleResponse> getBatchGet({core.List<core.String> resourceNa mes, core.String requestMask_includeField}) {
146 var _url = null;
147 var _queryParams = new core.Map();
148 var _uploadMedia = null;
149 var _uploadOptions = null;
150 var _downloadOptions = commons.DownloadOptions.Metadata;
151 var _body = null;
152
153 if (resourceNames != null) {
154 _queryParams["resourceNames"] = resourceNames;
155 }
156 if (requestMask_includeField != null) {
157 _queryParams["requestMask.includeField"] = [requestMask_includeField];
158 }
159
160 _url = 'v1/people:batchGet';
161
162 var _response = _requester.request(_url,
163 "GET",
164 body: _body,
165 queryParams: _queryParams,
166 uploadOptions: _uploadOptions,
167 uploadMedia: _uploadMedia,
168 downloadOptions: _downloadOptions);
169 return _response.then((data) => new GetPeopleResponse.fromJson(data));
170 }
171
172 }
173
174
175 class PeopleConnectionsResourceApi {
176 final commons.ApiRequester _requester;
177
178 PeopleConnectionsResourceApi(commons.ApiRequester client) :
179 _requester = client;
180
181 /**
182 * Provides a list of the authenticated user's contacts merged with any linked
183 * profiles.
184 *
185 * Request parameters:
186 *
187 * [resourceName] - The resource name to return connections for. Only
188 * `people/me` is valid.
189 * Value must have pattern "^people/[^/]*$".
190 *
191 * [pageToken] - The token of the page to be returned.
192 *
193 * [pageSize] - The number of connections to include in the response. Valid
194 * values are between 1 and 500, inclusive. Defaults to 100.
195 *
196 * [sortOrder] - The order in which the connections should be sorted. Defaults
197 * to `LAST_MODIFIED_ASCENDING`.
198 * Possible string values are:
199 * - "LAST_MODIFIED_ASCENDING" : A LAST_MODIFIED_ASCENDING.
200 * - "FIRST_NAME_ASCENDING" : A FIRST_NAME_ASCENDING.
201 * - "LAST_NAME_ASCENDING" : A LAST_NAME_ASCENDING.
202 *
203 * [syncToken] - A sync token, returned by a previous call to
204 * `people.connections.list`. Only resources changed since the sync token was
205 * created are returned.
206 *
207 * [requestMask_includeField] - Comma-separated list of fields to be included
208 * in the response. Omitting this field will include all fields. Each path
209 * should start with `person.`: for example, `person.names` or
210 * `person.photos`.
211 *
212 * Completes with a [ListConnectionsResponse].
213 *
214 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
215 * error.
216 *
217 * If the used [http.Client] completes with an error when making a REST call,
218 * this method will complete with the same error.
219 */
220 async.Future<ListConnectionsResponse> list(core.String resourceName, {core.Str ing pageToken, core.int pageSize, core.String sortOrder, core.String syncToken, core.String requestMask_includeField}) {
221 var _url = null;
222 var _queryParams = new core.Map();
223 var _uploadMedia = null;
224 var _uploadOptions = null;
225 var _downloadOptions = commons.DownloadOptions.Metadata;
226 var _body = null;
227
228 if (resourceName == null) {
229 throw new core.ArgumentError("Parameter resourceName is required.");
230 }
231 if (pageToken != null) {
232 _queryParams["pageToken"] = [pageToken];
233 }
234 if (pageSize != null) {
235 _queryParams["pageSize"] = ["${pageSize}"];
236 }
237 if (sortOrder != null) {
238 _queryParams["sortOrder"] = [sortOrder];
239 }
240 if (syncToken != null) {
241 _queryParams["syncToken"] = [syncToken];
242 }
243 if (requestMask_includeField != null) {
244 _queryParams["requestMask.includeField"] = [requestMask_includeField];
245 }
246
247 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName') + '/co nnections';
248
249 var _response = _requester.request(_url,
250 "GET",
251 body: _body,
252 queryParams: _queryParams,
253 uploadOptions: _uploadOptions,
254 uploadMedia: _uploadMedia,
255 downloadOptions: _downloadOptions);
256 return _response.then((data) => new ListConnectionsResponse.fromJson(data));
257 }
258
259 }
260
261
262
263 /**
264 * A person's physical address. May be a P.O. box or street address. All fields
265 * are optional.
266 */
267 class Address {
268 /** The city of the address. */
269 core.String city;
270 /** The country of the address. */
271 core.String country;
272 /**
273 * The [ISO 3166-1 alpha-2](http://www.iso.org/iso/country_codes.htm) country
274 * code of the address.
275 */
276 core.String countryCode;
277 /**
278 * The extended address of the address; for example, the apartment number.
279 */
280 core.String extendedAddress;
281 /**
282 * The read-only type of the address translated and formatted in the viewer's
283 * account locale or the `Accept-Language` HTTP header locale.
284 */
285 core.String formattedType;
286 /**
287 * The read-only value of the address formatted in the viewer's account locale
288 * or the `Accept-Language` HTTP header locale.
289 */
290 core.String formattedValue;
291 /** Metadata about the address. */
292 FieldMetadata metadata;
293 /** The P.O. box of the address. */
294 core.String poBox;
295 /** The postal code of the address. */
296 core.String postalCode;
297 /** The region of the address; for example, the state or province. */
298 core.String region;
299 /** The street address. */
300 core.String streetAddress;
301 /**
302 * The type of the address. The type can be custom or predefined. Possible
303 * values include, but are not limited to, the following: * `home` * `work` *
304 * `other`
305 */
306 core.String type;
307
308 Address();
309
310 Address.fromJson(core.Map _json) {
311 if (_json.containsKey("city")) {
312 city = _json["city"];
313 }
314 if (_json.containsKey("country")) {
315 country = _json["country"];
316 }
317 if (_json.containsKey("countryCode")) {
318 countryCode = _json["countryCode"];
319 }
320 if (_json.containsKey("extendedAddress")) {
321 extendedAddress = _json["extendedAddress"];
322 }
323 if (_json.containsKey("formattedType")) {
324 formattedType = _json["formattedType"];
325 }
326 if (_json.containsKey("formattedValue")) {
327 formattedValue = _json["formattedValue"];
328 }
329 if (_json.containsKey("metadata")) {
330 metadata = new FieldMetadata.fromJson(_json["metadata"]);
331 }
332 if (_json.containsKey("poBox")) {
333 poBox = _json["poBox"];
334 }
335 if (_json.containsKey("postalCode")) {
336 postalCode = _json["postalCode"];
337 }
338 if (_json.containsKey("region")) {
339 region = _json["region"];
340 }
341 if (_json.containsKey("streetAddress")) {
342 streetAddress = _json["streetAddress"];
343 }
344 if (_json.containsKey("type")) {
345 type = _json["type"];
346 }
347 }
348
349 core.Map toJson() {
350 var _json = new core.Map();
351 if (city != null) {
352 _json["city"] = city;
353 }
354 if (country != null) {
355 _json["country"] = country;
356 }
357 if (countryCode != null) {
358 _json["countryCode"] = countryCode;
359 }
360 if (extendedAddress != null) {
361 _json["extendedAddress"] = extendedAddress;
362 }
363 if (formattedType != null) {
364 _json["formattedType"] = formattedType;
365 }
366 if (formattedValue != null) {
367 _json["formattedValue"] = formattedValue;
368 }
369 if (metadata != null) {
370 _json["metadata"] = (metadata).toJson();
371 }
372 if (poBox != null) {
373 _json["poBox"] = poBox;
374 }
375 if (postalCode != null) {
376 _json["postalCode"] = postalCode;
377 }
378 if (region != null) {
379 _json["region"] = region;
380 }
381 if (streetAddress != null) {
382 _json["streetAddress"] = streetAddress;
383 }
384 if (type != null) {
385 _json["type"] = type;
386 }
387 return _json;
388 }
389 }
390
391 /** A person's short biography. */
392 class Biography {
393 /** Metadata about the biography. */
394 FieldMetadata metadata;
395 /** The short biography. */
396 core.String value;
397
398 Biography();
399
400 Biography.fromJson(core.Map _json) {
401 if (_json.containsKey("metadata")) {
402 metadata = new FieldMetadata.fromJson(_json["metadata"]);
403 }
404 if (_json.containsKey("value")) {
405 value = _json["value"];
406 }
407 }
408
409 core.Map toJson() {
410 var _json = new core.Map();
411 if (metadata != null) {
412 _json["metadata"] = (metadata).toJson();
413 }
414 if (value != null) {
415 _json["value"] = value;
416 }
417 return _json;
418 }
419 }
420
421 /**
422 * A person's birthday. At least one of the `date` and `text` fields are
423 * specified. The `date` and `text` fields typically represent the same date,
424 * but are not guaranteed to.
425 */
426 class Birthday {
427 /** The date of the birthday. */
428 Date date;
429 /** Metadata about the birthday. */
430 FieldMetadata metadata;
431 /** A free-form string representing the user's birthday. */
432 core.String text;
433
434 Birthday();
435
436 Birthday.fromJson(core.Map _json) {
437 if (_json.containsKey("date")) {
438 date = new Date.fromJson(_json["date"]);
439 }
440 if (_json.containsKey("metadata")) {
441 metadata = new FieldMetadata.fromJson(_json["metadata"]);
442 }
443 if (_json.containsKey("text")) {
444 text = _json["text"];
445 }
446 }
447
448 core.Map toJson() {
449 var _json = new core.Map();
450 if (date != null) {
451 _json["date"] = (date).toJson();
452 }
453 if (metadata != null) {
454 _json["metadata"] = (metadata).toJson();
455 }
456 if (text != null) {
457 _json["text"] = text;
458 }
459 return _json;
460 }
461 }
462
463 /** A person's bragging rights. */
464 class BraggingRights {
465 /** Metadata about the bragging rights. */
466 FieldMetadata metadata;
467 /** The bragging rights; for example, `climbed mount everest`. */
468 core.String value;
469
470 BraggingRights();
471
472 BraggingRights.fromJson(core.Map _json) {
473 if (_json.containsKey("metadata")) {
474 metadata = new FieldMetadata.fromJson(_json["metadata"]);
475 }
476 if (_json.containsKey("value")) {
477 value = _json["value"];
478 }
479 }
480
481 core.Map toJson() {
482 var _json = new core.Map();
483 if (metadata != null) {
484 _json["metadata"] = (metadata).toJson();
485 }
486 if (value != null) {
487 _json["value"] = value;
488 }
489 return _json;
490 }
491 }
492
493 /** A Google contact group membership. */
494 class ContactGroupMembership {
495 /**
496 * The contact group ID for the contact group membership. The contact group ID
497 * can be custom or predefined. Possible values include, but are not limited
498 * to, the following: * `myContacts` * `starred` * A numerical ID for
499 * user-created groups.
500 */
501 core.String contactGroupId;
502
503 ContactGroupMembership();
504
505 ContactGroupMembership.fromJson(core.Map _json) {
506 if (_json.containsKey("contactGroupId")) {
507 contactGroupId = _json["contactGroupId"];
508 }
509 }
510
511 core.Map toJson() {
512 var _json = new core.Map();
513 if (contactGroupId != null) {
514 _json["contactGroupId"] = contactGroupId;
515 }
516 return _json;
517 }
518 }
519
520 /**
521 * A person's cover photo. A large image shown on the person's profile page that
522 * represents who they are or what they care about.
523 */
524 class CoverPhoto {
525 /**
526 * True if the cover photo is the default cover photo; false if the cover
527 * photo is a user-provided cover photo.
528 */
529 core.bool default_;
530 /** Metadata about the cover photo. */
531 FieldMetadata metadata;
532 /** The URL of the cover photo. */
533 core.String url;
534
535 CoverPhoto();
536
537 CoverPhoto.fromJson(core.Map _json) {
538 if (_json.containsKey("default")) {
539 default_ = _json["default"];
540 }
541 if (_json.containsKey("metadata")) {
542 metadata = new FieldMetadata.fromJson(_json["metadata"]);
543 }
544 if (_json.containsKey("url")) {
545 url = _json["url"];
546 }
547 }
548
549 core.Map toJson() {
550 var _json = new core.Map();
551 if (default_ != null) {
552 _json["default"] = default_;
553 }
554 if (metadata != null) {
555 _json["metadata"] = (metadata).toJson();
556 }
557 if (url != null) {
558 _json["url"] = url;
559 }
560 return _json;
561 }
562 }
563
564 /**
565 * Represents a whole calendar date, for example a date of birth. The time of
566 * day and time zone are either specified elsewhere or are not significant. The
567 * date is relative to the [Proleptic Gregorian
568 * Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The
569 * day may be 0 to represent a year and month where the day is not significant.
570 * The year may be 0 to represent a month and day independent of year; for
571 * example, anniversary date.
572 */
573 class Date {
574 /**
575 * Day of month. Must be from 1 to 31 and valid for the year and month, or 0
576 * if specifying a year/month where the day is not significant.
577 */
578 core.int day;
579 /** Month of year. Must be from 1 to 12. */
580 core.int month;
581 /**
582 * Year of date. Must be from 1 to 9999, or 0 if specifying a date without a
583 * year.
584 */
585 core.int year;
586
587 Date();
588
589 Date.fromJson(core.Map _json) {
590 if (_json.containsKey("day")) {
591 day = _json["day"];
592 }
593 if (_json.containsKey("month")) {
594 month = _json["month"];
595 }
596 if (_json.containsKey("year")) {
597 year = _json["year"];
598 }
599 }
600
601 core.Map toJson() {
602 var _json = new core.Map();
603 if (day != null) {
604 _json["day"] = day;
605 }
606 if (month != null) {
607 _json["month"] = month;
608 }
609 if (year != null) {
610 _json["year"] = year;
611 }
612 return _json;
613 }
614 }
615
616 /** A Google Apps Domain membership. */
617 class DomainMembership {
618 /** True if the person is in the viewer's Google Apps domain. */
619 core.bool inViewerDomain;
620
621 DomainMembership();
622
623 DomainMembership.fromJson(core.Map _json) {
624 if (_json.containsKey("inViewerDomain")) {
625 inViewerDomain = _json["inViewerDomain"];
626 }
627 }
628
629 core.Map toJson() {
630 var _json = new core.Map();
631 if (inViewerDomain != null) {
632 _json["inViewerDomain"] = inViewerDomain;
633 }
634 return _json;
635 }
636 }
637
638 /** A person's email address. */
639 class EmailAddress {
640 /**
641 * The read-only type of the email address translated and formatted in the
642 * viewer's account locale or the `Accept-Language` HTTP header locale.
643 */
644 core.String formattedType;
645 /** Metadata about the email address. */
646 FieldMetadata metadata;
647 /**
648 * The type of the email address. The type can be custom or predefined.
649 * Possible values include, but are not limited to, the following: * `home` *
650 * `work` * `other`
651 */
652 core.String type;
653 /** The email address. */
654 core.String value;
655
656 EmailAddress();
657
658 EmailAddress.fromJson(core.Map _json) {
659 if (_json.containsKey("formattedType")) {
660 formattedType = _json["formattedType"];
661 }
662 if (_json.containsKey("metadata")) {
663 metadata = new FieldMetadata.fromJson(_json["metadata"]);
664 }
665 if (_json.containsKey("type")) {
666 type = _json["type"];
667 }
668 if (_json.containsKey("value")) {
669 value = _json["value"];
670 }
671 }
672
673 core.Map toJson() {
674 var _json = new core.Map();
675 if (formattedType != null) {
676 _json["formattedType"] = formattedType;
677 }
678 if (metadata != null) {
679 _json["metadata"] = (metadata).toJson();
680 }
681 if (type != null) {
682 _json["type"] = type;
683 }
684 if (value != null) {
685 _json["value"] = value;
686 }
687 return _json;
688 }
689 }
690
691 /** An event related to the person. */
692 class Event {
693 /** The date of the event. */
694 Date date;
695 /**
696 * The read-only type of the event translated and formatted in the viewer's
697 * account locale or the `Accept-Language` HTTP header locale.
698 */
699 core.String formattedType;
700 /** Metadata about the event. */
701 FieldMetadata metadata;
702 /**
703 * The type of the event. The type can be custom or predefined. Possible
704 * values include, but are not limited to, the following: * `anniversary` *
705 * `other`
706 */
707 core.String type;
708
709 Event();
710
711 Event.fromJson(core.Map _json) {
712 if (_json.containsKey("date")) {
713 date = new Date.fromJson(_json["date"]);
714 }
715 if (_json.containsKey("formattedType")) {
716 formattedType = _json["formattedType"];
717 }
718 if (_json.containsKey("metadata")) {
719 metadata = new FieldMetadata.fromJson(_json["metadata"]);
720 }
721 if (_json.containsKey("type")) {
722 type = _json["type"];
723 }
724 }
725
726 core.Map toJson() {
727 var _json = new core.Map();
728 if (date != null) {
729 _json["date"] = (date).toJson();
730 }
731 if (formattedType != null) {
732 _json["formattedType"] = formattedType;
733 }
734 if (metadata != null) {
735 _json["metadata"] = (metadata).toJson();
736 }
737 if (type != null) {
738 _json["type"] = type;
739 }
740 return _json;
741 }
742 }
743
744 /** Metadata about a field. */
745 class FieldMetadata {
746 /**
747 * True if the field is the primary field; false if the field is a secondary
748 * field.
749 */
750 core.bool primary;
751 /** The source of the field. */
752 Source source;
753 /**
754 * True if the field is verified; false if the field is unverified. A verified
755 * field is typically a name, email address, phone number, or website that has
756 * been confirmed to be owned by the person.
757 */
758 core.bool verified;
759
760 FieldMetadata();
761
762 FieldMetadata.fromJson(core.Map _json) {
763 if (_json.containsKey("primary")) {
764 primary = _json["primary"];
765 }
766 if (_json.containsKey("source")) {
767 source = new Source.fromJson(_json["source"]);
768 }
769 if (_json.containsKey("verified")) {
770 verified = _json["verified"];
771 }
772 }
773
774 core.Map toJson() {
775 var _json = new core.Map();
776 if (primary != null) {
777 _json["primary"] = primary;
778 }
779 if (source != null) {
780 _json["source"] = (source).toJson();
781 }
782 if (verified != null) {
783 _json["verified"] = verified;
784 }
785 return _json;
786 }
787 }
788
789 /** A person's gender. */
790 class Gender {
791 /**
792 * The read-only value of the gender translated and formatted in the viewer's
793 * account locale or the `Accept-Language` HTTP header locale.
794 */
795 core.String formattedValue;
796 /** Metadata about the gender. */
797 FieldMetadata metadata;
798 /**
799 * The gender for the person. The gender can be custom or predefined. Possible
800 * values include, but are not limited to, the following: * `male` * `female`
801 * * `other` * `unknown`
802 */
803 core.String value;
804
805 Gender();
806
807 Gender.fromJson(core.Map _json) {
808 if (_json.containsKey("formattedValue")) {
809 formattedValue = _json["formattedValue"];
810 }
811 if (_json.containsKey("metadata")) {
812 metadata = new FieldMetadata.fromJson(_json["metadata"]);
813 }
814 if (_json.containsKey("value")) {
815 value = _json["value"];
816 }
817 }
818
819 core.Map toJson() {
820 var _json = new core.Map();
821 if (formattedValue != null) {
822 _json["formattedValue"] = formattedValue;
823 }
824 if (metadata != null) {
825 _json["metadata"] = (metadata).toJson();
826 }
827 if (value != null) {
828 _json["value"] = value;
829 }
830 return _json;
831 }
832 }
833
834 class GetPeopleResponse {
835 /** The response for each requested resource name. */
836 core.List<PersonResponse> responses;
837
838 GetPeopleResponse();
839
840 GetPeopleResponse.fromJson(core.Map _json) {
841 if (_json.containsKey("responses")) {
842 responses = _json["responses"].map((value) => new PersonResponse.fromJson( value)).toList();
843 }
844 }
845
846 core.Map toJson() {
847 var _json = new core.Map();
848 if (responses != null) {
849 _json["responses"] = responses.map((value) => (value).toJson()).toList();
850 }
851 return _json;
852 }
853 }
854
855 /** A person's instant messaging client. */
856 class ImClient {
857 /**
858 * The read-only protocol of the IM client formatted in the viewer's account
859 * locale or the `Accept-Language` HTTP header locale.
860 */
861 core.String formattedProtocol;
862 /**
863 * The read-only type of the IM client translated and formatted in the
864 * viewer's account locale or the `Accept-Language` HTTP header locale.
865 */
866 core.String formattedType;
867 /** Metadata about the IM client. */
868 FieldMetadata metadata;
869 /**
870 * The protocol of the IM client. The protocol can be custom or predefined.
871 * Possible values include, but are not limited to, the following: * `aim` *
872 * `msn` * `yahoo` * `skype` * `qq` * `googleTalk` * `icq` * `jabber` *
873 * `netMeeting`
874 */
875 core.String protocol;
876 /**
877 * The type of the IM client. The type can be custom or predefined. Possible
878 * values include, but are not limited to, the following: * `home` * `work` *
879 * `other`
880 */
881 core.String type;
882 /** The user name used in the IM client. */
883 core.String username;
884
885 ImClient();
886
887 ImClient.fromJson(core.Map _json) {
888 if (_json.containsKey("formattedProtocol")) {
889 formattedProtocol = _json["formattedProtocol"];
890 }
891 if (_json.containsKey("formattedType")) {
892 formattedType = _json["formattedType"];
893 }
894 if (_json.containsKey("metadata")) {
895 metadata = new FieldMetadata.fromJson(_json["metadata"]);
896 }
897 if (_json.containsKey("protocol")) {
898 protocol = _json["protocol"];
899 }
900 if (_json.containsKey("type")) {
901 type = _json["type"];
902 }
903 if (_json.containsKey("username")) {
904 username = _json["username"];
905 }
906 }
907
908 core.Map toJson() {
909 var _json = new core.Map();
910 if (formattedProtocol != null) {
911 _json["formattedProtocol"] = formattedProtocol;
912 }
913 if (formattedType != null) {
914 _json["formattedType"] = formattedType;
915 }
916 if (metadata != null) {
917 _json["metadata"] = (metadata).toJson();
918 }
919 if (protocol != null) {
920 _json["protocol"] = protocol;
921 }
922 if (type != null) {
923 _json["type"] = type;
924 }
925 if (username != null) {
926 _json["username"] = username;
927 }
928 return _json;
929 }
930 }
931
932 /** One of the person's interests. */
933 class Interest {
934 /** Metadata about the interest. */
935 FieldMetadata metadata;
936 /** The interest; for example, `stargazing`. */
937 core.String value;
938
939 Interest();
940
941 Interest.fromJson(core.Map _json) {
942 if (_json.containsKey("metadata")) {
943 metadata = new FieldMetadata.fromJson(_json["metadata"]);
944 }
945 if (_json.containsKey("value")) {
946 value = _json["value"];
947 }
948 }
949
950 core.Map toJson() {
951 var _json = new core.Map();
952 if (metadata != null) {
953 _json["metadata"] = (metadata).toJson();
954 }
955 if (value != null) {
956 _json["value"] = value;
957 }
958 return _json;
959 }
960 }
961
962 class ListConnectionsResponse {
963 /** The list of people that the requestor is connected to. */
964 core.List<Person> connections;
965 /** The token that can be used to retrieve the next page of results. */
966 core.String nextPageToken;
967 /** The token that can be used to retrieve changes since the last request. */
968 core.String nextSyncToken;
969
970 ListConnectionsResponse();
971
972 ListConnectionsResponse.fromJson(core.Map _json) {
973 if (_json.containsKey("connections")) {
974 connections = _json["connections"].map((value) => new Person.fromJson(valu e)).toList();
975 }
976 if (_json.containsKey("nextPageToken")) {
977 nextPageToken = _json["nextPageToken"];
978 }
979 if (_json.containsKey("nextSyncToken")) {
980 nextSyncToken = _json["nextSyncToken"];
981 }
982 }
983
984 core.Map toJson() {
985 var _json = new core.Map();
986 if (connections != null) {
987 _json["connections"] = connections.map((value) => (value).toJson()).toList ();
988 }
989 if (nextPageToken != null) {
990 _json["nextPageToken"] = nextPageToken;
991 }
992 if (nextSyncToken != null) {
993 _json["nextSyncToken"] = nextSyncToken;
994 }
995 return _json;
996 }
997 }
998
999 /** A person's locale preference. */
1000 class Locale {
1001 /** Metadata about the locale. */
1002 FieldMetadata metadata;
1003 /**
1004 * The well-formed [IETF BCP 47](https://tools.ietf.org/html/bcp47) language
1005 * tag representing the locale.
1006 */
1007 core.String value;
1008
1009 Locale();
1010
1011 Locale.fromJson(core.Map _json) {
1012 if (_json.containsKey("metadata")) {
1013 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1014 }
1015 if (_json.containsKey("value")) {
1016 value = _json["value"];
1017 }
1018 }
1019
1020 core.Map toJson() {
1021 var _json = new core.Map();
1022 if (metadata != null) {
1023 _json["metadata"] = (metadata).toJson();
1024 }
1025 if (value != null) {
1026 _json["value"] = value;
1027 }
1028 return _json;
1029 }
1030 }
1031
1032 /** A person's membership in a group. */
1033 class Membership {
1034 /** The contact group membership. */
1035 ContactGroupMembership contactGroupMembership;
1036 /** The domain membership. */
1037 DomainMembership domainMembership;
1038 /** Metadata about the membership. */
1039 FieldMetadata metadata;
1040
1041 Membership();
1042
1043 Membership.fromJson(core.Map _json) {
1044 if (_json.containsKey("contactGroupMembership")) {
1045 contactGroupMembership = new ContactGroupMembership.fromJson(_json["contac tGroupMembership"]);
1046 }
1047 if (_json.containsKey("domainMembership")) {
1048 domainMembership = new DomainMembership.fromJson(_json["domainMembership"] );
1049 }
1050 if (_json.containsKey("metadata")) {
1051 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1052 }
1053 }
1054
1055 core.Map toJson() {
1056 var _json = new core.Map();
1057 if (contactGroupMembership != null) {
1058 _json["contactGroupMembership"] = (contactGroupMembership).toJson();
1059 }
1060 if (domainMembership != null) {
1061 _json["domainMembership"] = (domainMembership).toJson();
1062 }
1063 if (metadata != null) {
1064 _json["metadata"] = (metadata).toJson();
1065 }
1066 return _json;
1067 }
1068 }
1069
1070 /** A person's name. If the name is a mononym, the family name is empty. */
1071 class Name {
1072 /**
1073 * The display name formatted according to the locale specified by the
1074 * viewer's account or the Accept-Language HTTP header.
1075 */
1076 core.String displayName;
1077 /** The family name. */
1078 core.String familyName;
1079 /** The given name. */
1080 core.String givenName;
1081 /** The honorific prefixes, such as `Mrs.` or `Dr.` */
1082 core.String honorificPrefix;
1083 /** The honorific suffixes, such as `Jr.` */
1084 core.String honorificSuffix;
1085 /** Metadata about the name. */
1086 FieldMetadata metadata;
1087 /** The middle name(s). */
1088 core.String middleName;
1089 /** The family name spelled as it sounds. */
1090 core.String phoneticFamilyName;
1091 /** The given name spelled as it sounds. */
1092 core.String phoneticGivenName;
1093 /** The honorific prefixes spelled as they sound. */
1094 core.String phoneticHonorificPrefix;
1095 /** The honorific suffixes spelled as they sound. */
1096 core.String phoneticHonorificSuffix;
1097 /** The middle name(s) spelled as they sound. */
1098 core.String phoneticMiddleName;
1099
1100 Name();
1101
1102 Name.fromJson(core.Map _json) {
1103 if (_json.containsKey("displayName")) {
1104 displayName = _json["displayName"];
1105 }
1106 if (_json.containsKey("familyName")) {
1107 familyName = _json["familyName"];
1108 }
1109 if (_json.containsKey("givenName")) {
1110 givenName = _json["givenName"];
1111 }
1112 if (_json.containsKey("honorificPrefix")) {
1113 honorificPrefix = _json["honorificPrefix"];
1114 }
1115 if (_json.containsKey("honorificSuffix")) {
1116 honorificSuffix = _json["honorificSuffix"];
1117 }
1118 if (_json.containsKey("metadata")) {
1119 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1120 }
1121 if (_json.containsKey("middleName")) {
1122 middleName = _json["middleName"];
1123 }
1124 if (_json.containsKey("phoneticFamilyName")) {
1125 phoneticFamilyName = _json["phoneticFamilyName"];
1126 }
1127 if (_json.containsKey("phoneticGivenName")) {
1128 phoneticGivenName = _json["phoneticGivenName"];
1129 }
1130 if (_json.containsKey("phoneticHonorificPrefix")) {
1131 phoneticHonorificPrefix = _json["phoneticHonorificPrefix"];
1132 }
1133 if (_json.containsKey("phoneticHonorificSuffix")) {
1134 phoneticHonorificSuffix = _json["phoneticHonorificSuffix"];
1135 }
1136 if (_json.containsKey("phoneticMiddleName")) {
1137 phoneticMiddleName = _json["phoneticMiddleName"];
1138 }
1139 }
1140
1141 core.Map toJson() {
1142 var _json = new core.Map();
1143 if (displayName != null) {
1144 _json["displayName"] = displayName;
1145 }
1146 if (familyName != null) {
1147 _json["familyName"] = familyName;
1148 }
1149 if (givenName != null) {
1150 _json["givenName"] = givenName;
1151 }
1152 if (honorificPrefix != null) {
1153 _json["honorificPrefix"] = honorificPrefix;
1154 }
1155 if (honorificSuffix != null) {
1156 _json["honorificSuffix"] = honorificSuffix;
1157 }
1158 if (metadata != null) {
1159 _json["metadata"] = (metadata).toJson();
1160 }
1161 if (middleName != null) {
1162 _json["middleName"] = middleName;
1163 }
1164 if (phoneticFamilyName != null) {
1165 _json["phoneticFamilyName"] = phoneticFamilyName;
1166 }
1167 if (phoneticGivenName != null) {
1168 _json["phoneticGivenName"] = phoneticGivenName;
1169 }
1170 if (phoneticHonorificPrefix != null) {
1171 _json["phoneticHonorificPrefix"] = phoneticHonorificPrefix;
1172 }
1173 if (phoneticHonorificSuffix != null) {
1174 _json["phoneticHonorificSuffix"] = phoneticHonorificSuffix;
1175 }
1176 if (phoneticMiddleName != null) {
1177 _json["phoneticMiddleName"] = phoneticMiddleName;
1178 }
1179 return _json;
1180 }
1181 }
1182
1183 /** A person's nickname. */
1184 class Nickname {
1185 /** Metadata about the nickname. */
1186 FieldMetadata metadata;
1187 /**
1188 * The type of the nickname.
1189 * Possible string values are:
1190 * - "DEFAULT" : A DEFAULT.
1191 * - "MAIDEN_NAME" : A MAIDEN_NAME.
1192 * - "INITIALS" : A INITIALS.
1193 * - "GPLUS" : A GPLUS.
1194 * - "OTHER_NAME" : A OTHER_NAME.
1195 */
1196 core.String type;
1197 /** The nickname. */
1198 core.String value;
1199
1200 Nickname();
1201
1202 Nickname.fromJson(core.Map _json) {
1203 if (_json.containsKey("metadata")) {
1204 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1205 }
1206 if (_json.containsKey("type")) {
1207 type = _json["type"];
1208 }
1209 if (_json.containsKey("value")) {
1210 value = _json["value"];
1211 }
1212 }
1213
1214 core.Map toJson() {
1215 var _json = new core.Map();
1216 if (metadata != null) {
1217 _json["metadata"] = (metadata).toJson();
1218 }
1219 if (type != null) {
1220 _json["type"] = type;
1221 }
1222 if (value != null) {
1223 _json["value"] = value;
1224 }
1225 return _json;
1226 }
1227 }
1228
1229 /** A person's occupation. */
1230 class Occupation {
1231 /** Metadata about the occupation. */
1232 FieldMetadata metadata;
1233 /** The occupation; for example, `carpenter`. */
1234 core.String value;
1235
1236 Occupation();
1237
1238 Occupation.fromJson(core.Map _json) {
1239 if (_json.containsKey("metadata")) {
1240 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1241 }
1242 if (_json.containsKey("value")) {
1243 value = _json["value"];
1244 }
1245 }
1246
1247 core.Map toJson() {
1248 var _json = new core.Map();
1249 if (metadata != null) {
1250 _json["metadata"] = (metadata).toJson();
1251 }
1252 if (value != null) {
1253 _json["value"] = value;
1254 }
1255 return _json;
1256 }
1257 }
1258
1259 /**
1260 * A person's past or current organization. Overlapping date ranges are
1261 * permitted.
1262 */
1263 class Organization {
1264 /**
1265 * True if the organization is the person's current organization; false if the
1266 * organization is a past organization.
1267 */
1268 core.bool current;
1269 /** The person's department at the organization. */
1270 core.String department;
1271 /**
1272 * The domain name associated with the organization; for example,
1273 * `google.com`.
1274 */
1275 core.String domain;
1276 /** The end date when the person left the organization. */
1277 Date endDate;
1278 /**
1279 * The read-only type of the organization translated and formatted in the
1280 * viewer's account locale or the `Accept-Language` HTTP header locale.
1281 */
1282 core.String formattedType;
1283 /** The person's job description at the organization. */
1284 core.String jobDescription;
1285 /** The location of the organization office the person works at. */
1286 core.String location;
1287 /** Metadata about the organization. */
1288 FieldMetadata metadata;
1289 /** The name of the organization. */
1290 core.String name;
1291 /** The phonetic name of the organization. */
1292 core.String phoneticName;
1293 /** The start date when the person joined the organization. */
1294 Date startDate;
1295 /**
1296 * The symbol associated with the organization; for example, a stock ticker
1297 * symbol, abbreviation, or acronym.
1298 */
1299 core.String symbol;
1300 /** The person's job title at the organization. */
1301 core.String title;
1302 /**
1303 * The type of the organization. The type can be custom or predefined.
1304 * Possible values include, but are not limited to, the following: * `work` *
1305 * `school`
1306 */
1307 core.String type;
1308
1309 Organization();
1310
1311 Organization.fromJson(core.Map _json) {
1312 if (_json.containsKey("current")) {
1313 current = _json["current"];
1314 }
1315 if (_json.containsKey("department")) {
1316 department = _json["department"];
1317 }
1318 if (_json.containsKey("domain")) {
1319 domain = _json["domain"];
1320 }
1321 if (_json.containsKey("endDate")) {
1322 endDate = new Date.fromJson(_json["endDate"]);
1323 }
1324 if (_json.containsKey("formattedType")) {
1325 formattedType = _json["formattedType"];
1326 }
1327 if (_json.containsKey("jobDescription")) {
1328 jobDescription = _json["jobDescription"];
1329 }
1330 if (_json.containsKey("location")) {
1331 location = _json["location"];
1332 }
1333 if (_json.containsKey("metadata")) {
1334 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1335 }
1336 if (_json.containsKey("name")) {
1337 name = _json["name"];
1338 }
1339 if (_json.containsKey("phoneticName")) {
1340 phoneticName = _json["phoneticName"];
1341 }
1342 if (_json.containsKey("startDate")) {
1343 startDate = new Date.fromJson(_json["startDate"]);
1344 }
1345 if (_json.containsKey("symbol")) {
1346 symbol = _json["symbol"];
1347 }
1348 if (_json.containsKey("title")) {
1349 title = _json["title"];
1350 }
1351 if (_json.containsKey("type")) {
1352 type = _json["type"];
1353 }
1354 }
1355
1356 core.Map toJson() {
1357 var _json = new core.Map();
1358 if (current != null) {
1359 _json["current"] = current;
1360 }
1361 if (department != null) {
1362 _json["department"] = department;
1363 }
1364 if (domain != null) {
1365 _json["domain"] = domain;
1366 }
1367 if (endDate != null) {
1368 _json["endDate"] = (endDate).toJson();
1369 }
1370 if (formattedType != null) {
1371 _json["formattedType"] = formattedType;
1372 }
1373 if (jobDescription != null) {
1374 _json["jobDescription"] = jobDescription;
1375 }
1376 if (location != null) {
1377 _json["location"] = location;
1378 }
1379 if (metadata != null) {
1380 _json["metadata"] = (metadata).toJson();
1381 }
1382 if (name != null) {
1383 _json["name"] = name;
1384 }
1385 if (phoneticName != null) {
1386 _json["phoneticName"] = phoneticName;
1387 }
1388 if (startDate != null) {
1389 _json["startDate"] = (startDate).toJson();
1390 }
1391 if (symbol != null) {
1392 _json["symbol"] = symbol;
1393 }
1394 if (title != null) {
1395 _json["title"] = title;
1396 }
1397 if (type != null) {
1398 _json["type"] = type;
1399 }
1400 return _json;
1401 }
1402 }
1403
1404 /**
1405 * Information about a person merged from various data sources such as the
1406 * authenticated user's contacts and profile data. Fields other than IDs,
1407 * metadata, and group memberships are user-edited. Most fields can have
1408 * multiple items. The items in a field have no guaranteed order, but each
1409 * non-empty field is guaranteed to have exactly one field with
1410 * `metadata.primary` set to true.
1411 */
1412 class Person {
1413 /** The person's street addresses. */
1414 core.List<Address> addresses;
1415 /**
1416 * The person's age range.
1417 * Possible string values are:
1418 * - "AGE_RANGE_UNSPECIFIED" : A AGE_RANGE_UNSPECIFIED.
1419 * - "LESS_THAN_EIGHTEEN" : A LESS_THAN_EIGHTEEN.
1420 * - "EIGHTEEN_TO_TWENTY" : A EIGHTEEN_TO_TWENTY.
1421 * - "TWENTY_ONE_OR_OLDER" : A TWENTY_ONE_OR_OLDER.
1422 */
1423 core.String ageRange;
1424 /** The person's biographies. */
1425 core.List<Biography> biographies;
1426 /** The person's birthdays. */
1427 core.List<Birthday> birthdays;
1428 /** The person's bragging rights. */
1429 core.List<BraggingRights> braggingRights;
1430 /** The person's cover photos. */
1431 core.List<CoverPhoto> coverPhotos;
1432 /** The person's email addresses. */
1433 core.List<EmailAddress> emailAddresses;
1434 /**
1435 * The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the
1436 * resource. Used for web cache validation.
1437 */
1438 core.String etag;
1439 /** The person's events. */
1440 core.List<Event> events;
1441 /** The person's genders. */
1442 core.List<Gender> genders;
1443 /** The person's instant messaging clients. */
1444 core.List<ImClient> imClients;
1445 /** The person's interests. */
1446 core.List<Interest> interests;
1447 /** The person's locale preferences. */
1448 core.List<Locale> locales;
1449 /** The person's group memberships. */
1450 core.List<Membership> memberships;
1451 /** Metadata about the person. */
1452 PersonMetadata metadata;
1453 /** The person's names. */
1454 core.List<Name> names;
1455 /** The person's nicknames. */
1456 core.List<Nickname> nicknames;
1457 /** The person's occupations. */
1458 core.List<Occupation> occupations;
1459 /** The person's past or current organizations. */
1460 core.List<Organization> organizations;
1461 /** The person's phone numbers. */
1462 core.List<PhoneNumber> phoneNumbers;
1463 /** The person's photos. */
1464 core.List<Photo> photos;
1465 /** The person's relations. */
1466 core.List<Relation> relations;
1467 /** The kind of relationship the person is looking for. */
1468 core.List<RelationshipInterest> relationshipInterests;
1469 /** The person's relationship statuses. */
1470 core.List<RelationshipStatus> relationshipStatuses;
1471 /** The person's residences. */
1472 core.List<Residence> residences;
1473 /**
1474 * The resource name for the person, assigned by the server. An ASCII string
1475 * with a max length of 27 characters. Always starts with `people/`.
1476 */
1477 core.String resourceName;
1478 /** The person's skills. */
1479 core.List<Skill> skills;
1480 /** The person's taglines. */
1481 core.List<Tagline> taglines;
1482 /** The person's associated URLs. */
1483 core.List<Url> urls;
1484
1485 Person();
1486
1487 Person.fromJson(core.Map _json) {
1488 if (_json.containsKey("addresses")) {
1489 addresses = _json["addresses"].map((value) => new Address.fromJson(value)) .toList();
1490 }
1491 if (_json.containsKey("ageRange")) {
1492 ageRange = _json["ageRange"];
1493 }
1494 if (_json.containsKey("biographies")) {
1495 biographies = _json["biographies"].map((value) => new Biography.fromJson(v alue)).toList();
1496 }
1497 if (_json.containsKey("birthdays")) {
1498 birthdays = _json["birthdays"].map((value) => new Birthday.fromJson(value) ).toList();
1499 }
1500 if (_json.containsKey("braggingRights")) {
1501 braggingRights = _json["braggingRights"].map((value) => new BraggingRights .fromJson(value)).toList();
1502 }
1503 if (_json.containsKey("coverPhotos")) {
1504 coverPhotos = _json["coverPhotos"].map((value) => new CoverPhoto.fromJson( value)).toList();
1505 }
1506 if (_json.containsKey("emailAddresses")) {
1507 emailAddresses = _json["emailAddresses"].map((value) => new EmailAddress.f romJson(value)).toList();
1508 }
1509 if (_json.containsKey("etag")) {
1510 etag = _json["etag"];
1511 }
1512 if (_json.containsKey("events")) {
1513 events = _json["events"].map((value) => new Event.fromJson(value)).toList( );
1514 }
1515 if (_json.containsKey("genders")) {
1516 genders = _json["genders"].map((value) => new Gender.fromJson(value)).toLi st();
1517 }
1518 if (_json.containsKey("imClients")) {
1519 imClients = _json["imClients"].map((value) => new ImClient.fromJson(value) ).toList();
1520 }
1521 if (_json.containsKey("interests")) {
1522 interests = _json["interests"].map((value) => new Interest.fromJson(value) ).toList();
1523 }
1524 if (_json.containsKey("locales")) {
1525 locales = _json["locales"].map((value) => new Locale.fromJson(value)).toLi st();
1526 }
1527 if (_json.containsKey("memberships")) {
1528 memberships = _json["memberships"].map((value) => new Membership.fromJson( value)).toList();
1529 }
1530 if (_json.containsKey("metadata")) {
1531 metadata = new PersonMetadata.fromJson(_json["metadata"]);
1532 }
1533 if (_json.containsKey("names")) {
1534 names = _json["names"].map((value) => new Name.fromJson(value)).toList();
1535 }
1536 if (_json.containsKey("nicknames")) {
1537 nicknames = _json["nicknames"].map((value) => new Nickname.fromJson(value) ).toList();
1538 }
1539 if (_json.containsKey("occupations")) {
1540 occupations = _json["occupations"].map((value) => new Occupation.fromJson( value)).toList();
1541 }
1542 if (_json.containsKey("organizations")) {
1543 organizations = _json["organizations"].map((value) => new Organization.fro mJson(value)).toList();
1544 }
1545 if (_json.containsKey("phoneNumbers")) {
1546 phoneNumbers = _json["phoneNumbers"].map((value) => new PhoneNumber.fromJs on(value)).toList();
1547 }
1548 if (_json.containsKey("photos")) {
1549 photos = _json["photos"].map((value) => new Photo.fromJson(value)).toList( );
1550 }
1551 if (_json.containsKey("relations")) {
1552 relations = _json["relations"].map((value) => new Relation.fromJson(value) ).toList();
1553 }
1554 if (_json.containsKey("relationshipInterests")) {
1555 relationshipInterests = _json["relationshipInterests"].map((value) => new RelationshipInterest.fromJson(value)).toList();
1556 }
1557 if (_json.containsKey("relationshipStatuses")) {
1558 relationshipStatuses = _json["relationshipStatuses"].map((value) => new Re lationshipStatus.fromJson(value)).toList();
1559 }
1560 if (_json.containsKey("residences")) {
1561 residences = _json["residences"].map((value) => new Residence.fromJson(val ue)).toList();
1562 }
1563 if (_json.containsKey("resourceName")) {
1564 resourceName = _json["resourceName"];
1565 }
1566 if (_json.containsKey("skills")) {
1567 skills = _json["skills"].map((value) => new Skill.fromJson(value)).toList( );
1568 }
1569 if (_json.containsKey("taglines")) {
1570 taglines = _json["taglines"].map((value) => new Tagline.fromJson(value)).t oList();
1571 }
1572 if (_json.containsKey("urls")) {
1573 urls = _json["urls"].map((value) => new Url.fromJson(value)).toList();
1574 }
1575 }
1576
1577 core.Map toJson() {
1578 var _json = new core.Map();
1579 if (addresses != null) {
1580 _json["addresses"] = addresses.map((value) => (value).toJson()).toList();
1581 }
1582 if (ageRange != null) {
1583 _json["ageRange"] = ageRange;
1584 }
1585 if (biographies != null) {
1586 _json["biographies"] = biographies.map((value) => (value).toJson()).toList ();
1587 }
1588 if (birthdays != null) {
1589 _json["birthdays"] = birthdays.map((value) => (value).toJson()).toList();
1590 }
1591 if (braggingRights != null) {
1592 _json["braggingRights"] = braggingRights.map((value) => (value).toJson()). toList();
1593 }
1594 if (coverPhotos != null) {
1595 _json["coverPhotos"] = coverPhotos.map((value) => (value).toJson()).toList ();
1596 }
1597 if (emailAddresses != null) {
1598 _json["emailAddresses"] = emailAddresses.map((value) => (value).toJson()). toList();
1599 }
1600 if (etag != null) {
1601 _json["etag"] = etag;
1602 }
1603 if (events != null) {
1604 _json["events"] = events.map((value) => (value).toJson()).toList();
1605 }
1606 if (genders != null) {
1607 _json["genders"] = genders.map((value) => (value).toJson()).toList();
1608 }
1609 if (imClients != null) {
1610 _json["imClients"] = imClients.map((value) => (value).toJson()).toList();
1611 }
1612 if (interests != null) {
1613 _json["interests"] = interests.map((value) => (value).toJson()).toList();
1614 }
1615 if (locales != null) {
1616 _json["locales"] = locales.map((value) => (value).toJson()).toList();
1617 }
1618 if (memberships != null) {
1619 _json["memberships"] = memberships.map((value) => (value).toJson()).toList ();
1620 }
1621 if (metadata != null) {
1622 _json["metadata"] = (metadata).toJson();
1623 }
1624 if (names != null) {
1625 _json["names"] = names.map((value) => (value).toJson()).toList();
1626 }
1627 if (nicknames != null) {
1628 _json["nicknames"] = nicknames.map((value) => (value).toJson()).toList();
1629 }
1630 if (occupations != null) {
1631 _json["occupations"] = occupations.map((value) => (value).toJson()).toList ();
1632 }
1633 if (organizations != null) {
1634 _json["organizations"] = organizations.map((value) => (value).toJson()).to List();
1635 }
1636 if (phoneNumbers != null) {
1637 _json["phoneNumbers"] = phoneNumbers.map((value) => (value).toJson()).toLi st();
1638 }
1639 if (photos != null) {
1640 _json["photos"] = photos.map((value) => (value).toJson()).toList();
1641 }
1642 if (relations != null) {
1643 _json["relations"] = relations.map((value) => (value).toJson()).toList();
1644 }
1645 if (relationshipInterests != null) {
1646 _json["relationshipInterests"] = relationshipInterests.map((value) => (val ue).toJson()).toList();
1647 }
1648 if (relationshipStatuses != null) {
1649 _json["relationshipStatuses"] = relationshipStatuses.map((value) => (value ).toJson()).toList();
1650 }
1651 if (residences != null) {
1652 _json["residences"] = residences.map((value) => (value).toJson()).toList() ;
1653 }
1654 if (resourceName != null) {
1655 _json["resourceName"] = resourceName;
1656 }
1657 if (skills != null) {
1658 _json["skills"] = skills.map((value) => (value).toJson()).toList();
1659 }
1660 if (taglines != null) {
1661 _json["taglines"] = taglines.map((value) => (value).toJson()).toList();
1662 }
1663 if (urls != null) {
1664 _json["urls"] = urls.map((value) => (value).toJson()).toList();
1665 }
1666 return _json;
1667 }
1668 }
1669
1670 /** Metadata about a person. */
1671 class PersonMetadata {
1672 /**
1673 * True if the person resource has been deleted. Populated only for
1674 * [`connections.list`](/people/api/rest/v1/people.connections/list) requests
1675 * that include a sync token.
1676 */
1677 core.bool deleted;
1678 /**
1679 * The type of the person object.
1680 * Possible string values are:
1681 * - "OBJECT_TYPE_UNSPECIFIED" : A OBJECT_TYPE_UNSPECIFIED.
1682 * - "PERSON" : A PERSON.
1683 * - "PAGE" : A PAGE.
1684 */
1685 core.String objectType;
1686 /**
1687 * Any former resource names this person has had. Populated only for
1688 * [`connections.list`](/people/api/rest/v1/people.connections/list) requests
1689 * that include a sync token. The resource name may change when adding or
1690 * removing fields that link a contact and profile such as a verified email,
1691 * verified phone number, or profile URL.
1692 */
1693 core.List<core.String> previousResourceNames;
1694 /** The sources of data for the person. */
1695 core.List<Source> sources;
1696
1697 PersonMetadata();
1698
1699 PersonMetadata.fromJson(core.Map _json) {
1700 if (_json.containsKey("deleted")) {
1701 deleted = _json["deleted"];
1702 }
1703 if (_json.containsKey("objectType")) {
1704 objectType = _json["objectType"];
1705 }
1706 if (_json.containsKey("previousResourceNames")) {
1707 previousResourceNames = _json["previousResourceNames"];
1708 }
1709 if (_json.containsKey("sources")) {
1710 sources = _json["sources"].map((value) => new Source.fromJson(value)).toLi st();
1711 }
1712 }
1713
1714 core.Map toJson() {
1715 var _json = new core.Map();
1716 if (deleted != null) {
1717 _json["deleted"] = deleted;
1718 }
1719 if (objectType != null) {
1720 _json["objectType"] = objectType;
1721 }
1722 if (previousResourceNames != null) {
1723 _json["previousResourceNames"] = previousResourceNames;
1724 }
1725 if (sources != null) {
1726 _json["sources"] = sources.map((value) => (value).toJson()).toList();
1727 }
1728 return _json;
1729 }
1730 }
1731
1732 /** The response for a single person */
1733 class PersonResponse {
1734 /**
1735 * [HTTP 1.1 status
1736 * code](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).
1737 */
1738 core.int httpStatusCode;
1739 /** The person. */
1740 Person person;
1741 /**
1742 * The original requested resource name. May be different than the resource
1743 * name on the returned person. The resource name can change when adding or
1744 * removing fields that link a contact and profile such as a verified email,
1745 * verified phone number, or a profile URL.
1746 */
1747 core.String requestedResourceName;
1748
1749 PersonResponse();
1750
1751 PersonResponse.fromJson(core.Map _json) {
1752 if (_json.containsKey("httpStatusCode")) {
1753 httpStatusCode = _json["httpStatusCode"];
1754 }
1755 if (_json.containsKey("person")) {
1756 person = new Person.fromJson(_json["person"]);
1757 }
1758 if (_json.containsKey("requestedResourceName")) {
1759 requestedResourceName = _json["requestedResourceName"];
1760 }
1761 }
1762
1763 core.Map toJson() {
1764 var _json = new core.Map();
1765 if (httpStatusCode != null) {
1766 _json["httpStatusCode"] = httpStatusCode;
1767 }
1768 if (person != null) {
1769 _json["person"] = (person).toJson();
1770 }
1771 if (requestedResourceName != null) {
1772 _json["requestedResourceName"] = requestedResourceName;
1773 }
1774 return _json;
1775 }
1776 }
1777
1778 /** A person's phone number. */
1779 class PhoneNumber {
1780 /**
1781 * The read-only canonicalized [ITU-T
1782 * E.164](https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.1.2008.pdf)
1783 * form of the phone number.
1784 */
1785 core.String canonicalForm;
1786 /**
1787 * The read-only type of the phone number translated and formatted in the
1788 * viewer's account locale or the the `Accept-Language` HTTP header locale.
1789 */
1790 core.String formattedType;
1791 /** Metadata about the phone number. */
1792 FieldMetadata metadata;
1793 /**
1794 * The type of the phone number. The type can be custom or predefined.
1795 * Possible values include, but are not limited to, the following: * `home` *
1796 * `work` * `mobile` * `homeFax` * `workFax` * `otherFax` * `pager` *
1797 * `workMobile` * `workPager` * `main` * `googleVoice` * `other`
1798 */
1799 core.String type;
1800 /** The phone number. */
1801 core.String value;
1802
1803 PhoneNumber();
1804
1805 PhoneNumber.fromJson(core.Map _json) {
1806 if (_json.containsKey("canonicalForm")) {
1807 canonicalForm = _json["canonicalForm"];
1808 }
1809 if (_json.containsKey("formattedType")) {
1810 formattedType = _json["formattedType"];
1811 }
1812 if (_json.containsKey("metadata")) {
1813 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1814 }
1815 if (_json.containsKey("type")) {
1816 type = _json["type"];
1817 }
1818 if (_json.containsKey("value")) {
1819 value = _json["value"];
1820 }
1821 }
1822
1823 core.Map toJson() {
1824 var _json = new core.Map();
1825 if (canonicalForm != null) {
1826 _json["canonicalForm"] = canonicalForm;
1827 }
1828 if (formattedType != null) {
1829 _json["formattedType"] = formattedType;
1830 }
1831 if (metadata != null) {
1832 _json["metadata"] = (metadata).toJson();
1833 }
1834 if (type != null) {
1835 _json["type"] = type;
1836 }
1837 if (value != null) {
1838 _json["value"] = value;
1839 }
1840 return _json;
1841 }
1842 }
1843
1844 /**
1845 * A person's photo. A picture shown next to the person's name to help others
1846 * recognize the person.
1847 */
1848 class Photo {
1849 /** Metadata about the photo. */
1850 FieldMetadata metadata;
1851 /** The URL of the photo. */
1852 core.String url;
1853
1854 Photo();
1855
1856 Photo.fromJson(core.Map _json) {
1857 if (_json.containsKey("metadata")) {
1858 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1859 }
1860 if (_json.containsKey("url")) {
1861 url = _json["url"];
1862 }
1863 }
1864
1865 core.Map toJson() {
1866 var _json = new core.Map();
1867 if (metadata != null) {
1868 _json["metadata"] = (metadata).toJson();
1869 }
1870 if (url != null) {
1871 _json["url"] = url;
1872 }
1873 return _json;
1874 }
1875 }
1876
1877 /** A person's relation to another person. */
1878 class Relation {
1879 /**
1880 * The type of the relation translated and formatted in the viewer's account
1881 * locale or the locale specified in the Accept-Language HTTP header.
1882 */
1883 core.String formattedType;
1884 /** Metadata about the relation. */
1885 FieldMetadata metadata;
1886 /** The name of the other person this relation refers to. */
1887 core.String person;
1888 /**
1889 * The person's relation to the other person. The type can be custom or
1890 * predefined. Possible values include, but are not limited to, the following
1891 * values: * `spouse` * `child` * `mother` * `father` * `parent` * `brother` *
1892 * `sister` * `friend` * `relative` * `domesticPartner` * `manager` *
1893 * `assistant` * `referredBy` * `partner`
1894 */
1895 core.String type;
1896
1897 Relation();
1898
1899 Relation.fromJson(core.Map _json) {
1900 if (_json.containsKey("formattedType")) {
1901 formattedType = _json["formattedType"];
1902 }
1903 if (_json.containsKey("metadata")) {
1904 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1905 }
1906 if (_json.containsKey("person")) {
1907 person = _json["person"];
1908 }
1909 if (_json.containsKey("type")) {
1910 type = _json["type"];
1911 }
1912 }
1913
1914 core.Map toJson() {
1915 var _json = new core.Map();
1916 if (formattedType != null) {
1917 _json["formattedType"] = formattedType;
1918 }
1919 if (metadata != null) {
1920 _json["metadata"] = (metadata).toJson();
1921 }
1922 if (person != null) {
1923 _json["person"] = person;
1924 }
1925 if (type != null) {
1926 _json["type"] = type;
1927 }
1928 return _json;
1929 }
1930 }
1931
1932 /** The kind of relationship the person is looking for. */
1933 class RelationshipInterest {
1934 /**
1935 * The value of the relationship interest translated and formatted in the
1936 * viewer's account locale or the locale specified in the Accept-Language HTTP
1937 * header.
1938 */
1939 core.String formattedValue;
1940 /** Metadata about the relationship interest. */
1941 FieldMetadata metadata;
1942 /**
1943 * The kind of relationship the person is looking for. The value can be custom
1944 * or predefined. Possible values include, but are not limited to, the
1945 * following values: * `friend` * `date` * `relationship` * `networking`
1946 */
1947 core.String value;
1948
1949 RelationshipInterest();
1950
1951 RelationshipInterest.fromJson(core.Map _json) {
1952 if (_json.containsKey("formattedValue")) {
1953 formattedValue = _json["formattedValue"];
1954 }
1955 if (_json.containsKey("metadata")) {
1956 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1957 }
1958 if (_json.containsKey("value")) {
1959 value = _json["value"];
1960 }
1961 }
1962
1963 core.Map toJson() {
1964 var _json = new core.Map();
1965 if (formattedValue != null) {
1966 _json["formattedValue"] = formattedValue;
1967 }
1968 if (metadata != null) {
1969 _json["metadata"] = (metadata).toJson();
1970 }
1971 if (value != null) {
1972 _json["value"] = value;
1973 }
1974 return _json;
1975 }
1976 }
1977
1978 /** A person's relationship status. */
1979 class RelationshipStatus {
1980 /**
1981 * The read-only value of the relationship status translated and formatted in
1982 * the viewer's account locale or the `Accept-Language` HTTP header locale.
1983 */
1984 core.String formattedValue;
1985 /** Metadata about the relationship status. */
1986 FieldMetadata metadata;
1987 /**
1988 * The relationship status. The value can be custom or predefined. Possible
1989 * values include, but are not limited to, the following: * `single` *
1990 * `inARelationship` * `engaged` * `married` * `itsComplicated` *
1991 * `openRelationship` * `widowed` * `inDomesticPartnership` * `inCivilUnion`
1992 */
1993 core.String value;
1994
1995 RelationshipStatus();
1996
1997 RelationshipStatus.fromJson(core.Map _json) {
1998 if (_json.containsKey("formattedValue")) {
1999 formattedValue = _json["formattedValue"];
2000 }
2001 if (_json.containsKey("metadata")) {
2002 metadata = new FieldMetadata.fromJson(_json["metadata"]);
2003 }
2004 if (_json.containsKey("value")) {
2005 value = _json["value"];
2006 }
2007 }
2008
2009 core.Map toJson() {
2010 var _json = new core.Map();
2011 if (formattedValue != null) {
2012 _json["formattedValue"] = formattedValue;
2013 }
2014 if (metadata != null) {
2015 _json["metadata"] = (metadata).toJson();
2016 }
2017 if (value != null) {
2018 _json["value"] = value;
2019 }
2020 return _json;
2021 }
2022 }
2023
2024 /** A person's past or current residence. */
2025 class Residence {
2026 /**
2027 * True if the residence is the person's current residence; false if the
2028 * residence is a past residence.
2029 */
2030 core.bool current;
2031 /** Metadata about the residence. */
2032 FieldMetadata metadata;
2033 /** The address of the residence. */
2034 core.String value;
2035
2036 Residence();
2037
2038 Residence.fromJson(core.Map _json) {
2039 if (_json.containsKey("current")) {
2040 current = _json["current"];
2041 }
2042 if (_json.containsKey("metadata")) {
2043 metadata = new FieldMetadata.fromJson(_json["metadata"]);
2044 }
2045 if (_json.containsKey("value")) {
2046 value = _json["value"];
2047 }
2048 }
2049
2050 core.Map toJson() {
2051 var _json = new core.Map();
2052 if (current != null) {
2053 _json["current"] = current;
2054 }
2055 if (metadata != null) {
2056 _json["metadata"] = (metadata).toJson();
2057 }
2058 if (value != null) {
2059 _json["value"] = value;
2060 }
2061 return _json;
2062 }
2063 }
2064
2065 /** A skill that the person has. */
2066 class Skill {
2067 /** Metadata about the skill. */
2068 FieldMetadata metadata;
2069 /** The skill; for example, `underwater basket weaving`. */
2070 core.String value;
2071
2072 Skill();
2073
2074 Skill.fromJson(core.Map _json) {
2075 if (_json.containsKey("metadata")) {
2076 metadata = new FieldMetadata.fromJson(_json["metadata"]);
2077 }
2078 if (_json.containsKey("value")) {
2079 value = _json["value"];
2080 }
2081 }
2082
2083 core.Map toJson() {
2084 var _json = new core.Map();
2085 if (metadata != null) {
2086 _json["metadata"] = (metadata).toJson();
2087 }
2088 if (value != null) {
2089 _json["value"] = value;
2090 }
2091 return _json;
2092 }
2093 }
2094
2095 /** The source of a field. */
2096 class Source {
2097 /** A unique identifier within the source type generated by the server. */
2098 core.String id;
2099 /**
2100 * The source type.
2101 * Possible string values are:
2102 * - "OTHER" : A OTHER.
2103 * - "ACCOUNT" : A ACCOUNT.
2104 * - "PROFILE" : A PROFILE.
2105 * - "DOMAIN_PROFILE" : A DOMAIN_PROFILE.
2106 * - "CONTACT" : A CONTACT.
2107 */
2108 core.String type;
2109
2110 Source();
2111
2112 Source.fromJson(core.Map _json) {
2113 if (_json.containsKey("id")) {
2114 id = _json["id"];
2115 }
2116 if (_json.containsKey("type")) {
2117 type = _json["type"];
2118 }
2119 }
2120
2121 core.Map toJson() {
2122 var _json = new core.Map();
2123 if (id != null) {
2124 _json["id"] = id;
2125 }
2126 if (type != null) {
2127 _json["type"] = type;
2128 }
2129 return _json;
2130 }
2131 }
2132
2133 /** A brief one-line description of the person. */
2134 class Tagline {
2135 /** Metadata about the tagline. */
2136 FieldMetadata metadata;
2137 /** The tagline. */
2138 core.String value;
2139
2140 Tagline();
2141
2142 Tagline.fromJson(core.Map _json) {
2143 if (_json.containsKey("metadata")) {
2144 metadata = new FieldMetadata.fromJson(_json["metadata"]);
2145 }
2146 if (_json.containsKey("value")) {
2147 value = _json["value"];
2148 }
2149 }
2150
2151 core.Map toJson() {
2152 var _json = new core.Map();
2153 if (metadata != null) {
2154 _json["metadata"] = (metadata).toJson();
2155 }
2156 if (value != null) {
2157 _json["value"] = value;
2158 }
2159 return _json;
2160 }
2161 }
2162
2163 /** A person's associated URLs. */
2164 class Url {
2165 /**
2166 * The read-only type of the URL translated and formatted in the viewer's
2167 * account locale or the `Accept-Language` HTTP header locale.
2168 */
2169 core.String formattedType;
2170 /** Metadata about the URL. */
2171 FieldMetadata metadata;
2172 /**
2173 * The type of the URL. The type can be custom or predefined. Possible values
2174 * include, but are not limited to, the following: * `home` * `work` * `blog`
2175 * * `profile` * `homePage` * `ftp` * `reservations` * `appInstallPage`:
2176 * website for a Google+ application. * `other`
2177 */
2178 core.String type;
2179 /** The URL. */
2180 core.String value;
2181
2182 Url();
2183
2184 Url.fromJson(core.Map _json) {
2185 if (_json.containsKey("formattedType")) {
2186 formattedType = _json["formattedType"];
2187 }
2188 if (_json.containsKey("metadata")) {
2189 metadata = new FieldMetadata.fromJson(_json["metadata"]);
2190 }
2191 if (_json.containsKey("type")) {
2192 type = _json["type"];
2193 }
2194 if (_json.containsKey("value")) {
2195 value = _json["value"];
2196 }
2197 }
2198
2199 core.Map toJson() {
2200 var _json = new core.Map();
2201 if (formattedType != null) {
2202 _json["formattedType"] = formattedType;
2203 }
2204 if (metadata != null) {
2205 _json["metadata"] = (metadata).toJson();
2206 }
2207 if (type != null) {
2208 _json["type"] = type;
2209 }
2210 if (value != null) {
2211 _json["value"] = value;
2212 }
2213 return _json;
2214 }
2215 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/pagespeedonline/v2.dart ('k') | generated/googleapis/lib/plus/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698