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 28 matching lines...) Expand all Loading... |
39 | 39 |
40 /** View your email address */ | 40 /** View your email address */ |
41 static const UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.em
ail"; | 41 static const UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.em
ail"; |
42 | 42 |
43 /** View your basic profile info */ | 43 /** View your basic profile info */ |
44 static const UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo.
profile"; | 44 static const UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo.
profile"; |
45 | 45 |
46 | 46 |
47 final commons.ApiRequester _requester; | 47 final commons.ApiRequester _requester; |
48 | 48 |
| 49 ContactGroupsResourceApi get contactGroups => new ContactGroupsResourceApi(_re
quester); |
49 PeopleResourceApi get people => new PeopleResourceApi(_requester); | 50 PeopleResourceApi get people => new PeopleResourceApi(_requester); |
50 | 51 |
51 PeopleApi(http.Client client, {core.String rootUrl: "https://people.googleapis
.com/", core.String servicePath: ""}) : | 52 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); | 53 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
53 } | 54 } |
54 | 55 |
55 | 56 |
| 57 class ContactGroupsResourceApi { |
| 58 final commons.ApiRequester _requester; |
| 59 |
| 60 ContactGroupsMembersResourceApi get members => new ContactGroupsMembersResourc
eApi(_requester); |
| 61 |
| 62 ContactGroupsResourceApi(commons.ApiRequester client) : |
| 63 _requester = client; |
| 64 |
| 65 /** |
| 66 * Get a list of contact groups owned by the authenticated user by specifying |
| 67 * a list of contact group resource names. |
| 68 * |
| 69 * Request parameters: |
| 70 * |
| 71 * [maxMembers] - Specifies the maximum number of members to return for each |
| 72 * group. |
| 73 * |
| 74 * [resourceNames] - The resource names of the contact groups to get. |
| 75 * |
| 76 * Completes with a [BatchGetContactGroupsResponse]. |
| 77 * |
| 78 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 79 * error. |
| 80 * |
| 81 * If the used [http.Client] completes with an error when making a REST call, |
| 82 * this method will complete with the same error. |
| 83 */ |
| 84 async.Future<BatchGetContactGroupsResponse> batchGet({core.int maxMembers, cor
e.List<core.String> resourceNames}) { |
| 85 var _url = null; |
| 86 var _queryParams = new core.Map(); |
| 87 var _uploadMedia = null; |
| 88 var _uploadOptions = null; |
| 89 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 90 var _body = null; |
| 91 |
| 92 if (maxMembers != null) { |
| 93 _queryParams["maxMembers"] = ["${maxMembers}"]; |
| 94 } |
| 95 if (resourceNames != null) { |
| 96 _queryParams["resourceNames"] = resourceNames; |
| 97 } |
| 98 |
| 99 _url = 'v1/contactGroups:batchGet'; |
| 100 |
| 101 var _response = _requester.request(_url, |
| 102 "GET", |
| 103 body: _body, |
| 104 queryParams: _queryParams, |
| 105 uploadOptions: _uploadOptions, |
| 106 uploadMedia: _uploadMedia, |
| 107 downloadOptions: _downloadOptions); |
| 108 return _response.then((data) => new BatchGetContactGroupsResponse.fromJson(d
ata)); |
| 109 } |
| 110 |
| 111 /** |
| 112 * Create a new contact group owned by the authenticated user. |
| 113 * |
| 114 * [request] - The metadata request object. |
| 115 * |
| 116 * Request parameters: |
| 117 * |
| 118 * Completes with a [ContactGroup]. |
| 119 * |
| 120 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 121 * error. |
| 122 * |
| 123 * If the used [http.Client] completes with an error when making a REST call, |
| 124 * this method will complete with the same error. |
| 125 */ |
| 126 async.Future<ContactGroup> create(CreateContactGroupRequest request) { |
| 127 var _url = null; |
| 128 var _queryParams = new core.Map(); |
| 129 var _uploadMedia = null; |
| 130 var _uploadOptions = null; |
| 131 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 132 var _body = null; |
| 133 |
| 134 if (request != null) { |
| 135 _body = convert.JSON.encode((request).toJson()); |
| 136 } |
| 137 |
| 138 _url = 'v1/contactGroups'; |
| 139 |
| 140 var _response = _requester.request(_url, |
| 141 "POST", |
| 142 body: _body, |
| 143 queryParams: _queryParams, |
| 144 uploadOptions: _uploadOptions, |
| 145 uploadMedia: _uploadMedia, |
| 146 downloadOptions: _downloadOptions); |
| 147 return _response.then((data) => new ContactGroup.fromJson(data)); |
| 148 } |
| 149 |
| 150 /** |
| 151 * Delete an existing contact group owned by the authenticated user by |
| 152 * specifying a contact group resource name. |
| 153 * |
| 154 * Request parameters: |
| 155 * |
| 156 * [resourceName] - The resource name of the contact group to delete. |
| 157 * Value must have pattern "^contactGroups/[^/]+$". |
| 158 * |
| 159 * [deleteContacts] - Set to true to also delete the contacts in the specified |
| 160 * group. |
| 161 * |
| 162 * Completes with a [Empty]. |
| 163 * |
| 164 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 165 * error. |
| 166 * |
| 167 * If the used [http.Client] completes with an error when making a REST call, |
| 168 * this method will complete with the same error. |
| 169 */ |
| 170 async.Future<Empty> delete(core.String resourceName, {core.bool deleteContacts
}) { |
| 171 var _url = null; |
| 172 var _queryParams = new core.Map(); |
| 173 var _uploadMedia = null; |
| 174 var _uploadOptions = null; |
| 175 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 176 var _body = null; |
| 177 |
| 178 if (resourceName == null) { |
| 179 throw new core.ArgumentError("Parameter resourceName is required."); |
| 180 } |
| 181 if (deleteContacts != null) { |
| 182 _queryParams["deleteContacts"] = ["${deleteContacts}"]; |
| 183 } |
| 184 |
| 185 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName'); |
| 186 |
| 187 var _response = _requester.request(_url, |
| 188 "DELETE", |
| 189 body: _body, |
| 190 queryParams: _queryParams, |
| 191 uploadOptions: _uploadOptions, |
| 192 uploadMedia: _uploadMedia, |
| 193 downloadOptions: _downloadOptions); |
| 194 return _response.then((data) => new Empty.fromJson(data)); |
| 195 } |
| 196 |
| 197 /** |
| 198 * Get a specific contact group owned by the authenticated user by specifying |
| 199 * a contact group resource name. |
| 200 * |
| 201 * Request parameters: |
| 202 * |
| 203 * [resourceName] - The resource name of the contact group to get. |
| 204 * Value must have pattern "^contactGroups/[^/]+$". |
| 205 * |
| 206 * [maxMembers] - Specifies the maximum number of members to return. |
| 207 * |
| 208 * Completes with a [ContactGroup]. |
| 209 * |
| 210 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 211 * error. |
| 212 * |
| 213 * If the used [http.Client] completes with an error when making a REST call, |
| 214 * this method will complete with the same error. |
| 215 */ |
| 216 async.Future<ContactGroup> get(core.String resourceName, {core.int maxMembers}
) { |
| 217 var _url = null; |
| 218 var _queryParams = new core.Map(); |
| 219 var _uploadMedia = null; |
| 220 var _uploadOptions = null; |
| 221 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 222 var _body = null; |
| 223 |
| 224 if (resourceName == null) { |
| 225 throw new core.ArgumentError("Parameter resourceName is required."); |
| 226 } |
| 227 if (maxMembers != null) { |
| 228 _queryParams["maxMembers"] = ["${maxMembers}"]; |
| 229 } |
| 230 |
| 231 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName'); |
| 232 |
| 233 var _response = _requester.request(_url, |
| 234 "GET", |
| 235 body: _body, |
| 236 queryParams: _queryParams, |
| 237 uploadOptions: _uploadOptions, |
| 238 uploadMedia: _uploadMedia, |
| 239 downloadOptions: _downloadOptions); |
| 240 return _response.then((data) => new ContactGroup.fromJson(data)); |
| 241 } |
| 242 |
| 243 /** |
| 244 * List all contact groups owned by the authenticated user. Members of the |
| 245 * contact groups are not populated. |
| 246 * |
| 247 * Request parameters: |
| 248 * |
| 249 * [syncToken] - A sync token, returned by a previous call to |
| 250 * `contactgroups.list`. |
| 251 * Only resources changed since the sync token was created will be returned. |
| 252 * |
| 253 * [pageToken] - The next_page_token value returned from a previous call to |
| 254 * [ListContactGroups](/people/api/rest/v1/contactgroups/list). |
| 255 * Requests the next page of resources. |
| 256 * |
| 257 * [pageSize] - The maximum number of resources to return. |
| 258 * |
| 259 * Completes with a [ListContactGroupsResponse]. |
| 260 * |
| 261 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 262 * error. |
| 263 * |
| 264 * If the used [http.Client] completes with an error when making a REST call, |
| 265 * this method will complete with the same error. |
| 266 */ |
| 267 async.Future<ListContactGroupsResponse> list({core.String syncToken, core.Stri
ng pageToken, core.int pageSize}) { |
| 268 var _url = null; |
| 269 var _queryParams = new core.Map(); |
| 270 var _uploadMedia = null; |
| 271 var _uploadOptions = null; |
| 272 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 273 var _body = null; |
| 274 |
| 275 if (syncToken != null) { |
| 276 _queryParams["syncToken"] = [syncToken]; |
| 277 } |
| 278 if (pageToken != null) { |
| 279 _queryParams["pageToken"] = [pageToken]; |
| 280 } |
| 281 if (pageSize != null) { |
| 282 _queryParams["pageSize"] = ["${pageSize}"]; |
| 283 } |
| 284 |
| 285 _url = 'v1/contactGroups'; |
| 286 |
| 287 var _response = _requester.request(_url, |
| 288 "GET", |
| 289 body: _body, |
| 290 queryParams: _queryParams, |
| 291 uploadOptions: _uploadOptions, |
| 292 uploadMedia: _uploadMedia, |
| 293 downloadOptions: _downloadOptions); |
| 294 return _response.then((data) => new ListContactGroupsResponse.fromJson(data)
); |
| 295 } |
| 296 |
| 297 /** |
| 298 * Update the name of an existing contact group owned by the authenticated |
| 299 * user. |
| 300 * |
| 301 * [request] - The metadata request object. |
| 302 * |
| 303 * Request parameters: |
| 304 * |
| 305 * [resourceName] - The resource name for the contact group, assigned by the |
| 306 * server. An ASCII |
| 307 * string, in the form of `contactGroups/<contact_group_id>`. |
| 308 * Value must have pattern "^contactGroups/[^/]+$". |
| 309 * |
| 310 * Completes with a [ContactGroup]. |
| 311 * |
| 312 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 313 * error. |
| 314 * |
| 315 * If the used [http.Client] completes with an error when making a REST call, |
| 316 * this method will complete with the same error. |
| 317 */ |
| 318 async.Future<ContactGroup> update(UpdateContactGroupRequest request, core.Stri
ng resourceName) { |
| 319 var _url = null; |
| 320 var _queryParams = new core.Map(); |
| 321 var _uploadMedia = null; |
| 322 var _uploadOptions = null; |
| 323 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 324 var _body = null; |
| 325 |
| 326 if (request != null) { |
| 327 _body = convert.JSON.encode((request).toJson()); |
| 328 } |
| 329 if (resourceName == null) { |
| 330 throw new core.ArgumentError("Parameter resourceName is required."); |
| 331 } |
| 332 |
| 333 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName'); |
| 334 |
| 335 var _response = _requester.request(_url, |
| 336 "PUT", |
| 337 body: _body, |
| 338 queryParams: _queryParams, |
| 339 uploadOptions: _uploadOptions, |
| 340 uploadMedia: _uploadMedia, |
| 341 downloadOptions: _downloadOptions); |
| 342 return _response.then((data) => new ContactGroup.fromJson(data)); |
| 343 } |
| 344 |
| 345 } |
| 346 |
| 347 |
| 348 class ContactGroupsMembersResourceApi { |
| 349 final commons.ApiRequester _requester; |
| 350 |
| 351 ContactGroupsMembersResourceApi(commons.ApiRequester client) : |
| 352 _requester = client; |
| 353 |
| 354 /** |
| 355 * Modify the members of a contact group owned by the authenticated user. |
| 356 * |
| 357 * [request] - The metadata request object. |
| 358 * |
| 359 * Request parameters: |
| 360 * |
| 361 * [resourceName] - The resource name of the contact group to modify. |
| 362 * Value must have pattern "^contactGroups/[^/]+$". |
| 363 * |
| 364 * Completes with a [ModifyContactGroupMembersResponse]. |
| 365 * |
| 366 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 367 * error. |
| 368 * |
| 369 * If the used [http.Client] completes with an error when making a REST call, |
| 370 * this method will complete with the same error. |
| 371 */ |
| 372 async.Future<ModifyContactGroupMembersResponse> modify(ModifyContactGroupMembe
rsRequest request, core.String resourceName) { |
| 373 var _url = null; |
| 374 var _queryParams = new core.Map(); |
| 375 var _uploadMedia = null; |
| 376 var _uploadOptions = null; |
| 377 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 378 var _body = null; |
| 379 |
| 380 if (request != null) { |
| 381 _body = convert.JSON.encode((request).toJson()); |
| 382 } |
| 383 if (resourceName == null) { |
| 384 throw new core.ArgumentError("Parameter resourceName is required."); |
| 385 } |
| 386 |
| 387 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName') + '/me
mbers:modify'; |
| 388 |
| 389 var _response = _requester.request(_url, |
| 390 "POST", |
| 391 body: _body, |
| 392 queryParams: _queryParams, |
| 393 uploadOptions: _uploadOptions, |
| 394 uploadMedia: _uploadMedia, |
| 395 downloadOptions: _downloadOptions); |
| 396 return _response.then((data) => new ModifyContactGroupMembersResponse.fromJs
on(data)); |
| 397 } |
| 398 |
| 399 } |
| 400 |
| 401 |
56 class PeopleResourceApi { | 402 class PeopleResourceApi { |
57 final commons.ApiRequester _requester; | 403 final commons.ApiRequester _requester; |
58 | 404 |
59 PeopleConnectionsResourceApi get connections => new PeopleConnectionsResourceA
pi(_requester); | 405 PeopleConnectionsResourceApi get connections => new PeopleConnectionsResourceA
pi(_requester); |
60 | 406 |
61 PeopleResourceApi(commons.ApiRequester client) : | 407 PeopleResourceApi(commons.ApiRequester client) : |
62 _requester = client; | 408 _requester = client; |
63 | 409 |
64 /** | 410 /** |
65 * Provides information about a person by specifying a resource name. Use | 411 * Create a new contact and return the person resource for that contact. |
66 * `people/me` to indicate the authenticated user. | 412 * |
| 413 * [request] - The metadata request object. |
67 * | 414 * |
68 * Request parameters: | 415 * Request parameters: |
69 * | 416 * |
| 417 * [parent] - The resource name of the owning person resource. |
| 418 * |
| 419 * Completes with a [Person]. |
| 420 * |
| 421 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 422 * error. |
| 423 * |
| 424 * If the used [http.Client] completes with an error when making a REST call, |
| 425 * this method will complete with the same error. |
| 426 */ |
| 427 async.Future<Person> createContact(Person request, {core.String parent}) { |
| 428 var _url = null; |
| 429 var _queryParams = new core.Map(); |
| 430 var _uploadMedia = null; |
| 431 var _uploadOptions = null; |
| 432 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 433 var _body = null; |
| 434 |
| 435 if (request != null) { |
| 436 _body = convert.JSON.encode((request).toJson()); |
| 437 } |
| 438 if (parent != null) { |
| 439 _queryParams["parent"] = [parent]; |
| 440 } |
| 441 |
| 442 _url = 'v1/people:createContact'; |
| 443 |
| 444 var _response = _requester.request(_url, |
| 445 "POST", |
| 446 body: _body, |
| 447 queryParams: _queryParams, |
| 448 uploadOptions: _uploadOptions, |
| 449 uploadMedia: _uploadMedia, |
| 450 downloadOptions: _downloadOptions); |
| 451 return _response.then((data) => new Person.fromJson(data)); |
| 452 } |
| 453 |
| 454 /** |
| 455 * Delete a contact person. Any non-contact data will not be deleted. |
| 456 * |
| 457 * Request parameters: |
| 458 * |
| 459 * [resourceName] - The resource name of the contact to delete. |
| 460 * Value must have pattern "^people/[^/]+$". |
| 461 * |
| 462 * Completes with a [Empty]. |
| 463 * |
| 464 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 465 * error. |
| 466 * |
| 467 * If the used [http.Client] completes with an error when making a REST call, |
| 468 * this method will complete with the same error. |
| 469 */ |
| 470 async.Future<Empty> deleteContact(core.String resourceName) { |
| 471 var _url = null; |
| 472 var _queryParams = new core.Map(); |
| 473 var _uploadMedia = null; |
| 474 var _uploadOptions = null; |
| 475 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 476 var _body = null; |
| 477 |
| 478 if (resourceName == null) { |
| 479 throw new core.ArgumentError("Parameter resourceName is required."); |
| 480 } |
| 481 |
| 482 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName') + ':de
leteContact'; |
| 483 |
| 484 var _response = _requester.request(_url, |
| 485 "DELETE", |
| 486 body: _body, |
| 487 queryParams: _queryParams, |
| 488 uploadOptions: _uploadOptions, |
| 489 uploadMedia: _uploadMedia, |
| 490 downloadOptions: _downloadOptions); |
| 491 return _response.then((data) => new Empty.fromJson(data)); |
| 492 } |
| 493 |
| 494 /** |
| 495 * Provides information about a person by specifying a resource name. Use |
| 496 * `people/me` to indicate the authenticated user. |
| 497 * <br> |
| 498 * The request throws a 400 error if 'personFields' is not specified. |
| 499 * |
| 500 * Request parameters: |
| 501 * |
70 * [resourceName] - The resource name of the person to provide information | 502 * [resourceName] - The resource name of the person to provide information |
71 * about. | 503 * about. |
72 * | 504 * |
73 * - To get information about the authenticated user, specify `people/me`. | 505 * - To get information about the authenticated user, specify `people/me`. |
74 * - To get information about any user, specify the resource name that | 506 * - To get information about a google account, specify `people/<account_id>`. |
75 * identifies the user, such as the resource names returned by | 507 * - To get information about a contact, specify the resource name that |
| 508 * identifies the contact as returned by |
76 * [`people.connections.list`](/people/api/rest/v1/people.connections/list). | 509 * [`people.connections.list`](/people/api/rest/v1/people.connections/list). |
77 * Value must have pattern "^people/[^/]+$". | 510 * Value must have pattern "^people/[^/]+$". |
78 * | 511 * |
79 * [requestMask_includeField] - Required. Comma-separated list of person | 512 * [personFields] - **Required.** A field mask to restrict which fields on the |
| 513 * person are |
| 514 * returned. Valid values are: |
| 515 * |
| 516 * * addresses |
| 517 * * ageRanges |
| 518 * * biographies |
| 519 * * birthdays |
| 520 * * braggingRights |
| 521 * * coverPhotos |
| 522 * * emailAddresses |
| 523 * * events |
| 524 * * genders |
| 525 * * imClients |
| 526 * * interests |
| 527 * * locales |
| 528 * * memberships |
| 529 * * metadata |
| 530 * * names |
| 531 * * nicknames |
| 532 * * occupations |
| 533 * * organizations |
| 534 * * phoneNumbers |
| 535 * * photos |
| 536 * * relations |
| 537 * * relationshipInterests |
| 538 * * relationshipStatuses |
| 539 * * residences |
| 540 * * skills |
| 541 * * taglines |
| 542 * * urls |
| 543 * |
| 544 * [requestMask_includeField] - **Required.** Comma-separated list of person |
80 * fields to be included in the | 545 * fields to be included in the |
81 * response. Each path should start with `person.`: for example, | 546 * response. Each path should start with `person.`: for example, |
82 * `person.names` or `person.photos`. | 547 * `person.names` or `person.photos`. |
83 * | 548 * |
84 * Completes with a [Person]. | 549 * Completes with a [Person]. |
85 * | 550 * |
86 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 551 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
87 * error. | 552 * error. |
88 * | 553 * |
89 * If the used [http.Client] completes with an error when making a REST call, | 554 * If the used [http.Client] completes with an error when making a REST call, |
90 * this method will complete with the same error. | 555 * this method will complete with the same error. |
91 */ | 556 */ |
92 async.Future<Person> get(core.String resourceName, {core.String requestMask_in
cludeField}) { | 557 async.Future<Person> get(core.String resourceName, {core.String personFields,
core.String requestMask_includeField}) { |
93 var _url = null; | 558 var _url = null; |
94 var _queryParams = new core.Map(); | 559 var _queryParams = new core.Map(); |
95 var _uploadMedia = null; | 560 var _uploadMedia = null; |
96 var _uploadOptions = null; | 561 var _uploadOptions = null; |
97 var _downloadOptions = commons.DownloadOptions.Metadata; | 562 var _downloadOptions = commons.DownloadOptions.Metadata; |
98 var _body = null; | 563 var _body = null; |
99 | 564 |
100 if (resourceName == null) { | 565 if (resourceName == null) { |
101 throw new core.ArgumentError("Parameter resourceName is required."); | 566 throw new core.ArgumentError("Parameter resourceName is required."); |
102 } | 567 } |
| 568 if (personFields != null) { |
| 569 _queryParams["personFields"] = [personFields]; |
| 570 } |
103 if (requestMask_includeField != null) { | 571 if (requestMask_includeField != null) { |
104 _queryParams["requestMask.includeField"] = [requestMask_includeField]; | 572 _queryParams["requestMask.includeField"] = [requestMask_includeField]; |
105 } | 573 } |
106 | 574 |
107 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName'); | 575 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName'); |
108 | 576 |
109 var _response = _requester.request(_url, | 577 var _response = _requester.request(_url, |
110 "GET", | 578 "GET", |
111 body: _body, | 579 body: _body, |
112 queryParams: _queryParams, | 580 queryParams: _queryParams, |
113 uploadOptions: _uploadOptions, | 581 uploadOptions: _uploadOptions, |
114 uploadMedia: _uploadMedia, | 582 uploadMedia: _uploadMedia, |
115 downloadOptions: _downloadOptions); | 583 downloadOptions: _downloadOptions); |
116 return _response.then((data) => new Person.fromJson(data)); | 584 return _response.then((data) => new Person.fromJson(data)); |
117 } | 585 } |
118 | 586 |
119 /** | 587 /** |
120 * Provides information about a list of specific people by specifying a list | 588 * Provides information about a list of specific people by specifying a list |
121 * of requested resource names. Use `people/me` to indicate the authenticated | 589 * of requested resource names. Use `people/me` to indicate the authenticated |
122 * user. | 590 * user. |
| 591 * <br> |
| 592 * The request throws a 400 error if 'personFields' is not specified. |
123 * | 593 * |
124 * Request parameters: | 594 * Request parameters: |
125 * | 595 * |
126 * [requestMask_includeField] - Required. Comma-separated list of person | 596 * [requestMask_includeField] - **Required.** Comma-separated list of person |
127 * fields to be included in the | 597 * fields to be included in the |
128 * response. Each path should start with `person.`: for example, | 598 * response. Each path should start with `person.`: for example, |
129 * `person.names` or `person.photos`. | 599 * `person.names` or `person.photos`. |
130 * | 600 * |
131 * [resourceNames] - The resource name, such as one returned by | 601 * [resourceNames] - The resource name, such as one returned by |
132 * [`people.connections.list`](/people/api/rest/v1/people.connections/list), | 602 * [`people.connections.list`](/people/api/rest/v1/people.connections/list), |
133 * of one of the people to provide information about. You can include this | 603 * of one of the people to provide information about. You can include this |
134 * parameter up to 50 times in one request. | 604 * parameter up to 50 times in one request. |
135 * | 605 * |
| 606 * [personFields] - **Required.** A field mask to restrict which fields on |
| 607 * each person are |
| 608 * returned. Valid values are: |
| 609 * |
| 610 * * addresses |
| 611 * * ageRanges |
| 612 * * biographies |
| 613 * * birthdays |
| 614 * * braggingRights |
| 615 * * coverPhotos |
| 616 * * emailAddresses |
| 617 * * events |
| 618 * * genders |
| 619 * * imClients |
| 620 * * interests |
| 621 * * locales |
| 622 * * memberships |
| 623 * * metadata |
| 624 * * names |
| 625 * * nicknames |
| 626 * * occupations |
| 627 * * organizations |
| 628 * * phoneNumbers |
| 629 * * photos |
| 630 * * relations |
| 631 * * relationshipInterests |
| 632 * * relationshipStatuses |
| 633 * * residences |
| 634 * * skills |
| 635 * * taglines |
| 636 * * urls |
| 637 * |
136 * Completes with a [GetPeopleResponse]. | 638 * Completes with a [GetPeopleResponse]. |
137 * | 639 * |
138 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 640 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
139 * error. | 641 * error. |
140 * | 642 * |
141 * If the used [http.Client] completes with an error when making a REST call, | 643 * If the used [http.Client] completes with an error when making a REST call, |
142 * this method will complete with the same error. | 644 * this method will complete with the same error. |
143 */ | 645 */ |
144 async.Future<GetPeopleResponse> getBatchGet({core.String requestMask_includeFi
eld, core.List<core.String> resourceNames}) { | 646 async.Future<GetPeopleResponse> getBatchGet({core.String requestMask_includeFi
eld, core.List<core.String> resourceNames, core.String personFields}) { |
145 var _url = null; | 647 var _url = null; |
146 var _queryParams = new core.Map(); | 648 var _queryParams = new core.Map(); |
147 var _uploadMedia = null; | 649 var _uploadMedia = null; |
148 var _uploadOptions = null; | 650 var _uploadOptions = null; |
149 var _downloadOptions = commons.DownloadOptions.Metadata; | 651 var _downloadOptions = commons.DownloadOptions.Metadata; |
150 var _body = null; | 652 var _body = null; |
151 | 653 |
152 if (requestMask_includeField != null) { | 654 if (requestMask_includeField != null) { |
153 _queryParams["requestMask.includeField"] = [requestMask_includeField]; | 655 _queryParams["requestMask.includeField"] = [requestMask_includeField]; |
154 } | 656 } |
155 if (resourceNames != null) { | 657 if (resourceNames != null) { |
156 _queryParams["resourceNames"] = resourceNames; | 658 _queryParams["resourceNames"] = resourceNames; |
157 } | 659 } |
| 660 if (personFields != null) { |
| 661 _queryParams["personFields"] = [personFields]; |
| 662 } |
158 | 663 |
159 _url = 'v1/people:batchGet'; | 664 _url = 'v1/people:batchGet'; |
160 | 665 |
161 var _response = _requester.request(_url, | 666 var _response = _requester.request(_url, |
162 "GET", | 667 "GET", |
163 body: _body, | 668 body: _body, |
164 queryParams: _queryParams, | 669 queryParams: _queryParams, |
165 uploadOptions: _uploadOptions, | 670 uploadOptions: _uploadOptions, |
166 uploadMedia: _uploadMedia, | 671 uploadMedia: _uploadMedia, |
167 downloadOptions: _downloadOptions); | 672 downloadOptions: _downloadOptions); |
168 return _response.then((data) => new GetPeopleResponse.fromJson(data)); | 673 return _response.then((data) => new GetPeopleResponse.fromJson(data)); |
169 } | 674 } |
170 | 675 |
| 676 /** |
| 677 * Update contact data for an existing contact person. Any non-contact data |
| 678 * will not be modified. |
| 679 * |
| 680 * The request throws a 400 error if `updatePersonFields` is not specified. |
| 681 * <br> |
| 682 * The request throws a 400 error if `person.metadata.sources` is not |
| 683 * specified for the contact to be updated. |
| 684 * <br> |
| 685 * The request throws a 412 error if `person.metadata.sources.etag` is |
| 686 * different than the contact's etag, which indicates the contact has changed |
| 687 * since its data was read. Clients should get the latest person and re-apply |
| 688 * their updates to the latest person. |
| 689 * |
| 690 * [request] - The metadata request object. |
| 691 * |
| 692 * Request parameters: |
| 693 * |
| 694 * [resourceName] - The resource name for the person, assigned by the server. |
| 695 * An ASCII string |
| 696 * with a max length of 27 characters, in the form of `people/<person_id>`. |
| 697 * Value must have pattern "^people/[^/]+$". |
| 698 * |
| 699 * [updatePersonFields] - **Required.** A field mask to restrict which fields |
| 700 * on the person are |
| 701 * updated. Valid values are: |
| 702 * |
| 703 * * addresses |
| 704 * * biographies |
| 705 * * birthdays |
| 706 * * braggingRights |
| 707 * * emailAddresses |
| 708 * * events |
| 709 * * genders |
| 710 * * imClients |
| 711 * * interests |
| 712 * * locales |
| 713 * * names |
| 714 * * nicknames |
| 715 * * occupations |
| 716 * * organizations |
| 717 * * phoneNumbers |
| 718 * * relations |
| 719 * * residences |
| 720 * * skills |
| 721 * * urls |
| 722 * |
| 723 * Completes with a [Person]. |
| 724 * |
| 725 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 726 * error. |
| 727 * |
| 728 * If the used [http.Client] completes with an error when making a REST call, |
| 729 * this method will complete with the same error. |
| 730 */ |
| 731 async.Future<Person> updateContact(Person request, core.String resourceName, {
core.String updatePersonFields}) { |
| 732 var _url = null; |
| 733 var _queryParams = new core.Map(); |
| 734 var _uploadMedia = null; |
| 735 var _uploadOptions = null; |
| 736 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 737 var _body = null; |
| 738 |
| 739 if (request != null) { |
| 740 _body = convert.JSON.encode((request).toJson()); |
| 741 } |
| 742 if (resourceName == null) { |
| 743 throw new core.ArgumentError("Parameter resourceName is required."); |
| 744 } |
| 745 if (updatePersonFields != null) { |
| 746 _queryParams["updatePersonFields"] = [updatePersonFields]; |
| 747 } |
| 748 |
| 749 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName') + ':up
dateContact'; |
| 750 |
| 751 var _response = _requester.request(_url, |
| 752 "PATCH", |
| 753 body: _body, |
| 754 queryParams: _queryParams, |
| 755 uploadOptions: _uploadOptions, |
| 756 uploadMedia: _uploadMedia, |
| 757 downloadOptions: _downloadOptions); |
| 758 return _response.then((data) => new Person.fromJson(data)); |
| 759 } |
| 760 |
171 } | 761 } |
172 | 762 |
173 | 763 |
174 class PeopleConnectionsResourceApi { | 764 class PeopleConnectionsResourceApi { |
175 final commons.ApiRequester _requester; | 765 final commons.ApiRequester _requester; |
176 | 766 |
177 PeopleConnectionsResourceApi(commons.ApiRequester client) : | 767 PeopleConnectionsResourceApi(commons.ApiRequester client) : |
178 _requester = client; | 768 _requester = client; |
179 | 769 |
180 /** | 770 /** |
181 * Provides a list of the authenticated user's contacts merged with any | 771 * Provides a list of the authenticated user's contacts merged with any |
182 * linked profiles. | 772 * connected profiles. |
| 773 * <br> |
| 774 * The request throws a 400 error if 'personFields' is not specified. |
183 * | 775 * |
184 * Request parameters: | 776 * Request parameters: |
185 * | 777 * |
186 * [resourceName] - The resource name to return connections for. Only | 778 * [resourceName] - The resource name to return connections for. Only |
187 * `people/me` is valid. | 779 * `people/me` is valid. |
188 * Value must have pattern "^people/[^/]+$". | 780 * Value must have pattern "^people/[^/]+$". |
189 * | 781 * |
190 * [requestMask_includeField] - Required. Comma-separated list of person | |
191 * fields to be included in the | |
192 * response. Each path should start with `person.`: for example, | |
193 * `person.names` or `person.photos`. | |
194 * | |
195 * [pageSize] - The number of connections to include in the response. Valid | |
196 * values are | |
197 * between 1 and 2000, inclusive. Defaults to 100. | |
198 * | |
199 * [syncToken] - A sync token, returned by a previous call to | 782 * [syncToken] - A sync token, returned by a previous call to |
200 * `people.connections.list`. | 783 * `people.connections.list`. |
201 * Only resources changed since the sync token was created will be returned. | 784 * Only resources changed since the sync token was created will be returned. |
202 * | 785 * |
| 786 * [personFields] - **Required.** A field mask to restrict which fields on |
| 787 * each person are |
| 788 * returned. Valid values are: |
| 789 * |
| 790 * * addresses |
| 791 * * ageRanges |
| 792 * * biographies |
| 793 * * birthdays |
| 794 * * braggingRights |
| 795 * * coverPhotos |
| 796 * * emailAddresses |
| 797 * * events |
| 798 * * genders |
| 799 * * imClients |
| 800 * * interests |
| 801 * * locales |
| 802 * * memberships |
| 803 * * metadata |
| 804 * * names |
| 805 * * nicknames |
| 806 * * occupations |
| 807 * * organizations |
| 808 * * phoneNumbers |
| 809 * * photos |
| 810 * * relations |
| 811 * * relationshipInterests |
| 812 * * relationshipStatuses |
| 813 * * residences |
| 814 * * skills |
| 815 * * taglines |
| 816 * * urls |
| 817 * |
203 * [sortOrder] - The order in which the connections should be sorted. Defaults | 818 * [sortOrder] - The order in which the connections should be sorted. Defaults |
204 * to | 819 * to |
205 * `LAST_MODIFIED_ASCENDING`. | 820 * `LAST_MODIFIED_ASCENDING`. |
206 * Possible string values are: | 821 * Possible string values are: |
207 * - "LAST_MODIFIED_ASCENDING" : A LAST_MODIFIED_ASCENDING. | 822 * - "LAST_MODIFIED_ASCENDING" : A LAST_MODIFIED_ASCENDING. |
208 * - "FIRST_NAME_ASCENDING" : A FIRST_NAME_ASCENDING. | 823 * - "FIRST_NAME_ASCENDING" : A FIRST_NAME_ASCENDING. |
209 * - "LAST_NAME_ASCENDING" : A LAST_NAME_ASCENDING. | 824 * - "LAST_NAME_ASCENDING" : A LAST_NAME_ASCENDING. |
210 * | 825 * |
211 * [requestSyncToken] - Whether the response should include a sync token, | 826 * [requestSyncToken] - Whether the response should include a sync token, |
212 * which can be used to get | 827 * which can be used to get |
213 * all changes since the last request. | 828 * all changes since the last request. |
214 * | 829 * |
215 * [pageToken] - The token of the page to be returned. | 830 * [pageToken] - The token of the page to be returned. |
216 * | 831 * |
| 832 * [pageSize] - The number of connections to include in the response. Valid |
| 833 * values are |
| 834 * between 1 and 2000, inclusive. Defaults to 100. |
| 835 * |
| 836 * [requestMask_includeField] - **Required.** Comma-separated list of person |
| 837 * fields to be included in the |
| 838 * response. Each path should start with `person.`: for example, |
| 839 * `person.names` or `person.photos`. |
| 840 * |
217 * Completes with a [ListConnectionsResponse]. | 841 * Completes with a [ListConnectionsResponse]. |
218 * | 842 * |
219 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 843 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
220 * error. | 844 * error. |
221 * | 845 * |
222 * If the used [http.Client] completes with an error when making a REST call, | 846 * If the used [http.Client] completes with an error when making a REST call, |
223 * this method will complete with the same error. | 847 * this method will complete with the same error. |
224 */ | 848 */ |
225 async.Future<ListConnectionsResponse> list(core.String resourceName, {core.Str
ing requestMask_includeField, core.int pageSize, core.String syncToken, core.Str
ing sortOrder, core.bool requestSyncToken, core.String pageToken}) { | 849 async.Future<ListConnectionsResponse> list(core.String resourceName, {core.Str
ing syncToken, core.String personFields, core.String sortOrder, core.bool reques
tSyncToken, core.String pageToken, core.int pageSize, core.String requestMask_in
cludeField}) { |
226 var _url = null; | 850 var _url = null; |
227 var _queryParams = new core.Map(); | 851 var _queryParams = new core.Map(); |
228 var _uploadMedia = null; | 852 var _uploadMedia = null; |
229 var _uploadOptions = null; | 853 var _uploadOptions = null; |
230 var _downloadOptions = commons.DownloadOptions.Metadata; | 854 var _downloadOptions = commons.DownloadOptions.Metadata; |
231 var _body = null; | 855 var _body = null; |
232 | 856 |
233 if (resourceName == null) { | 857 if (resourceName == null) { |
234 throw new core.ArgumentError("Parameter resourceName is required."); | 858 throw new core.ArgumentError("Parameter resourceName is required."); |
235 } | 859 } |
236 if (requestMask_includeField != null) { | |
237 _queryParams["requestMask.includeField"] = [requestMask_includeField]; | |
238 } | |
239 if (pageSize != null) { | |
240 _queryParams["pageSize"] = ["${pageSize}"]; | |
241 } | |
242 if (syncToken != null) { | 860 if (syncToken != null) { |
243 _queryParams["syncToken"] = [syncToken]; | 861 _queryParams["syncToken"] = [syncToken]; |
244 } | 862 } |
| 863 if (personFields != null) { |
| 864 _queryParams["personFields"] = [personFields]; |
| 865 } |
245 if (sortOrder != null) { | 866 if (sortOrder != null) { |
246 _queryParams["sortOrder"] = [sortOrder]; | 867 _queryParams["sortOrder"] = [sortOrder]; |
247 } | 868 } |
248 if (requestSyncToken != null) { | 869 if (requestSyncToken != null) { |
249 _queryParams["requestSyncToken"] = ["${requestSyncToken}"]; | 870 _queryParams["requestSyncToken"] = ["${requestSyncToken}"]; |
250 } | 871 } |
251 if (pageToken != null) { | 872 if (pageToken != null) { |
252 _queryParams["pageToken"] = [pageToken]; | 873 _queryParams["pageToken"] = [pageToken]; |
253 } | 874 } |
| 875 if (pageSize != null) { |
| 876 _queryParams["pageSize"] = ["${pageSize}"]; |
| 877 } |
| 878 if (requestMask_includeField != null) { |
| 879 _queryParams["requestMask.includeField"] = [requestMask_includeField]; |
| 880 } |
254 | 881 |
255 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName') + '/co
nnections'; | 882 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName') + '/co
nnections'; |
256 | 883 |
257 var _response = _requester.request(_url, | 884 var _response = _requester.request(_url, |
258 "GET", | 885 "GET", |
259 body: _body, | 886 body: _body, |
260 queryParams: _queryParams, | 887 queryParams: _queryParams, |
261 uploadOptions: _uploadOptions, | 888 uploadOptions: _uploadOptions, |
262 uploadMedia: _uploadMedia, | 889 uploadMedia: _uploadMedia, |
263 downloadOptions: _downloadOptions); | 890 downloadOptions: _downloadOptions); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 if (ageRange != null) { | 1056 if (ageRange != null) { |
430 _json["ageRange"] = ageRange; | 1057 _json["ageRange"] = ageRange; |
431 } | 1058 } |
432 if (metadata != null) { | 1059 if (metadata != null) { |
433 _json["metadata"] = (metadata).toJson(); | 1060 _json["metadata"] = (metadata).toJson(); |
434 } | 1061 } |
435 return _json; | 1062 return _json; |
436 } | 1063 } |
437 } | 1064 } |
438 | 1065 |
| 1066 /** The response to a batch get contact groups request. */ |
| 1067 class BatchGetContactGroupsResponse { |
| 1068 /** The list of responses for each requested contact group resource. */ |
| 1069 core.List<ContactGroupResponse> responses; |
| 1070 |
| 1071 BatchGetContactGroupsResponse(); |
| 1072 |
| 1073 BatchGetContactGroupsResponse.fromJson(core.Map _json) { |
| 1074 if (_json.containsKey("responses")) { |
| 1075 responses = _json["responses"].map((value) => new ContactGroupResponse.fro
mJson(value)).toList(); |
| 1076 } |
| 1077 } |
| 1078 |
| 1079 core.Map<core.String, core.Object> toJson() { |
| 1080 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1081 if (responses != null) { |
| 1082 _json["responses"] = responses.map((value) => (value).toJson()).toList(); |
| 1083 } |
| 1084 return _json; |
| 1085 } |
| 1086 } |
| 1087 |
439 /** A person's short biography. */ | 1088 /** A person's short biography. */ |
440 class Biography { | 1089 class Biography { |
441 /** | 1090 /** |
442 * The content type of the biography. | 1091 * The content type of the biography. |
443 * Possible string values are: | 1092 * Possible string values are: |
444 * - "CONTENT_TYPE_UNSPECIFIED" : Unspecified. | 1093 * - "CONTENT_TYPE_UNSPECIFIED" : Unspecified. |
445 * - "TEXT_PLAIN" : Plain text. | 1094 * - "TEXT_PLAIN" : Plain text. |
446 * - "TEXT_HTML" : HTML text. | 1095 * - "TEXT_HTML" : HTML text. |
447 */ | 1096 */ |
448 core.String contentType; | 1097 core.String contentType; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 if (metadata != null) { | 1194 if (metadata != null) { |
546 _json["metadata"] = (metadata).toJson(); | 1195 _json["metadata"] = (metadata).toJson(); |
547 } | 1196 } |
548 if (value != null) { | 1197 if (value != null) { |
549 _json["value"] = value; | 1198 _json["value"] = value; |
550 } | 1199 } |
551 return _json; | 1200 return _json; |
552 } | 1201 } |
553 } | 1202 } |
554 | 1203 |
| 1204 /** A contact group. */ |
| 1205 class ContactGroup { |
| 1206 /** |
| 1207 * The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the |
| 1208 * resource. Used for web cache validation. |
| 1209 */ |
| 1210 core.String etag; |
| 1211 /** |
| 1212 * The read-only name translated and formatted in the viewer's account locale |
| 1213 * or the `Accept-Language` HTTP header locale for system groups names. |
| 1214 * Group names set by the owner are the same as name. |
| 1215 */ |
| 1216 core.String formattedName; |
| 1217 /** |
| 1218 * The read-only contact group type. |
| 1219 * Possible string values are: |
| 1220 * - "GROUP_TYPE_UNSPECIFIED" : Unspecified. |
| 1221 * - "USER_CONTACT_GROUP" : User defined contact group. |
| 1222 * - "SYSTEM_CONTACT_GROUP" : System defined contact group. |
| 1223 */ |
| 1224 core.String groupType; |
| 1225 /** |
| 1226 * The total number of contacts in the group irrespective of max members in |
| 1227 * specified in the request. |
| 1228 */ |
| 1229 core.int memberCount; |
| 1230 /** |
| 1231 * The list of contact person resource names that are members of the contact |
| 1232 * group. The field is not populated for LIST requests and can only be updated |
| 1233 * through the |
| 1234 * [ModifyContactGroupMembers](/people/api/rest/v1/contactgroups/members/modif
y). |
| 1235 */ |
| 1236 core.List<core.String> memberResourceNames; |
| 1237 /** Metadata about the contact group. */ |
| 1238 ContactGroupMetadata metadata; |
| 1239 /** |
| 1240 * The contact group name set by the group owner or a system provided name |
| 1241 * for system groups. |
| 1242 */ |
| 1243 core.String name; |
| 1244 /** |
| 1245 * The resource name for the contact group, assigned by the server. An ASCII |
| 1246 * string, in the form of `contactGroups/<contact_group_id>`. |
| 1247 */ |
| 1248 core.String resourceName; |
| 1249 |
| 1250 ContactGroup(); |
| 1251 |
| 1252 ContactGroup.fromJson(core.Map _json) { |
| 1253 if (_json.containsKey("etag")) { |
| 1254 etag = _json["etag"]; |
| 1255 } |
| 1256 if (_json.containsKey("formattedName")) { |
| 1257 formattedName = _json["formattedName"]; |
| 1258 } |
| 1259 if (_json.containsKey("groupType")) { |
| 1260 groupType = _json["groupType"]; |
| 1261 } |
| 1262 if (_json.containsKey("memberCount")) { |
| 1263 memberCount = _json["memberCount"]; |
| 1264 } |
| 1265 if (_json.containsKey("memberResourceNames")) { |
| 1266 memberResourceNames = _json["memberResourceNames"]; |
| 1267 } |
| 1268 if (_json.containsKey("metadata")) { |
| 1269 metadata = new ContactGroupMetadata.fromJson(_json["metadata"]); |
| 1270 } |
| 1271 if (_json.containsKey("name")) { |
| 1272 name = _json["name"]; |
| 1273 } |
| 1274 if (_json.containsKey("resourceName")) { |
| 1275 resourceName = _json["resourceName"]; |
| 1276 } |
| 1277 } |
| 1278 |
| 1279 core.Map<core.String, core.Object> toJson() { |
| 1280 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1281 if (etag != null) { |
| 1282 _json["etag"] = etag; |
| 1283 } |
| 1284 if (formattedName != null) { |
| 1285 _json["formattedName"] = formattedName; |
| 1286 } |
| 1287 if (groupType != null) { |
| 1288 _json["groupType"] = groupType; |
| 1289 } |
| 1290 if (memberCount != null) { |
| 1291 _json["memberCount"] = memberCount; |
| 1292 } |
| 1293 if (memberResourceNames != null) { |
| 1294 _json["memberResourceNames"] = memberResourceNames; |
| 1295 } |
| 1296 if (metadata != null) { |
| 1297 _json["metadata"] = (metadata).toJson(); |
| 1298 } |
| 1299 if (name != null) { |
| 1300 _json["name"] = name; |
| 1301 } |
| 1302 if (resourceName != null) { |
| 1303 _json["resourceName"] = resourceName; |
| 1304 } |
| 1305 return _json; |
| 1306 } |
| 1307 } |
| 1308 |
555 /** A Google contact group membership. */ | 1309 /** A Google contact group membership. */ |
556 class ContactGroupMembership { | 1310 class ContactGroupMembership { |
557 /** | 1311 /** |
558 * The contact group ID for the contact group membership. The contact group | 1312 * The contact group ID for the contact group membership. The contact group |
559 * ID can be custom or predefined. Possible values include, but are not | 1313 * ID can be custom or predefined. Possible values include, but are not |
560 * limited to, the following: | 1314 * limited to, the following: |
561 * | 1315 * |
562 * * `myContacts` | 1316 * * `myContacts` |
563 * * `starred` | 1317 * * `starred` |
564 * * A numerical ID for user-created groups. | 1318 * * A numerical ID for user-created groups. |
(...skipping 10 matching lines...) Expand all Loading... |
575 | 1329 |
576 core.Map<core.String, core.Object> toJson() { | 1330 core.Map<core.String, core.Object> toJson() { |
577 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1331 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
578 if (contactGroupId != null) { | 1332 if (contactGroupId != null) { |
579 _json["contactGroupId"] = contactGroupId; | 1333 _json["contactGroupId"] = contactGroupId; |
580 } | 1334 } |
581 return _json; | 1335 return _json; |
582 } | 1336 } |
583 } | 1337 } |
584 | 1338 |
| 1339 /** The read-only metadata about a contact group. */ |
| 1340 class ContactGroupMetadata { |
| 1341 /** |
| 1342 * True if the contact group resource has been deleted. Populated only for |
| 1343 * [`ListContactGroups`](/people/api/rest/v1/contactgroups/list) requests |
| 1344 * that include a sync token. |
| 1345 */ |
| 1346 core.bool deleted; |
| 1347 /** The time the group was last updated. */ |
| 1348 core.String updateTime; |
| 1349 |
| 1350 ContactGroupMetadata(); |
| 1351 |
| 1352 ContactGroupMetadata.fromJson(core.Map _json) { |
| 1353 if (_json.containsKey("deleted")) { |
| 1354 deleted = _json["deleted"]; |
| 1355 } |
| 1356 if (_json.containsKey("updateTime")) { |
| 1357 updateTime = _json["updateTime"]; |
| 1358 } |
| 1359 } |
| 1360 |
| 1361 core.Map<core.String, core.Object> toJson() { |
| 1362 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1363 if (deleted != null) { |
| 1364 _json["deleted"] = deleted; |
| 1365 } |
| 1366 if (updateTime != null) { |
| 1367 _json["updateTime"] = updateTime; |
| 1368 } |
| 1369 return _json; |
| 1370 } |
| 1371 } |
| 1372 |
| 1373 /** The response for a specific contact group. */ |
| 1374 class ContactGroupResponse { |
| 1375 /** The contact group. */ |
| 1376 ContactGroup contactGroup; |
| 1377 /** The original requested resource name. */ |
| 1378 core.String requestedResourceName; |
| 1379 /** The status of the response. */ |
| 1380 Status status; |
| 1381 |
| 1382 ContactGroupResponse(); |
| 1383 |
| 1384 ContactGroupResponse.fromJson(core.Map _json) { |
| 1385 if (_json.containsKey("contactGroup")) { |
| 1386 contactGroup = new ContactGroup.fromJson(_json["contactGroup"]); |
| 1387 } |
| 1388 if (_json.containsKey("requestedResourceName")) { |
| 1389 requestedResourceName = _json["requestedResourceName"]; |
| 1390 } |
| 1391 if (_json.containsKey("status")) { |
| 1392 status = new Status.fromJson(_json["status"]); |
| 1393 } |
| 1394 } |
| 1395 |
| 1396 core.Map<core.String, core.Object> toJson() { |
| 1397 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1398 if (contactGroup != null) { |
| 1399 _json["contactGroup"] = (contactGroup).toJson(); |
| 1400 } |
| 1401 if (requestedResourceName != null) { |
| 1402 _json["requestedResourceName"] = requestedResourceName; |
| 1403 } |
| 1404 if (status != null) { |
| 1405 _json["status"] = (status).toJson(); |
| 1406 } |
| 1407 return _json; |
| 1408 } |
| 1409 } |
| 1410 |
585 /** | 1411 /** |
586 * A person's read-only cover photo. A large image shown on the person's | 1412 * A person's read-only cover photo. A large image shown on the person's |
587 * profile page that represents who they are or what they care about. | 1413 * profile page that represents who they are or what they care about. |
588 */ | 1414 */ |
589 class CoverPhoto { | 1415 class CoverPhoto { |
590 /** | 1416 /** |
591 * True if the cover photo is the default cover photo; | 1417 * True if the cover photo is the default cover photo; |
592 * false if the cover photo is a user-provided cover photo. | 1418 * false if the cover photo is a user-provided cover photo. |
593 */ | 1419 */ |
594 core.bool default_; | 1420 core.bool default_; |
(...skipping 24 matching lines...) Expand all Loading... |
619 if (metadata != null) { | 1445 if (metadata != null) { |
620 _json["metadata"] = (metadata).toJson(); | 1446 _json["metadata"] = (metadata).toJson(); |
621 } | 1447 } |
622 if (url != null) { | 1448 if (url != null) { |
623 _json["url"] = url; | 1449 _json["url"] = url; |
624 } | 1450 } |
625 return _json; | 1451 return _json; |
626 } | 1452 } |
627 } | 1453 } |
628 | 1454 |
| 1455 /** A request to create a new contact group. */ |
| 1456 class CreateContactGroupRequest { |
| 1457 /** The contact group to create. */ |
| 1458 ContactGroup contactGroup; |
| 1459 |
| 1460 CreateContactGroupRequest(); |
| 1461 |
| 1462 CreateContactGroupRequest.fromJson(core.Map _json) { |
| 1463 if (_json.containsKey("contactGroup")) { |
| 1464 contactGroup = new ContactGroup.fromJson(_json["contactGroup"]); |
| 1465 } |
| 1466 } |
| 1467 |
| 1468 core.Map<core.String, core.Object> toJson() { |
| 1469 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1470 if (contactGroup != null) { |
| 1471 _json["contactGroup"] = (contactGroup).toJson(); |
| 1472 } |
| 1473 return _json; |
| 1474 } |
| 1475 } |
| 1476 |
629 /** | 1477 /** |
630 * Represents a whole calendar date, for example a date of birth. The time | 1478 * Represents a whole calendar date, for example a date of birth. The time |
631 * of day and time zone are either specified elsewhere or are not | 1479 * of day and time zone are either specified elsewhere or are not |
632 * significant. The date is relative to the | 1480 * significant. The date is relative to the |
633 * [Proleptic Gregorian | 1481 * [Proleptic Gregorian |
634 * Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). | 1482 * Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). |
635 * The day may be 0 to represent a year and month where the day is not | 1483 * The day may be 0 to represent a year and month where the day is not |
636 * significant. The year may be 0 to represent a month and day independent | 1484 * significant. The year may be 0 to represent a month and day independent |
637 * of year; for example, anniversary date. | 1485 * of year; for example, anniversary date. |
638 */ | 1486 */ |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 if (type != null) { | 1606 if (type != null) { |
759 _json["type"] = type; | 1607 _json["type"] = type; |
760 } | 1608 } |
761 if (value != null) { | 1609 if (value != null) { |
762 _json["value"] = value; | 1610 _json["value"] = value; |
763 } | 1611 } |
764 return _json; | 1612 return _json; |
765 } | 1613 } |
766 } | 1614 } |
767 | 1615 |
| 1616 /** |
| 1617 * A generic empty message that you can re-use to avoid defining duplicated |
| 1618 * empty messages in your APIs. A typical example is to use it as the request |
| 1619 * or the response type of an API method. For instance: |
| 1620 * |
| 1621 * service Foo { |
| 1622 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 1623 * } |
| 1624 * |
| 1625 * The JSON representation for `Empty` is empty JSON object `{}`. |
| 1626 */ |
| 1627 class Empty { |
| 1628 |
| 1629 Empty(); |
| 1630 |
| 1631 Empty.fromJson(core.Map _json) { |
| 1632 } |
| 1633 |
| 1634 core.Map<core.String, core.Object> toJson() { |
| 1635 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1636 return _json; |
| 1637 } |
| 1638 } |
| 1639 |
768 /** An event related to the person. */ | 1640 /** An event related to the person. */ |
769 class Event { | 1641 class Event { |
770 /** The date of the event. */ | 1642 /** The date of the event. */ |
771 Date date; | 1643 Date date; |
772 /** | 1644 /** |
773 * The read-only type of the event translated and formatted in the | 1645 * The read-only type of the event translated and formatted in the |
774 * viewer's account locale or the `Accept-Language` HTTP header locale. | 1646 * viewer's account locale or the `Accept-Language` HTTP header locale. |
775 */ | 1647 */ |
776 core.String formattedType; | 1648 core.String formattedType; |
777 /** Metadata about the event. */ | 1649 /** Metadata about the event. */ |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 class ListConnectionsResponse { | 1929 class ListConnectionsResponse { |
1058 /** The list of people that the requestor is connected to. */ | 1930 /** The list of people that the requestor is connected to. */ |
1059 core.List<Person> connections; | 1931 core.List<Person> connections; |
1060 /** The token that can be used to retrieve the next page of results. */ | 1932 /** The token that can be used to retrieve the next page of results. */ |
1061 core.String nextPageToken; | 1933 core.String nextPageToken; |
1062 /** The token that can be used to retrieve changes since the last request. */ | 1934 /** The token that can be used to retrieve changes since the last request. */ |
1063 core.String nextSyncToken; | 1935 core.String nextSyncToken; |
1064 /** The total number of items in the list without pagination. */ | 1936 /** The total number of items in the list without pagination. */ |
1065 core.int totalItems; | 1937 core.int totalItems; |
1066 /** | 1938 /** |
1067 * DEPRECATED(Please use total_items). The total number of people in the list | 1939 * **DEPRECATED** (Please use totalItems) |
1068 * without pagination. | 1940 * The total number of people in the list without pagination. |
1069 */ | 1941 */ |
1070 core.int totalPeople; | 1942 core.int totalPeople; |
1071 | 1943 |
1072 ListConnectionsResponse(); | 1944 ListConnectionsResponse(); |
1073 | 1945 |
1074 ListConnectionsResponse.fromJson(core.Map _json) { | 1946 ListConnectionsResponse.fromJson(core.Map _json) { |
1075 if (_json.containsKey("connections")) { | 1947 if (_json.containsKey("connections")) { |
1076 connections = _json["connections"].map((value) => new Person.fromJson(valu
e)).toList(); | 1948 connections = _json["connections"].map((value) => new Person.fromJson(valu
e)).toList(); |
1077 } | 1949 } |
1078 if (_json.containsKey("nextPageToken")) { | 1950 if (_json.containsKey("nextPageToken")) { |
(...skipping 24 matching lines...) Expand all Loading... |
1103 if (totalItems != null) { | 1975 if (totalItems != null) { |
1104 _json["totalItems"] = totalItems; | 1976 _json["totalItems"] = totalItems; |
1105 } | 1977 } |
1106 if (totalPeople != null) { | 1978 if (totalPeople != null) { |
1107 _json["totalPeople"] = totalPeople; | 1979 _json["totalPeople"] = totalPeople; |
1108 } | 1980 } |
1109 return _json; | 1981 return _json; |
1110 } | 1982 } |
1111 } | 1983 } |
1112 | 1984 |
| 1985 /** The response to a list contact groups request. */ |
| 1986 class ListContactGroupsResponse { |
| 1987 /** |
| 1988 * The list of contact groups. Members of the contact groups are not |
| 1989 * populated. |
| 1990 */ |
| 1991 core.List<ContactGroup> contactGroups; |
| 1992 /** The token that can be used to retrieve the next page of results. */ |
| 1993 core.String nextPageToken; |
| 1994 /** The token that can be used to retrieve changes since the last request. */ |
| 1995 core.String nextSyncToken; |
| 1996 /** The total number of items in the list without pagination. */ |
| 1997 core.int totalItems; |
| 1998 |
| 1999 ListContactGroupsResponse(); |
| 2000 |
| 2001 ListContactGroupsResponse.fromJson(core.Map _json) { |
| 2002 if (_json.containsKey("contactGroups")) { |
| 2003 contactGroups = _json["contactGroups"].map((value) => new ContactGroup.fro
mJson(value)).toList(); |
| 2004 } |
| 2005 if (_json.containsKey("nextPageToken")) { |
| 2006 nextPageToken = _json["nextPageToken"]; |
| 2007 } |
| 2008 if (_json.containsKey("nextSyncToken")) { |
| 2009 nextSyncToken = _json["nextSyncToken"]; |
| 2010 } |
| 2011 if (_json.containsKey("totalItems")) { |
| 2012 totalItems = _json["totalItems"]; |
| 2013 } |
| 2014 } |
| 2015 |
| 2016 core.Map<core.String, core.Object> toJson() { |
| 2017 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 2018 if (contactGroups != null) { |
| 2019 _json["contactGroups"] = contactGroups.map((value) => (value).toJson()).to
List(); |
| 2020 } |
| 2021 if (nextPageToken != null) { |
| 2022 _json["nextPageToken"] = nextPageToken; |
| 2023 } |
| 2024 if (nextSyncToken != null) { |
| 2025 _json["nextSyncToken"] = nextSyncToken; |
| 2026 } |
| 2027 if (totalItems != null) { |
| 2028 _json["totalItems"] = totalItems; |
| 2029 } |
| 2030 return _json; |
| 2031 } |
| 2032 } |
| 2033 |
1113 /** A person's locale preference. */ | 2034 /** A person's locale preference. */ |
1114 class Locale { | 2035 class Locale { |
1115 /** Metadata about the locale. */ | 2036 /** Metadata about the locale. */ |
1116 FieldMetadata metadata; | 2037 FieldMetadata metadata; |
1117 /** | 2038 /** |
1118 * The well-formed [IETF BCP 47](https://tools.ietf.org/html/bcp47) | 2039 * The well-formed [IETF BCP 47](https://tools.ietf.org/html/bcp47) |
1119 * language tag representing the locale. | 2040 * language tag representing the locale. |
1120 */ | 2041 */ |
1121 core.String value; | 2042 core.String value; |
1122 | 2043 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1174 if (domainMembership != null) { | 2095 if (domainMembership != null) { |
1175 _json["domainMembership"] = (domainMembership).toJson(); | 2096 _json["domainMembership"] = (domainMembership).toJson(); |
1176 } | 2097 } |
1177 if (metadata != null) { | 2098 if (metadata != null) { |
1178 _json["metadata"] = (metadata).toJson(); | 2099 _json["metadata"] = (metadata).toJson(); |
1179 } | 2100 } |
1180 return _json; | 2101 return _json; |
1181 } | 2102 } |
1182 } | 2103 } |
1183 | 2104 |
| 2105 /** A request to modify an existing contact group's members. */ |
| 2106 class ModifyContactGroupMembersRequest { |
| 2107 /** |
| 2108 * The resource names of the contact people to add in the form of in the form |
| 2109 * `people/<person_id>`. |
| 2110 */ |
| 2111 core.List<core.String> resourceNamesToAdd; |
| 2112 /** |
| 2113 * The resource names of the contact people to remove in the form of in the |
| 2114 * form of `people/<person_id>`. |
| 2115 */ |
| 2116 core.List<core.String> resourceNamesToRemove; |
| 2117 |
| 2118 ModifyContactGroupMembersRequest(); |
| 2119 |
| 2120 ModifyContactGroupMembersRequest.fromJson(core.Map _json) { |
| 2121 if (_json.containsKey("resourceNamesToAdd")) { |
| 2122 resourceNamesToAdd = _json["resourceNamesToAdd"]; |
| 2123 } |
| 2124 if (_json.containsKey("resourceNamesToRemove")) { |
| 2125 resourceNamesToRemove = _json["resourceNamesToRemove"]; |
| 2126 } |
| 2127 } |
| 2128 |
| 2129 core.Map<core.String, core.Object> toJson() { |
| 2130 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 2131 if (resourceNamesToAdd != null) { |
| 2132 _json["resourceNamesToAdd"] = resourceNamesToAdd; |
| 2133 } |
| 2134 if (resourceNamesToRemove != null) { |
| 2135 _json["resourceNamesToRemove"] = resourceNamesToRemove; |
| 2136 } |
| 2137 return _json; |
| 2138 } |
| 2139 } |
| 2140 |
| 2141 /** The response to a modify contact group members request. */ |
| 2142 class ModifyContactGroupMembersResponse { |
| 2143 /** The contact people resource names that were not found. */ |
| 2144 core.List<core.String> notFoundResourceNames; |
| 2145 |
| 2146 ModifyContactGroupMembersResponse(); |
| 2147 |
| 2148 ModifyContactGroupMembersResponse.fromJson(core.Map _json) { |
| 2149 if (_json.containsKey("notFoundResourceNames")) { |
| 2150 notFoundResourceNames = _json["notFoundResourceNames"]; |
| 2151 } |
| 2152 } |
| 2153 |
| 2154 core.Map<core.String, core.Object> toJson() { |
| 2155 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 2156 if (notFoundResourceNames != null) { |
| 2157 _json["notFoundResourceNames"] = notFoundResourceNames; |
| 2158 } |
| 2159 return _json; |
| 2160 } |
| 2161 } |
| 2162 |
1184 /** A person's name. If the name is a mononym, the family name is empty. */ | 2163 /** A person's name. If the name is a mononym, the family name is empty. */ |
1185 class Name { | 2164 class Name { |
1186 /** | 2165 /** |
1187 * The read-only display name formatted according to the locale specified by | 2166 * The read-only display name formatted according to the locale specified by |
1188 * the viewer's account or the <code>Accept-Language</code> HTTP header. | 2167 * the viewer's account or the <code>Accept-Language</code> HTTP header. |
1189 */ | 2168 */ |
1190 core.String displayName; | 2169 core.String displayName; |
1191 /** | 2170 /** |
1192 * The read-only display name with the last name first formatted according to | 2171 * The read-only display name with the last name first formatted according to |
1193 * the locale specified by the viewer's account or the | 2172 * the locale specified by the viewer's account or the |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1545 * authenticated user's contacts and profile data. | 2524 * authenticated user's contacts and profile data. |
1546 * | 2525 * |
1547 * Most fields can have multiple items. The items in a field have no guaranteed | 2526 * Most fields can have multiple items. The items in a field have no guaranteed |
1548 * order, but each non-empty field is guaranteed to have exactly one field with | 2527 * order, but each non-empty field is guaranteed to have exactly one field with |
1549 * `metadata.primary` set to true. | 2528 * `metadata.primary` set to true. |
1550 */ | 2529 */ |
1551 class Person { | 2530 class Person { |
1552 /** The person's street addresses. */ | 2531 /** The person's street addresses. */ |
1553 core.List<Address> addresses; | 2532 core.List<Address> addresses; |
1554 /** | 2533 /** |
1555 * DEPRECATED(Please read person.age_ranges instead). The person's age range. | 2534 * **DEPRECATED** (Please use `person.ageRanges` instead)** |
| 2535 * |
| 2536 * The person's read-only age range. |
1556 * Possible string values are: | 2537 * Possible string values are: |
1557 * - "AGE_RANGE_UNSPECIFIED" : Unspecified. | 2538 * - "AGE_RANGE_UNSPECIFIED" : Unspecified. |
1558 * - "LESS_THAN_EIGHTEEN" : Younger than eighteen. | 2539 * - "LESS_THAN_EIGHTEEN" : Younger than eighteen. |
1559 * - "EIGHTEEN_TO_TWENTY" : Between eighteen and twenty. | 2540 * - "EIGHTEEN_TO_TWENTY" : Between eighteen and twenty. |
1560 * - "TWENTY_ONE_OR_OLDER" : Twenty-one and older. | 2541 * - "TWENTY_ONE_OR_OLDER" : Twenty-one and older. |
1561 */ | 2542 */ |
1562 core.String ageRange; | 2543 core.String ageRange; |
1563 /** The person's age ranges. */ | 2544 /** The person's read-only age ranges. */ |
1564 core.List<AgeRangeType> ageRanges; | 2545 core.List<AgeRangeType> ageRanges; |
1565 /** The person's biographies. */ | 2546 /** The person's biographies. */ |
1566 core.List<Biography> biographies; | 2547 core.List<Biography> biographies; |
1567 /** The person's birthdays. */ | 2548 /** The person's birthdays. */ |
1568 core.List<Birthday> birthdays; | 2549 core.List<Birthday> birthdays; |
1569 /** The person's bragging rights. */ | 2550 /** The person's bragging rights. */ |
1570 core.List<BraggingRights> braggingRights; | 2551 core.List<BraggingRights> braggingRights; |
1571 /** The person's cover photos. */ | 2552 /** The person's read-only cover photos. */ |
1572 core.List<CoverPhoto> coverPhotos; | 2553 core.List<CoverPhoto> coverPhotos; |
1573 /** The person's email addresses. */ | 2554 /** The person's email addresses. */ |
1574 core.List<EmailAddress> emailAddresses; | 2555 core.List<EmailAddress> emailAddresses; |
1575 /** | 2556 /** |
1576 * The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the | 2557 * The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the |
1577 * resource. Used for web cache validation. | 2558 * resource. Used for web cache validation. |
1578 */ | 2559 */ |
1579 core.String etag; | 2560 core.String etag; |
1580 /** The person's events. */ | 2561 /** The person's events. */ |
1581 core.List<Event> events; | 2562 core.List<Event> events; |
1582 /** The person's genders. */ | 2563 /** The person's genders. */ |
1583 core.List<Gender> genders; | 2564 core.List<Gender> genders; |
1584 /** The person's instant messaging clients. */ | 2565 /** The person's instant messaging clients. */ |
1585 core.List<ImClient> imClients; | 2566 core.List<ImClient> imClients; |
1586 /** The person's interests. */ | 2567 /** The person's interests. */ |
1587 core.List<Interest> interests; | 2568 core.List<Interest> interests; |
1588 /** The person's locale preferences. */ | 2569 /** The person's locale preferences. */ |
1589 core.List<Locale> locales; | 2570 core.List<Locale> locales; |
1590 /** The person's group memberships. */ | 2571 /** The person's read-only group memberships. */ |
1591 core.List<Membership> memberships; | 2572 core.List<Membership> memberships; |
1592 /** Metadata about the person. */ | 2573 /** Read-only metadata about the person. */ |
1593 PersonMetadata metadata; | 2574 PersonMetadata metadata; |
1594 /** The person's names. */ | 2575 /** The person's names. */ |
1595 core.List<Name> names; | 2576 core.List<Name> names; |
1596 /** The person's nicknames. */ | 2577 /** The person's nicknames. */ |
1597 core.List<Nickname> nicknames; | 2578 core.List<Nickname> nicknames; |
1598 /** The person's occupations. */ | 2579 /** The person's occupations. */ |
1599 core.List<Occupation> occupations; | 2580 core.List<Occupation> occupations; |
1600 /** The person's past or current organizations. */ | 2581 /** The person's past or current organizations. */ |
1601 core.List<Organization> organizations; | 2582 core.List<Organization> organizations; |
1602 /** The person's phone numbers. */ | 2583 /** The person's phone numbers. */ |
1603 core.List<PhoneNumber> phoneNumbers; | 2584 core.List<PhoneNumber> phoneNumbers; |
1604 /** The person's photos. */ | 2585 /** The person's read-only photos. */ |
1605 core.List<Photo> photos; | 2586 core.List<Photo> photos; |
1606 /** The person's relations. */ | 2587 /** The person's relations. */ |
1607 core.List<Relation> relations; | 2588 core.List<Relation> relations; |
1608 /** The kind of relationship the person is looking for. */ | 2589 /** The person's read-only relationship interests. */ |
1609 core.List<RelationshipInterest> relationshipInterests; | 2590 core.List<RelationshipInterest> relationshipInterests; |
1610 /** The person's relationship statuses. */ | 2591 /** The person's read-only relationship statuses. */ |
1611 core.List<RelationshipStatus> relationshipStatuses; | 2592 core.List<RelationshipStatus> relationshipStatuses; |
1612 /** The person's residences. */ | 2593 /** The person's residences. */ |
1613 core.List<Residence> residences; | 2594 core.List<Residence> residences; |
1614 /** | 2595 /** |
1615 * The resource name for the person, assigned by the server. An ASCII string | 2596 * The resource name for the person, assigned by the server. An ASCII string |
1616 * with a max length of 27 characters, in the form of `people/<person_id>`. | 2597 * with a max length of 27 characters, in the form of `people/<person_id>`. |
1617 */ | 2598 */ |
1618 core.String resourceName; | 2599 core.String resourceName; |
1619 /** The person's skills. */ | 2600 /** The person's skills. */ |
1620 core.List<Skill> skills; | 2601 core.List<Skill> skills; |
1621 /** The person's taglines. */ | 2602 /** The person's read-only taglines. */ |
1622 core.List<Tagline> taglines; | 2603 core.List<Tagline> taglines; |
1623 /** The person's associated URLs. */ | 2604 /** The person's associated URLs. */ |
1624 core.List<Url> urls; | 2605 core.List<Url> urls; |
1625 | 2606 |
1626 Person(); | 2607 Person(); |
1627 | 2608 |
1628 Person.fromJson(core.Map _json) { | 2609 Person.fromJson(core.Map _json) { |
1629 if (_json.containsKey("addresses")) { | 2610 if (_json.containsKey("addresses")) { |
1630 addresses = _json["addresses"].map((value) => new Address.fromJson(value))
.toList(); | 2611 addresses = _json["addresses"].map((value) => new Address.fromJson(value))
.toList(); |
1631 } | 2612 } |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1818 class PersonMetadata { | 2799 class PersonMetadata { |
1819 /** | 2800 /** |
1820 * True if the person resource has been deleted. Populated only for | 2801 * True if the person resource has been deleted. Populated only for |
1821 * [`connections.list`](/people/api/rest/v1/people.connections/list) requests | 2802 * [`connections.list`](/people/api/rest/v1/people.connections/list) requests |
1822 * that include a sync token. | 2803 * that include a sync token. |
1823 */ | 2804 */ |
1824 core.bool deleted; | 2805 core.bool deleted; |
1825 /** Resource names of people linked to this resource. */ | 2806 /** Resource names of people linked to this resource. */ |
1826 core.List<core.String> linkedPeopleResourceNames; | 2807 core.List<core.String> linkedPeopleResourceNames; |
1827 /** | 2808 /** |
1828 * DEPRECATED(Please read person.metadata.sources.profile_metadata instead). | 2809 * **DEPRECATED** (Please use |
| 2810 * `person.metadata.sources.profileMetadata.objectType` instead) |
| 2811 * |
1829 * The type of the person object. | 2812 * The type of the person object. |
1830 * Possible string values are: | 2813 * Possible string values are: |
1831 * - "OBJECT_TYPE_UNSPECIFIED" : Unspecified. | 2814 * - "OBJECT_TYPE_UNSPECIFIED" : Unspecified. |
1832 * - "PERSON" : Person. | 2815 * - "PERSON" : Person. |
1833 * - "PAGE" : [Google+ Page.](http://www.google.com/+/brands/) | 2816 * - "PAGE" : [Google+ Page.](http://www.google.com/+/brands/) |
1834 */ | 2817 */ |
1835 core.String objectType; | 2818 core.String objectType; |
1836 /** | 2819 /** |
1837 * Any former resource names this person has had. Populated only for | 2820 * Any former resource names this person has had. Populated only for |
1838 * [`connections.list`](/people/api/rest/v1/people.connections/list) requests | 2821 * [`connections.list`](/people/api/rest/v1/people.connections/list) requests |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1883 if (sources != null) { | 2866 if (sources != null) { |
1884 _json["sources"] = sources.map((value) => (value).toJson()).toList(); | 2867 _json["sources"] = sources.map((value) => (value).toJson()).toList(); |
1885 } | 2868 } |
1886 return _json; | 2869 return _json; |
1887 } | 2870 } |
1888 } | 2871 } |
1889 | 2872 |
1890 /** The response for a single person */ | 2873 /** The response for a single person */ |
1891 class PersonResponse { | 2874 class PersonResponse { |
1892 /** | 2875 /** |
1893 * DEPRECATED(Please use status instead). | 2876 * **DEPRECATED** (Please use status instead) |
1894 * [HTTP 1.1 status | 2877 * |
1895 * code](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html). | 2878 * [HTTP 1.1 status code] |
| 2879 * (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html). |
1896 */ | 2880 */ |
1897 core.int httpStatusCode; | 2881 core.int httpStatusCode; |
1898 /** The person. */ | 2882 /** The person. */ |
1899 Person person; | 2883 Person person; |
1900 /** | 2884 /** |
1901 * The original requested resource name. May be different than the resource | 2885 * The original requested resource name. May be different than the resource |
1902 * name on the returned person. | 2886 * name on the returned person. |
1903 * | 2887 * |
1904 * The resource name can change when adding or removing fields that link a | 2888 * The resource name can change when adding or removing fields that link a |
1905 * contact and profile such as a verified email, verified phone number, or a | 2889 * contact and profile such as a verified email, verified phone number, or a |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1947 /** A person's phone number. */ | 2931 /** A person's phone number. */ |
1948 class PhoneNumber { | 2932 class PhoneNumber { |
1949 /** | 2933 /** |
1950 * The read-only canonicalized [ITU-T | 2934 * The read-only canonicalized [ITU-T |
1951 * E.164](https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.1.2008.pdf) | 2935 * E.164](https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.1.2008.pdf) |
1952 * form of the phone number. | 2936 * form of the phone number. |
1953 */ | 2937 */ |
1954 core.String canonicalForm; | 2938 core.String canonicalForm; |
1955 /** | 2939 /** |
1956 * The read-only type of the phone number translated and formatted in the | 2940 * The read-only type of the phone number translated and formatted in the |
1957 * viewer's account locale or the the `Accept-Language` HTTP header locale. | 2941 * viewer's account locale or the `Accept-Language` HTTP header locale. |
1958 */ | 2942 */ |
1959 core.String formattedType; | 2943 core.String formattedType; |
1960 /** Metadata about the phone number. */ | 2944 /** Metadata about the phone number. */ |
1961 FieldMetadata metadata; | 2945 FieldMetadata metadata; |
1962 /** | 2946 /** |
1963 * The type of the phone number. The type can be custom or predefined. | 2947 * The type of the phone number. The type can be custom or predefined. |
1964 * Possible values include, but are not limited to, the following: | 2948 * Possible values include, but are not limited to, the following: |
1965 * | 2949 * |
1966 * * `home` | 2950 * * `home` |
1967 * * `work` | 2951 * * `work` |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2061 /** The read-only metadata about a profile. */ | 3045 /** The read-only metadata about a profile. */ |
2062 class ProfileMetadata { | 3046 class ProfileMetadata { |
2063 /** | 3047 /** |
2064 * The profile object type. | 3048 * The profile object type. |
2065 * Possible string values are: | 3049 * Possible string values are: |
2066 * - "OBJECT_TYPE_UNSPECIFIED" : Unspecified. | 3050 * - "OBJECT_TYPE_UNSPECIFIED" : Unspecified. |
2067 * - "PERSON" : Person. | 3051 * - "PERSON" : Person. |
2068 * - "PAGE" : [Google+ Page.](http://www.google.com/+/brands/) | 3052 * - "PAGE" : [Google+ Page.](http://www.google.com/+/brands/) |
2069 */ | 3053 */ |
2070 core.String objectType; | 3054 core.String objectType; |
| 3055 /** The user types. */ |
| 3056 core.List<core.String> userTypes; |
2071 | 3057 |
2072 ProfileMetadata(); | 3058 ProfileMetadata(); |
2073 | 3059 |
2074 ProfileMetadata.fromJson(core.Map _json) { | 3060 ProfileMetadata.fromJson(core.Map _json) { |
2075 if (_json.containsKey("objectType")) { | 3061 if (_json.containsKey("objectType")) { |
2076 objectType = _json["objectType"]; | 3062 objectType = _json["objectType"]; |
2077 } | 3063 } |
| 3064 if (_json.containsKey("userTypes")) { |
| 3065 userTypes = _json["userTypes"]; |
| 3066 } |
2078 } | 3067 } |
2079 | 3068 |
2080 core.Map<core.String, core.Object> toJson() { | 3069 core.Map<core.String, core.Object> toJson() { |
2081 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3070 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
2082 if (objectType != null) { | 3071 if (objectType != null) { |
2083 _json["objectType"] = objectType; | 3072 _json["objectType"] = objectType; |
2084 } | 3073 } |
| 3074 if (userTypes != null) { |
| 3075 _json["userTypes"] = userTypes; |
| 3076 } |
2085 return _json; | 3077 return _json; |
2086 } | 3078 } |
2087 } | 3079 } |
2088 | 3080 |
2089 /** A person's relation to another person. */ | 3081 /** A person's relation to another person. */ |
2090 class Relation { | 3082 class Relation { |
2091 /** | 3083 /** |
2092 * The type of the relation translated and formatted in the viewer's account | 3084 * The type of the relation translated and formatted in the viewer's account |
2093 * locale or the locale specified in the Accept-Language HTTP header. | 3085 * locale or the locale specified in the Accept-Language HTTP header. |
2094 */ | 3086 */ |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2342 core.String id; | 3334 core.String id; |
2343 /** Metadata about a source of type PROFILE. */ | 3335 /** Metadata about a source of type PROFILE. */ |
2344 ProfileMetadata profileMetadata; | 3336 ProfileMetadata profileMetadata; |
2345 /** | 3337 /** |
2346 * The source type. | 3338 * The source type. |
2347 * Possible string values are: | 3339 * Possible string values are: |
2348 * - "SOURCE_TYPE_UNSPECIFIED" : Unspecified. | 3340 * - "SOURCE_TYPE_UNSPECIFIED" : Unspecified. |
2349 * - "ACCOUNT" : [Google Account](https://accounts.google.com). | 3341 * - "ACCOUNT" : [Google Account](https://accounts.google.com). |
2350 * - "PROFILE" : [Google profile](https://profiles.google.com). You can view | 3342 * - "PROFILE" : [Google profile](https://profiles.google.com). You can view |
2351 * the | 3343 * the |
2352 * profile at https://profiles.google.com/<id> where <id> is the source | 3344 * profile at https://profiles.google.com/<var>id</var> where |
2353 * id. | 3345 * <var>id</var> is the source id. |
2354 * - "DOMAIN_PROFILE" : [Google Apps domain | 3346 * - "DOMAIN_PROFILE" : [Google Apps domain |
2355 * profile](https://admin.google.com). | 3347 * profile](https://admin.google.com). |
2356 * - "CONTACT" : [Google contact](https://contacts.google.com). You can view | 3348 * - "CONTACT" : [Google contact](https://contacts.google.com). You can view |
2357 * the | 3349 * the |
2358 * contact at https://contact.google.com/<id> where <id> is the source | 3350 * contact at https://contact.google.com/<var>id</var> where <var>id</var> |
2359 * id. | 3351 * is the source id. |
2360 */ | 3352 */ |
2361 core.String type; | 3353 core.String type; |
| 3354 /** Last update timestamp of this source. */ |
| 3355 core.String updateTime; |
2362 | 3356 |
2363 Source(); | 3357 Source(); |
2364 | 3358 |
2365 Source.fromJson(core.Map _json) { | 3359 Source.fromJson(core.Map _json) { |
2366 if (_json.containsKey("etag")) { | 3360 if (_json.containsKey("etag")) { |
2367 etag = _json["etag"]; | 3361 etag = _json["etag"]; |
2368 } | 3362 } |
2369 if (_json.containsKey("id")) { | 3363 if (_json.containsKey("id")) { |
2370 id = _json["id"]; | 3364 id = _json["id"]; |
2371 } | 3365 } |
2372 if (_json.containsKey("profileMetadata")) { | 3366 if (_json.containsKey("profileMetadata")) { |
2373 profileMetadata = new ProfileMetadata.fromJson(_json["profileMetadata"]); | 3367 profileMetadata = new ProfileMetadata.fromJson(_json["profileMetadata"]); |
2374 } | 3368 } |
2375 if (_json.containsKey("type")) { | 3369 if (_json.containsKey("type")) { |
2376 type = _json["type"]; | 3370 type = _json["type"]; |
2377 } | 3371 } |
| 3372 if (_json.containsKey("updateTime")) { |
| 3373 updateTime = _json["updateTime"]; |
| 3374 } |
2378 } | 3375 } |
2379 | 3376 |
2380 core.Map<core.String, core.Object> toJson() { | 3377 core.Map<core.String, core.Object> toJson() { |
2381 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3378 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
2382 if (etag != null) { | 3379 if (etag != null) { |
2383 _json["etag"] = etag; | 3380 _json["etag"] = etag; |
2384 } | 3381 } |
2385 if (id != null) { | 3382 if (id != null) { |
2386 _json["id"] = id; | 3383 _json["id"] = id; |
2387 } | 3384 } |
2388 if (profileMetadata != null) { | 3385 if (profileMetadata != null) { |
2389 _json["profileMetadata"] = (profileMetadata).toJson(); | 3386 _json["profileMetadata"] = (profileMetadata).toJson(); |
2390 } | 3387 } |
2391 if (type != null) { | 3388 if (type != null) { |
2392 _json["type"] = type; | 3389 _json["type"] = type; |
2393 } | 3390 } |
| 3391 if (updateTime != null) { |
| 3392 _json["updateTime"] = updateTime; |
| 3393 } |
2394 return _json; | 3394 return _json; |
2395 } | 3395 } |
2396 } | 3396 } |
2397 | 3397 |
2398 /** | 3398 /** |
2399 * The `Status` type defines a logical error model that is suitable for | 3399 * The `Status` type defines a logical error model that is suitable for |
2400 * different | 3400 * different |
2401 * programming environments, including REST APIs and RPC APIs. It is used by | 3401 * programming environments, including REST APIs and RPC APIs. It is used by |
2402 * [gRPC](https://github.com/grpc). The error model is designed to be: | 3402 * [gRPC](https://github.com/grpc). The error model is designed to be: |
2403 * | 3403 * |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2448 * results in its response, the status of those operations should be | 3448 * results in its response, the status of those operations should be |
2449 * represented directly using the `Status` message. | 3449 * represented directly using the `Status` message. |
2450 * | 3450 * |
2451 * - Logging. If some API errors are stored in logs, the message `Status` could | 3451 * - Logging. If some API errors are stored in logs, the message `Status` could |
2452 * be used directly after any stripping needed for security/privacy reasons. | 3452 * be used directly after any stripping needed for security/privacy reasons. |
2453 */ | 3453 */ |
2454 class Status { | 3454 class Status { |
2455 /** The status code, which should be an enum value of google.rpc.Code. */ | 3455 /** The status code, which should be an enum value of google.rpc.Code. */ |
2456 core.int code; | 3456 core.int code; |
2457 /** | 3457 /** |
2458 * A list of messages that carry the error details. There will be a | 3458 * A list of messages that carry the error details. There is a common set of |
2459 * common set of message types for APIs to use. | 3459 * message types for APIs to use. |
2460 * | 3460 * |
2461 * The values for Object must be JSON objects. It can consist of `num`, | 3461 * The values for Object must be JSON objects. It can consist of `num`, |
2462 * `String`, `bool` and `null` as well as `Map` and `List` values. | 3462 * `String`, `bool` and `null` as well as `Map` and `List` values. |
2463 */ | 3463 */ |
2464 core.List<core.Map<core.String, core.Object>> details; | 3464 core.List<core.Map<core.String, core.Object>> details; |
2465 /** | 3465 /** |
2466 * A developer-facing error message, which should be in English. Any | 3466 * A developer-facing error message, which should be in English. Any |
2467 * user-facing error message should be localized and sent in the | 3467 * user-facing error message should be localized and sent in the |
2468 * google.rpc.Status.details field, or localized by the client. | 3468 * google.rpc.Status.details field, or localized by the client. |
2469 */ | 3469 */ |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2521 if (metadata != null) { | 3521 if (metadata != null) { |
2522 _json["metadata"] = (metadata).toJson(); | 3522 _json["metadata"] = (metadata).toJson(); |
2523 } | 3523 } |
2524 if (value != null) { | 3524 if (value != null) { |
2525 _json["value"] = value; | 3525 _json["value"] = value; |
2526 } | 3526 } |
2527 return _json; | 3527 return _json; |
2528 } | 3528 } |
2529 } | 3529 } |
2530 | 3530 |
| 3531 /** |
| 3532 * A request to update an existing contact group. Only the name can be updated. |
| 3533 */ |
| 3534 class UpdateContactGroupRequest { |
| 3535 /** The contact group to update. */ |
| 3536 ContactGroup contactGroup; |
| 3537 |
| 3538 UpdateContactGroupRequest(); |
| 3539 |
| 3540 UpdateContactGroupRequest.fromJson(core.Map _json) { |
| 3541 if (_json.containsKey("contactGroup")) { |
| 3542 contactGroup = new ContactGroup.fromJson(_json["contactGroup"]); |
| 3543 } |
| 3544 } |
| 3545 |
| 3546 core.Map<core.String, core.Object> toJson() { |
| 3547 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3548 if (contactGroup != null) { |
| 3549 _json["contactGroup"] = (contactGroup).toJson(); |
| 3550 } |
| 3551 return _json; |
| 3552 } |
| 3553 } |
| 3554 |
2531 /** A person's associated URLs. */ | 3555 /** A person's associated URLs. */ |
2532 class Url { | 3556 class Url { |
2533 /** | 3557 /** |
2534 * The read-only type of the URL translated and formatted in the viewer's | 3558 * The read-only type of the URL translated and formatted in the viewer's |
2535 * account locale or the `Accept-Language` HTTP header locale. | 3559 * account locale or the `Accept-Language` HTTP header locale. |
2536 */ | 3560 */ |
2537 core.String formattedType; | 3561 core.String formattedType; |
2538 /** Metadata about the URL. */ | 3562 /** Metadata about the URL. */ |
2539 FieldMetadata metadata; | 3563 FieldMetadata metadata; |
2540 /** | 3564 /** |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2582 } | 3606 } |
2583 if (type != null) { | 3607 if (type != null) { |
2584 _json["type"] = type; | 3608 _json["type"] = type; |
2585 } | 3609 } |
2586 if (value != null) { | 3610 if (value != null) { |
2587 _json["value"] = value; | 3611 _json["value"] = value; |
2588 } | 3612 } |
2589 return _json; | 3613 return _json; |
2590 } | 3614 } |
2591 } | 3615 } |
OLD | NEW |