OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.people.v1; | 3 library googleapis.people.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 PeopleResourceApi get people => new PeopleResourceApi(_requester); | 49 PeopleResourceApi get people => new PeopleResourceApi(_requester); |
50 | 50 |
51 PeopleApi(http.Client client, {core.String rootUrl: "https://people.googleapis
.com/", core.String servicePath: ""}) : | 51 PeopleApi(http.Client client, {core.String rootUrl: "https://people.googleapis
.com/", core.String servicePath: ""}) : |
52 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 52 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
53 } | 53 } |
54 | 54 |
55 | 55 |
56 class PeopleResourceApi { | 56 class PeopleResourceApi { |
57 final commons.ApiRequester _requester; | 57 final commons.ApiRequester _requester; |
58 | 58 |
59 PeopleMeResourceApi get me => new PeopleMeResourceApi(_requester); | 59 PeopleConnectionsResourceApi get connections => new PeopleConnectionsResourceA
pi(_requester); |
60 | 60 |
61 PeopleResourceApi(commons.ApiRequester client) : | 61 PeopleResourceApi(commons.ApiRequester client) : |
62 _requester = client; | 62 _requester = client; |
63 | 63 |
64 /** | 64 /** |
65 * Provides information about a person resource for a resource name. Use | 65 * Provides information about a person resource for a resource name. Use |
66 * `people/me` to indicate the authenticated user. | 66 * `people/me` to indicate the authenticated user. |
67 * | 67 * |
68 * Request parameters: | 68 * Request parameters: |
69 * | 69 * |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 queryParams: _queryParams, | 170 queryParams: _queryParams, |
171 uploadOptions: _uploadOptions, | 171 uploadOptions: _uploadOptions, |
172 uploadMedia: _uploadMedia, | 172 uploadMedia: _uploadMedia, |
173 downloadOptions: _downloadOptions); | 173 downloadOptions: _downloadOptions); |
174 return _response.then((data) => new GetPeopleResponse.fromJson(data)); | 174 return _response.then((data) => new GetPeopleResponse.fromJson(data)); |
175 } | 175 } |
176 | 176 |
177 } | 177 } |
178 | 178 |
179 | 179 |
180 class PeopleMeResourceApi { | 180 class PeopleConnectionsResourceApi { |
181 final commons.ApiRequester _requester; | 181 final commons.ApiRequester _requester; |
182 | 182 |
183 PeopleMeConnectionsResourceApi get connections => new PeopleMeConnectionsResou
rceApi(_requester); | 183 PeopleConnectionsResourceApi(commons.ApiRequester client) : |
184 | |
185 PeopleMeResourceApi(commons.ApiRequester client) : | |
186 _requester = client; | |
187 } | |
188 | |
189 | |
190 class PeopleMeConnectionsResourceApi { | |
191 final commons.ApiRequester _requester; | |
192 | |
193 PeopleMeConnectionsResourceApi(commons.ApiRequester client) : | |
194 _requester = client; | 184 _requester = client; |
195 | 185 |
196 /** | 186 /** |
197 * Provides a list of the authenticated user's contacts merged with any | 187 * Provides a list of the authenticated user's contacts merged with any |
198 * linked profiles. | 188 * linked profiles. |
199 * | 189 * |
200 * Request parameters: | 190 * Request parameters: |
201 * | 191 * |
202 * [sortOrder] - The order in which the connections should be sorted. Defaults | 192 * [resourceName] - The resource name to return connections for. Only |
203 * to | 193 * `people/me` is valid. |
204 * `LAST_MODIFIED_ASCENDING`. | 194 * Value must have pattern "^people/[^/]+$". |
205 * Possible string values are: | |
206 * - "LAST_MODIFIED_ASCENDING" : A LAST_MODIFIED_ASCENDING. | |
207 * - "FIRST_NAME_ASCENDING" : A FIRST_NAME_ASCENDING. | |
208 * - "LAST_NAME_ASCENDING" : A LAST_NAME_ASCENDING. | |
209 * | 195 * |
210 * [syncToken] - A sync token, returned by a previous call to | 196 * [requestSyncToken] - Whether the response should include a sync token, |
211 * `people.connections.list`. | 197 * which can be used to get |
212 * Only resources changed since the sync token was created will be returned. | 198 * all changes since the last request. |
213 * | 199 * |
214 * [pageToken] - The token of the page to be returned. | 200 * [pageToken] - The token of the page to be returned. |
215 * | 201 * |
216 * [pageSize] - The number of connections to include in the response. Valid | |
217 * values are | |
218 * between 1 and 500, inclusive. Defaults to 100. | |
219 * | |
220 * [requestMask_includeField] - Comma-separated list of fields to be included | 202 * [requestMask_includeField] - Comma-separated list of fields to be included |
221 * in the response. Omitting | 203 * in the response. Omitting |
222 * this field will include all fields except for connections.list requests, | 204 * this field will include all fields except for connections.list requests, |
223 * which have a default mask that includes common fields like metadata, name, | 205 * which have a default mask that includes common fields like metadata, name, |
224 * photo, and profile url. | 206 * photo, and profile url. |
225 * Each path should start with `person.`: for example, `person.names` or | 207 * Each path should start with `person.`: for example, `person.names` or |
226 * `person.photos`. | 208 * `person.photos`. |
227 * | 209 * |
| 210 * [pageSize] - The number of connections to include in the response. Valid |
| 211 * values are |
| 212 * between 1 and 500, inclusive. Defaults to 100. |
| 213 * |
| 214 * [syncToken] - A sync token, returned by a previous call to |
| 215 * `people.connections.list`. |
| 216 * Only resources changed since the sync token was created will be returned. |
| 217 * |
| 218 * [sortOrder] - The order in which the connections should be sorted. Defaults |
| 219 * to |
| 220 * `LAST_MODIFIED_ASCENDING`. |
| 221 * Possible string values are: |
| 222 * - "LAST_MODIFIED_ASCENDING" : A LAST_MODIFIED_ASCENDING. |
| 223 * - "FIRST_NAME_ASCENDING" : A FIRST_NAME_ASCENDING. |
| 224 * - "LAST_NAME_ASCENDING" : A LAST_NAME_ASCENDING. |
| 225 * |
228 * Completes with a [ListConnectionsResponse]. | 226 * Completes with a [ListConnectionsResponse]. |
229 * | 227 * |
230 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 228 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
231 * error. | 229 * error. |
232 * | 230 * |
233 * If the used [http.Client] completes with an error when making a REST call, | 231 * If the used [http.Client] completes with an error when making a REST call, |
234 * this method will complete with the same error. | 232 * this method will complete with the same error. |
235 */ | 233 */ |
236 async.Future<ListConnectionsResponse> list({core.String sortOrder, core.String
syncToken, core.String pageToken, core.int pageSize, core.String requestMask_in
cludeField}) { | 234 async.Future<ListConnectionsResponse> list(core.String resourceName, {core.boo
l requestSyncToken, core.String pageToken, core.String requestMask_includeField,
core.int pageSize, core.String syncToken, core.String sortOrder}) { |
237 var _url = null; | 235 var _url = null; |
238 var _queryParams = new core.Map(); | 236 var _queryParams = new core.Map(); |
239 var _uploadMedia = null; | 237 var _uploadMedia = null; |
240 var _uploadOptions = null; | 238 var _uploadOptions = null; |
241 var _downloadOptions = commons.DownloadOptions.Metadata; | 239 var _downloadOptions = commons.DownloadOptions.Metadata; |
242 var _body = null; | 240 var _body = null; |
243 | 241 |
244 if (sortOrder != null) { | 242 if (resourceName == null) { |
245 _queryParams["sortOrder"] = [sortOrder]; | 243 throw new core.ArgumentError("Parameter resourceName is required."); |
| 244 } |
| 245 if (requestSyncToken != null) { |
| 246 _queryParams["requestSyncToken"] = ["${requestSyncToken}"]; |
| 247 } |
| 248 if (pageToken != null) { |
| 249 _queryParams["pageToken"] = [pageToken]; |
| 250 } |
| 251 if (requestMask_includeField != null) { |
| 252 _queryParams["requestMask.includeField"] = [requestMask_includeField]; |
| 253 } |
| 254 if (pageSize != null) { |
| 255 _queryParams["pageSize"] = ["${pageSize}"]; |
246 } | 256 } |
247 if (syncToken != null) { | 257 if (syncToken != null) { |
248 _queryParams["syncToken"] = [syncToken]; | 258 _queryParams["syncToken"] = [syncToken]; |
249 } | 259 } |
250 if (pageToken != null) { | 260 if (sortOrder != null) { |
251 _queryParams["pageToken"] = [pageToken]; | 261 _queryParams["sortOrder"] = [sortOrder]; |
252 } | |
253 if (pageSize != null) { | |
254 _queryParams["pageSize"] = ["${pageSize}"]; | |
255 } | |
256 if (requestMask_includeField != null) { | |
257 _queryParams["requestMask.includeField"] = [requestMask_includeField]; | |
258 } | 262 } |
259 | 263 |
260 _url = 'v1/people/me/connections'; | 264 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName') + '/co
nnections'; |
261 | 265 |
262 var _response = _requester.request(_url, | 266 var _response = _requester.request(_url, |
263 "GET", | 267 "GET", |
264 body: _body, | 268 body: _body, |
265 queryParams: _queryParams, | 269 queryParams: _queryParams, |
266 uploadOptions: _uploadOptions, | 270 uploadOptions: _uploadOptions, |
267 uploadMedia: _uploadMedia, | 271 uploadMedia: _uploadMedia, |
268 downloadOptions: _downloadOptions); | 272 downloadOptions: _downloadOptions); |
269 return _response.then((data) => new ListConnectionsResponse.fromJson(data)); | 273 return _response.then((data) => new ListConnectionsResponse.fromJson(data)); |
270 } | 274 } |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 if (streetAddress != null) { | 401 if (streetAddress != null) { |
398 _json["streetAddress"] = streetAddress; | 402 _json["streetAddress"] = streetAddress; |
399 } | 403 } |
400 if (type != null) { | 404 if (type != null) { |
401 _json["type"] = type; | 405 _json["type"] = type; |
402 } | 406 } |
403 return _json; | 407 return _json; |
404 } | 408 } |
405 } | 409 } |
406 | 410 |
| 411 /** A person's age range. */ |
| 412 class AgeRangeType { |
| 413 /** |
| 414 * The age range. |
| 415 * Possible string values are: |
| 416 * - "AGE_RANGE_UNSPECIFIED" : Unspecified. |
| 417 * - "LESS_THAN_EIGHTEEN" : Younger than eighteen. |
| 418 * - "EIGHTEEN_TO_TWENTY" : Between eighteen and twenty. |
| 419 * - "TWENTY_ONE_OR_OLDER" : Twenty-one and older. |
| 420 */ |
| 421 core.String ageRange; |
| 422 /** Metadata about the age range. */ |
| 423 FieldMetadata metadata; |
| 424 |
| 425 AgeRangeType(); |
| 426 |
| 427 AgeRangeType.fromJson(core.Map _json) { |
| 428 if (_json.containsKey("ageRange")) { |
| 429 ageRange = _json["ageRange"]; |
| 430 } |
| 431 if (_json.containsKey("metadata")) { |
| 432 metadata = new FieldMetadata.fromJson(_json["metadata"]); |
| 433 } |
| 434 } |
| 435 |
| 436 core.Map toJson() { |
| 437 var _json = new core.Map(); |
| 438 if (ageRange != null) { |
| 439 _json["ageRange"] = ageRange; |
| 440 } |
| 441 if (metadata != null) { |
| 442 _json["metadata"] = (metadata).toJson(); |
| 443 } |
| 444 return _json; |
| 445 } |
| 446 } |
| 447 |
407 /** A person's short biography. */ | 448 /** A person's short biography. */ |
408 class Biography { | 449 class Biography { |
409 /** | 450 /** |
410 * The content type of the biography. | 451 * The content type of the biography. |
411 * Possible string values are: | 452 * Possible string values are: |
412 * - "CONTENT_TYPE_UNSPECIFIED" : Unspecified. | 453 * - "CONTENT_TYPE_UNSPECIFIED" : Unspecified. |
413 * - "TEXT_PLAIN" : Plain text. | 454 * - "TEXT_PLAIN" : Plain text. |
414 * - "TEXT_HTML" : HTML text. | 455 * - "TEXT_HTML" : HTML text. |
415 */ | 456 */ |
416 core.String contentType; | 457 core.String contentType; |
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1490 } | 1531 } |
1491 | 1532 |
1492 /** | 1533 /** |
1493 * Information about a person merged from various data sources such as the | 1534 * Information about a person merged from various data sources such as the |
1494 * authenticated user's contacts and profile data. Fields other than IDs, | 1535 * authenticated user's contacts and profile data. Fields other than IDs, |
1495 * metadata, and group memberships are user-edited. | 1536 * metadata, and group memberships are user-edited. |
1496 * | 1537 * |
1497 * Most fields can have multiple items. The items in a field have no guaranteed | 1538 * Most fields can have multiple items. The items in a field have no guaranteed |
1498 * order, but each non-empty field is guaranteed to have exactly one field with | 1539 * order, but each non-empty field is guaranteed to have exactly one field with |
1499 * `metadata.primary` set to true. | 1540 * `metadata.primary` set to true. |
| 1541 * NEXT_ID: 31 |
1500 */ | 1542 */ |
1501 class Person { | 1543 class Person { |
1502 /** The person's street addresses. */ | 1544 /** The person's street addresses. */ |
1503 core.List<Address> addresses; | 1545 core.List<Address> addresses; |
1504 /** | 1546 /** |
1505 * The person's age range. | 1547 * DEPRECATED(Please read person.age_ranges instead). The person's age range. |
1506 * Possible string values are: | 1548 * Possible string values are: |
1507 * - "AGE_RANGE_UNSPECIFIED" : Unspecified. | 1549 * - "AGE_RANGE_UNSPECIFIED" : Unspecified. |
1508 * - "LESS_THAN_EIGHTEEN" : Younger than eighteen. | 1550 * - "LESS_THAN_EIGHTEEN" : Younger than eighteen. |
1509 * - "EIGHTEEN_TO_TWENTY" : Between eighteen and twenty. | 1551 * - "EIGHTEEN_TO_TWENTY" : Between eighteen and twenty. |
1510 * - "TWENTY_ONE_OR_OLDER" : Twenty-one and older. | 1552 * - "TWENTY_ONE_OR_OLDER" : Twenty-one and older. |
1511 */ | 1553 */ |
1512 core.String ageRange; | 1554 core.String ageRange; |
| 1555 /** The person's age ranges. */ |
| 1556 core.List<AgeRangeType> ageRanges; |
1513 /** The person's biographies. */ | 1557 /** The person's biographies. */ |
1514 core.List<Biography> biographies; | 1558 core.List<Biography> biographies; |
1515 /** The person's birthdays. */ | 1559 /** The person's birthdays. */ |
1516 core.List<Birthday> birthdays; | 1560 core.List<Birthday> birthdays; |
1517 /** The person's bragging rights. */ | 1561 /** The person's bragging rights. */ |
1518 core.List<BraggingRights> braggingRights; | 1562 core.List<BraggingRights> braggingRights; |
1519 /** The person's cover photos. */ | 1563 /** The person's cover photos. */ |
1520 core.List<CoverPhoto> coverPhotos; | 1564 core.List<CoverPhoto> coverPhotos; |
1521 /** The person's email addresses. */ | 1565 /** The person's email addresses. */ |
1522 core.List<EmailAddress> emailAddresses; | 1566 core.List<EmailAddress> emailAddresses; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1573 | 1617 |
1574 Person(); | 1618 Person(); |
1575 | 1619 |
1576 Person.fromJson(core.Map _json) { | 1620 Person.fromJson(core.Map _json) { |
1577 if (_json.containsKey("addresses")) { | 1621 if (_json.containsKey("addresses")) { |
1578 addresses = _json["addresses"].map((value) => new Address.fromJson(value))
.toList(); | 1622 addresses = _json["addresses"].map((value) => new Address.fromJson(value))
.toList(); |
1579 } | 1623 } |
1580 if (_json.containsKey("ageRange")) { | 1624 if (_json.containsKey("ageRange")) { |
1581 ageRange = _json["ageRange"]; | 1625 ageRange = _json["ageRange"]; |
1582 } | 1626 } |
| 1627 if (_json.containsKey("ageRanges")) { |
| 1628 ageRanges = _json["ageRanges"].map((value) => new AgeRangeType.fromJson(va
lue)).toList(); |
| 1629 } |
1583 if (_json.containsKey("biographies")) { | 1630 if (_json.containsKey("biographies")) { |
1584 biographies = _json["biographies"].map((value) => new Biography.fromJson(v
alue)).toList(); | 1631 biographies = _json["biographies"].map((value) => new Biography.fromJson(v
alue)).toList(); |
1585 } | 1632 } |
1586 if (_json.containsKey("birthdays")) { | 1633 if (_json.containsKey("birthdays")) { |
1587 birthdays = _json["birthdays"].map((value) => new Birthday.fromJson(value)
).toList(); | 1634 birthdays = _json["birthdays"].map((value) => new Birthday.fromJson(value)
).toList(); |
1588 } | 1635 } |
1589 if (_json.containsKey("braggingRights")) { | 1636 if (_json.containsKey("braggingRights")) { |
1590 braggingRights = _json["braggingRights"].map((value) => new BraggingRights
.fromJson(value)).toList(); | 1637 braggingRights = _json["braggingRights"].map((value) => new BraggingRights
.fromJson(value)).toList(); |
1591 } | 1638 } |
1592 if (_json.containsKey("coverPhotos")) { | 1639 if (_json.containsKey("coverPhotos")) { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 } | 1711 } |
1665 | 1712 |
1666 core.Map toJson() { | 1713 core.Map toJson() { |
1667 var _json = new core.Map(); | 1714 var _json = new core.Map(); |
1668 if (addresses != null) { | 1715 if (addresses != null) { |
1669 _json["addresses"] = addresses.map((value) => (value).toJson()).toList(); | 1716 _json["addresses"] = addresses.map((value) => (value).toJson()).toList(); |
1670 } | 1717 } |
1671 if (ageRange != null) { | 1718 if (ageRange != null) { |
1672 _json["ageRange"] = ageRange; | 1719 _json["ageRange"] = ageRange; |
1673 } | 1720 } |
| 1721 if (ageRanges != null) { |
| 1722 _json["ageRanges"] = ageRanges.map((value) => (value).toJson()).toList(); |
| 1723 } |
1674 if (biographies != null) { | 1724 if (biographies != null) { |
1675 _json["biographies"] = biographies.map((value) => (value).toJson()).toList
(); | 1725 _json["biographies"] = biographies.map((value) => (value).toJson()).toList
(); |
1676 } | 1726 } |
1677 if (birthdays != null) { | 1727 if (birthdays != null) { |
1678 _json["birthdays"] = birthdays.map((value) => (value).toJson()).toList(); | 1728 _json["birthdays"] = birthdays.map((value) => (value).toJson()).toList(); |
1679 } | 1729 } |
1680 if (braggingRights != null) { | 1730 if (braggingRights != null) { |
1681 _json["braggingRights"] = braggingRights.map((value) => (value).toJson()).
toList(); | 1731 _json["braggingRights"] = braggingRights.map((value) => (value).toJson()).
toList(); |
1682 } | 1732 } |
1683 if (coverPhotos != null) { | 1733 if (coverPhotos != null) { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1760 class PersonMetadata { | 1810 class PersonMetadata { |
1761 /** | 1811 /** |
1762 * True if the person resource has been deleted. Populated only for | 1812 * True if the person resource has been deleted. Populated only for |
1763 * [`connections.list`](/people/api/rest/v1/people.connections/list) requests | 1813 * [`connections.list`](/people/api/rest/v1/people.connections/list) requests |
1764 * that include a sync token. | 1814 * that include a sync token. |
1765 */ | 1815 */ |
1766 core.bool deleted; | 1816 core.bool deleted; |
1767 /** Resource names of people linked to this resource. */ | 1817 /** Resource names of people linked to this resource. */ |
1768 core.List<core.String> linkedPeopleResourceNames; | 1818 core.List<core.String> linkedPeopleResourceNames; |
1769 /** | 1819 /** |
| 1820 * DEPRECATED(Please read person.metadata.sources.profile_metadata instead). |
1770 * The type of the person object. | 1821 * The type of the person object. |
1771 * Possible string values are: | 1822 * Possible string values are: |
1772 * - "OBJECT_TYPE_UNSPECIFIED" : Unspecified. | 1823 * - "OBJECT_TYPE_UNSPECIFIED" : Unspecified. |
1773 * - "PERSON" : Person. | 1824 * - "PERSON" : Person. |
1774 * - "PAGE" : [Google+ Page.](http://www.google.com/+/brands/) | 1825 * - "PAGE" : [Google+ Page.](http://www.google.com/+/brands/) |
1775 */ | 1826 */ |
1776 core.String objectType; | 1827 core.String objectType; |
1777 /** | 1828 /** |
1778 * Any former resource names this person has had. Populated only for | 1829 * Any former resource names this person has had. Populated only for |
1779 * [`connections.list`](/people/api/rest/v1/people.connections/list) requests | 1830 * [`connections.list`](/people/api/rest/v1/people.connections/list) requests |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1979 if (metadata != null) { | 2030 if (metadata != null) { |
1980 _json["metadata"] = (metadata).toJson(); | 2031 _json["metadata"] = (metadata).toJson(); |
1981 } | 2032 } |
1982 if (url != null) { | 2033 if (url != null) { |
1983 _json["url"] = url; | 2034 _json["url"] = url; |
1984 } | 2035 } |
1985 return _json; | 2036 return _json; |
1986 } | 2037 } |
1987 } | 2038 } |
1988 | 2039 |
| 2040 /** The read-only metadata about a profile. */ |
| 2041 class ProfileMetadata { |
| 2042 /** |
| 2043 * The profile object type. |
| 2044 * Possible string values are: |
| 2045 * - "OBJECT_TYPE_UNSPECIFIED" : Unspecified. |
| 2046 * - "PERSON" : Person. |
| 2047 * - "PAGE" : [Google+ Page.](http://www.google.com/+/brands/) |
| 2048 */ |
| 2049 core.String objectType; |
| 2050 |
| 2051 ProfileMetadata(); |
| 2052 |
| 2053 ProfileMetadata.fromJson(core.Map _json) { |
| 2054 if (_json.containsKey("objectType")) { |
| 2055 objectType = _json["objectType"]; |
| 2056 } |
| 2057 } |
| 2058 |
| 2059 core.Map toJson() { |
| 2060 var _json = new core.Map(); |
| 2061 if (objectType != null) { |
| 2062 _json["objectType"] = objectType; |
| 2063 } |
| 2064 return _json; |
| 2065 } |
| 2066 } |
| 2067 |
1989 /** A person's relation to another person. */ | 2068 /** A person's relation to another person. */ |
1990 class Relation { | 2069 class Relation { |
1991 /** | 2070 /** |
1992 * The type of the relation translated and formatted in the viewer's account | 2071 * The type of the relation translated and formatted in the viewer's account |
1993 * locale or the locale specified in the Accept-Language HTTP header. | 2072 * locale or the locale specified in the Accept-Language HTTP header. |
1994 */ | 2073 */ |
1995 core.String formattedType; | 2074 core.String formattedType; |
1996 /** Metadata about the relation. */ | 2075 /** Metadata about the relation. */ |
1997 FieldMetadata metadata; | 2076 FieldMetadata metadata; |
1998 /** The name of the other person this relation refers to. */ | 2077 /** The name of the other person this relation refers to. */ |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2233 /** The source of a field. */ | 2312 /** The source of a field. */ |
2234 class Source { | 2313 class Source { |
2235 /** | 2314 /** |
2236 * The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the | 2315 * The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the |
2237 * source. Used for web cache validation. Only populated in | 2316 * source. Used for web cache validation. Only populated in |
2238 * person.metadata.sources. | 2317 * person.metadata.sources. |
2239 */ | 2318 */ |
2240 core.String etag; | 2319 core.String etag; |
2241 /** The unique identifier within the source type generated by the server. */ | 2320 /** The unique identifier within the source type generated by the server. */ |
2242 core.String id; | 2321 core.String id; |
2243 /** | 2322 /** Metadata about a source of type PROFILE. */ |
2244 * The resource name of the source. Only set if there is a separate | 2323 ProfileMetadata profileMetadata; |
2245 * resource endpoint. | |
2246 */ | |
2247 core.String resourceName; | |
2248 /** | 2324 /** |
2249 * The source type. | 2325 * The source type. |
2250 * Possible string values are: | 2326 * Possible string values are: |
2251 * - "SOURCE_TYPE_UNSPECIFIED" : Unspecified. | 2327 * - "SOURCE_TYPE_UNSPECIFIED" : Unspecified. |
2252 * - "ACCOUNT" : [Google Account](https://accounts.google.com). | 2328 * - "ACCOUNT" : [Google Account](https://accounts.google.com). |
2253 * - "PROFILE" : [Google profile](https://profiles.google.com). You can view | 2329 * - "PROFILE" : [Google profile](https://profiles.google.com). You can view |
2254 * the | 2330 * the |
2255 * profile at https://profiles.google.com/<id> where <id> is the source | 2331 * profile at https://profiles.google.com/<id> where <id> is the source |
2256 * id. | 2332 * id. |
2257 * - "DOMAIN_PROFILE" : [Google Apps domain | 2333 * - "DOMAIN_PROFILE" : [Google Apps domain |
2258 * profile](https://admin.google.com). | 2334 * profile](https://admin.google.com). |
2259 * - "CONTACT" : [Google contact](https://contacts.google.com). You can view | 2335 * - "CONTACT" : [Google contact](https://contacts.google.com). You can view |
2260 * the | 2336 * the |
2261 * contact at https://contact.google.com/<id> where <id> is the source | 2337 * contact at https://contact.google.com/<id> where <id> is the source |
2262 * id. | 2338 * id. |
2263 */ | 2339 */ |
2264 core.String type; | 2340 core.String type; |
2265 | 2341 |
2266 Source(); | 2342 Source(); |
2267 | 2343 |
2268 Source.fromJson(core.Map _json) { | 2344 Source.fromJson(core.Map _json) { |
2269 if (_json.containsKey("etag")) { | 2345 if (_json.containsKey("etag")) { |
2270 etag = _json["etag"]; | 2346 etag = _json["etag"]; |
2271 } | 2347 } |
2272 if (_json.containsKey("id")) { | 2348 if (_json.containsKey("id")) { |
2273 id = _json["id"]; | 2349 id = _json["id"]; |
2274 } | 2350 } |
2275 if (_json.containsKey("resourceName")) { | 2351 if (_json.containsKey("profileMetadata")) { |
2276 resourceName = _json["resourceName"]; | 2352 profileMetadata = new ProfileMetadata.fromJson(_json["profileMetadata"]); |
2277 } | 2353 } |
2278 if (_json.containsKey("type")) { | 2354 if (_json.containsKey("type")) { |
2279 type = _json["type"]; | 2355 type = _json["type"]; |
2280 } | 2356 } |
2281 } | 2357 } |
2282 | 2358 |
2283 core.Map toJson() { | 2359 core.Map toJson() { |
2284 var _json = new core.Map(); | 2360 var _json = new core.Map(); |
2285 if (etag != null) { | 2361 if (etag != null) { |
2286 _json["etag"] = etag; | 2362 _json["etag"] = etag; |
2287 } | 2363 } |
2288 if (id != null) { | 2364 if (id != null) { |
2289 _json["id"] = id; | 2365 _json["id"] = id; |
2290 } | 2366 } |
2291 if (resourceName != null) { | 2367 if (profileMetadata != null) { |
2292 _json["resourceName"] = resourceName; | 2368 _json["profileMetadata"] = (profileMetadata).toJson(); |
2293 } | 2369 } |
2294 if (type != null) { | 2370 if (type != null) { |
2295 _json["type"] = type; | 2371 _json["type"] = type; |
2296 } | 2372 } |
2297 return _json; | 2373 return _json; |
2298 } | 2374 } |
2299 } | 2375 } |
2300 | 2376 |
2301 /** A read-only brief one-line description of the person. */ | 2377 /** A read-only brief one-line description of the person. */ |
2302 class Tagline { | 2378 class Tagline { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2382 } | 2458 } |
2383 if (type != null) { | 2459 if (type != null) { |
2384 _json["type"] = type; | 2460 _json["type"] = type; |
2385 } | 2461 } |
2386 if (value != null) { | 2462 if (value != null) { |
2387 _json["value"] = value; | 2463 _json["value"] = value; |
2388 } | 2464 } |
2389 return _json; | 2465 return _json; |
2390 } | 2466 } |
2391 } | 2467 } |
OLD | NEW |