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

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

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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;
11 11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
13 ApiRequestError, DetailedApiRequestError; 13 show ApiRequestError, DetailedApiRequestError;
14 14
15 const core.String USER_AGENT = 'dart-api-client people/v1'; 15 const core.String USER_AGENT = 'dart-api-client people/v1';
16 16
17 /** Provides access to information about profiles and contacts. */ 17 /// Provides access to information about profiles and contacts.
18 class PeopleApi { 18 class PeopleApi {
19 /** Manage your contacts */ 19 /// Manage your contacts
20 static const ContactsScope = "https://www.googleapis.com/auth/contacts"; 20 static const ContactsScope = "https://www.googleapis.com/auth/contacts";
21 21
22 /** View your contacts */ 22 /// View your contacts
23 static const ContactsReadonlyScope = "https://www.googleapis.com/auth/contacts .readonly"; 23 static const ContactsReadonlyScope =
24 "https://www.googleapis.com/auth/contacts.readonly";
24 25
25 /** Know the list of people in your circles, your age range, and language */ 26 /// Know the list of people in your circles, your age range, and language
26 static const PlusLoginScope = "https://www.googleapis.com/auth/plus.login"; 27 static const PlusLoginScope = "https://www.googleapis.com/auth/plus.login";
27 28
28 /** View your street addresses */ 29 /// View your street addresses
29 static const UserAddressesReadScope = "https://www.googleapis.com/auth/user.ad dresses.read"; 30 static const UserAddressesReadScope =
31 "https://www.googleapis.com/auth/user.addresses.read";
30 32
31 /** View your complete date of birth */ 33 /// View your complete date of birth
32 static const UserBirthdayReadScope = "https://www.googleapis.com/auth/user.bir thday.read"; 34 static const UserBirthdayReadScope =
35 "https://www.googleapis.com/auth/user.birthday.read";
33 36
34 /** View your email addresses */ 37 /// View your email addresses
35 static const UserEmailsReadScope = "https://www.googleapis.com/auth/user.email s.read"; 38 static const UserEmailsReadScope =
39 "https://www.googleapis.com/auth/user.emails.read";
36 40
37 /** View your phone numbers */ 41 /// View your phone numbers
38 static const UserPhonenumbersReadScope = "https://www.googleapis.com/auth/user .phonenumbers.read"; 42 static const UserPhonenumbersReadScope =
43 "https://www.googleapis.com/auth/user.phonenumbers.read";
39 44
40 /** View your email address */ 45 /// View your email address
41 static const UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.em ail"; 46 static const UserinfoEmailScope =
47 "https://www.googleapis.com/auth/userinfo.email";
42 48
43 /** View your basic profile info */ 49 /// View your basic profile info
44 static const UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo. profile"; 50 static const UserinfoProfileScope =
45 51 "https://www.googleapis.com/auth/userinfo.profile";
46 52
47 final commons.ApiRequester _requester; 53 final commons.ApiRequester _requester;
48 54
49 ContactGroupsResourceApi get contactGroups => new ContactGroupsResourceApi(_re quester); 55 ContactGroupsResourceApi get contactGroups =>
56 new ContactGroupsResourceApi(_requester);
50 PeopleResourceApi get people => new PeopleResourceApi(_requester); 57 PeopleResourceApi get people => new PeopleResourceApi(_requester);
51 58
52 PeopleApi(http.Client client, {core.String rootUrl: "https://people.googleapis .com/", core.String servicePath: ""}) : 59 PeopleApi(http.Client client,
53 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 60 {core.String rootUrl: "https://people.googleapis.com/",
61 core.String servicePath: ""})
62 : _requester =
63 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
54 } 64 }
55 65
56
57 class ContactGroupsResourceApi { 66 class ContactGroupsResourceApi {
58 final commons.ApiRequester _requester; 67 final commons.ApiRequester _requester;
59 68
60 ContactGroupsMembersResourceApi get members => new ContactGroupsMembersResourc eApi(_requester); 69 ContactGroupsMembersResourceApi get members =>
70 new ContactGroupsMembersResourceApi(_requester);
61 71
62 ContactGroupsResourceApi(commons.ApiRequester client) : 72 ContactGroupsResourceApi(commons.ApiRequester client) : _requester = client;
63 _requester = client;
64 73
65 /** 74 /// Get a list of contact groups owned by the authenticated user by
66 * Get a list of contact groups owned by the authenticated user by specifying 75 /// specifying
67 * a list of contact group resource names. 76 /// a list of contact group resource names.
68 * 77 ///
69 * Request parameters: 78 /// Request parameters:
70 * 79 ///
71 * [maxMembers] - Specifies the maximum number of members to return for each 80 /// [maxMembers] - Specifies the maximum number of members to return for each
72 * group. 81 /// group.
73 * 82 ///
74 * [resourceNames] - The resource names of the contact groups to get. 83 /// [resourceNames] - The resource names of the contact groups to get.
75 * 84 ///
76 * Completes with a [BatchGetContactGroupsResponse]. 85 /// Completes with a [BatchGetContactGroupsResponse].
77 * 86 ///
78 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 87 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
79 * error. 88 /// an error.
80 * 89 ///
81 * If the used [http.Client] completes with an error when making a REST call, 90 /// If the used [http.Client] completes with an error when making a REST
82 * this method will complete with the same error. 91 /// call, this method will complete with the same error.
83 */ 92 async.Future<BatchGetContactGroupsResponse> batchGet(
84 async.Future<BatchGetContactGroupsResponse> batchGet({core.int maxMembers, cor e.List<core.String> resourceNames}) { 93 {core.int maxMembers, core.List<core.String> resourceNames}) {
85 var _url = null; 94 var _url = null;
86 var _queryParams = new core.Map(); 95 var _queryParams = new core.Map();
87 var _uploadMedia = null; 96 var _uploadMedia = null;
88 var _uploadOptions = null; 97 var _uploadOptions = null;
89 var _downloadOptions = commons.DownloadOptions.Metadata; 98 var _downloadOptions = commons.DownloadOptions.Metadata;
90 var _body = null; 99 var _body = null;
91 100
92 if (maxMembers != null) { 101 if (maxMembers != null) {
93 _queryParams["maxMembers"] = ["${maxMembers}"]; 102 _queryParams["maxMembers"] = ["${maxMembers}"];
94 } 103 }
95 if (resourceNames != null) { 104 if (resourceNames != null) {
96 _queryParams["resourceNames"] = resourceNames; 105 _queryParams["resourceNames"] = resourceNames;
97 } 106 }
98 107
99 _url = 'v1/contactGroups:batchGet'; 108 _url = 'v1/contactGroups:batchGet';
100 109
101 var _response = _requester.request(_url, 110 var _response = _requester.request(_url, "GET",
102 "GET", 111 body: _body,
103 body: _body, 112 queryParams: _queryParams,
104 queryParams: _queryParams, 113 uploadOptions: _uploadOptions,
105 uploadOptions: _uploadOptions, 114 uploadMedia: _uploadMedia,
106 uploadMedia: _uploadMedia, 115 downloadOptions: _downloadOptions);
107 downloadOptions: _downloadOptions); 116 return _response
108 return _response.then((data) => new BatchGetContactGroupsResponse.fromJson(d ata)); 117 .then((data) => new BatchGetContactGroupsResponse.fromJson(data));
109 } 118 }
110 119
111 /** 120 /// Create a new contact group owned by the authenticated user.
112 * Create a new contact group owned by the authenticated user. 121 ///
113 * 122 /// [request] - The metadata request object.
114 * [request] - The metadata request object. 123 ///
115 * 124 /// Request parameters:
116 * Request parameters: 125 ///
117 * 126 /// Completes with a [ContactGroup].
118 * Completes with a [ContactGroup]. 127 ///
119 * 128 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
120 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 129 /// an error.
121 * error. 130 ///
122 * 131 /// If the used [http.Client] completes with an error when making a REST
123 * If the used [http.Client] completes with an error when making a REST call, 132 /// call, this method will complete with the same error.
124 * this method will complete with the same error.
125 */
126 async.Future<ContactGroup> create(CreateContactGroupRequest request) { 133 async.Future<ContactGroup> create(CreateContactGroupRequest request) {
127 var _url = null; 134 var _url = null;
128 var _queryParams = new core.Map(); 135 var _queryParams = new core.Map();
129 var _uploadMedia = null; 136 var _uploadMedia = null;
130 var _uploadOptions = null; 137 var _uploadOptions = null;
131 var _downloadOptions = commons.DownloadOptions.Metadata; 138 var _downloadOptions = commons.DownloadOptions.Metadata;
132 var _body = null; 139 var _body = null;
133 140
134 if (request != null) { 141 if (request != null) {
135 _body = convert.JSON.encode((request).toJson()); 142 _body = convert.JSON.encode((request).toJson());
136 } 143 }
137 144
138 _url = 'v1/contactGroups'; 145 _url = 'v1/contactGroups';
139 146
140 var _response = _requester.request(_url, 147 var _response = _requester.request(_url, "POST",
141 "POST", 148 body: _body,
142 body: _body, 149 queryParams: _queryParams,
143 queryParams: _queryParams, 150 uploadOptions: _uploadOptions,
144 uploadOptions: _uploadOptions, 151 uploadMedia: _uploadMedia,
145 uploadMedia: _uploadMedia, 152 downloadOptions: _downloadOptions);
146 downloadOptions: _downloadOptions);
147 return _response.then((data) => new ContactGroup.fromJson(data)); 153 return _response.then((data) => new ContactGroup.fromJson(data));
148 } 154 }
149 155
150 /** 156 /// Delete an existing contact group owned by the authenticated user by
151 * Delete an existing contact group owned by the authenticated user by 157 /// specifying a contact group resource name.
152 * specifying a contact group resource name. 158 ///
153 * 159 /// Request parameters:
154 * Request parameters: 160 ///
155 * 161 /// [resourceName] - The resource name of the contact group to delete.
156 * [resourceName] - The resource name of the contact group to delete. 162 /// Value must have pattern "^contactGroups/[^/]+$".
157 * Value must have pattern "^contactGroups/[^/]+$". 163 ///
158 * 164 /// [deleteContacts] - Set to true to also delete the contacts in the
159 * [deleteContacts] - Set to true to also delete the contacts in the specified 165 /// specified group.
160 * group. 166 ///
161 * 167 /// Completes with a [Empty].
162 * Completes with a [Empty]. 168 ///
163 * 169 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
164 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 170 /// an error.
165 * error. 171 ///
166 * 172 /// If the used [http.Client] completes with an error when making a REST
167 * If the used [http.Client] completes with an error when making a REST call, 173 /// call, this method will complete with the same error.
168 * this method will complete with the same error. 174 async.Future<Empty> delete(core.String resourceName,
169 */ 175 {core.bool deleteContacts}) {
170 async.Future<Empty> delete(core.String resourceName, {core.bool deleteContacts }) {
171 var _url = null; 176 var _url = null;
172 var _queryParams = new core.Map(); 177 var _queryParams = new core.Map();
173 var _uploadMedia = null; 178 var _uploadMedia = null;
174 var _uploadOptions = null; 179 var _uploadOptions = null;
175 var _downloadOptions = commons.DownloadOptions.Metadata; 180 var _downloadOptions = commons.DownloadOptions.Metadata;
176 var _body = null; 181 var _body = null;
177 182
178 if (resourceName == null) { 183 if (resourceName == null) {
179 throw new core.ArgumentError("Parameter resourceName is required."); 184 throw new core.ArgumentError("Parameter resourceName is required.");
180 } 185 }
181 if (deleteContacts != null) { 186 if (deleteContacts != null) {
182 _queryParams["deleteContacts"] = ["${deleteContacts}"]; 187 _queryParams["deleteContacts"] = ["${deleteContacts}"];
183 } 188 }
184 189
185 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName'); 190 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName');
186 191
187 var _response = _requester.request(_url, 192 var _response = _requester.request(_url, "DELETE",
188 "DELETE", 193 body: _body,
189 body: _body, 194 queryParams: _queryParams,
190 queryParams: _queryParams, 195 uploadOptions: _uploadOptions,
191 uploadOptions: _uploadOptions, 196 uploadMedia: _uploadMedia,
192 uploadMedia: _uploadMedia, 197 downloadOptions: _downloadOptions);
193 downloadOptions: _downloadOptions);
194 return _response.then((data) => new Empty.fromJson(data)); 198 return _response.then((data) => new Empty.fromJson(data));
195 } 199 }
196 200
197 /** 201 /// Get a specific contact group owned by the authenticated user by
198 * Get a specific contact group owned by the authenticated user by specifying 202 /// specifying
199 * a contact group resource name. 203 /// a contact group resource name.
200 * 204 ///
201 * Request parameters: 205 /// Request parameters:
202 * 206 ///
203 * [resourceName] - The resource name of the contact group to get. 207 /// [resourceName] - The resource name of the contact group to get.
204 * Value must have pattern "^contactGroups/[^/]+$". 208 /// Value must have pattern "^contactGroups/[^/]+$".
205 * 209 ///
206 * [maxMembers] - Specifies the maximum number of members to return. 210 /// [maxMembers] - Specifies the maximum number of members to return.
207 * 211 ///
208 * Completes with a [ContactGroup]. 212 /// Completes with a [ContactGroup].
209 * 213 ///
210 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 214 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
211 * error. 215 /// an error.
212 * 216 ///
213 * If the used [http.Client] completes with an error when making a REST call, 217 /// If the used [http.Client] completes with an error when making a REST
214 * this method will complete with the same error. 218 /// call, this method will complete with the same error.
215 */ 219 async.Future<ContactGroup> get(core.String resourceName,
216 async.Future<ContactGroup> get(core.String resourceName, {core.int maxMembers} ) { 220 {core.int maxMembers}) {
217 var _url = null; 221 var _url = null;
218 var _queryParams = new core.Map(); 222 var _queryParams = new core.Map();
219 var _uploadMedia = null; 223 var _uploadMedia = null;
220 var _uploadOptions = null; 224 var _uploadOptions = null;
221 var _downloadOptions = commons.DownloadOptions.Metadata; 225 var _downloadOptions = commons.DownloadOptions.Metadata;
222 var _body = null; 226 var _body = null;
223 227
224 if (resourceName == null) { 228 if (resourceName == null) {
225 throw new core.ArgumentError("Parameter resourceName is required."); 229 throw new core.ArgumentError("Parameter resourceName is required.");
226 } 230 }
227 if (maxMembers != null) { 231 if (maxMembers != null) {
228 _queryParams["maxMembers"] = ["${maxMembers}"]; 232 _queryParams["maxMembers"] = ["${maxMembers}"];
229 } 233 }
230 234
231 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName'); 235 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName');
232 236
233 var _response = _requester.request(_url, 237 var _response = _requester.request(_url, "GET",
234 "GET", 238 body: _body,
235 body: _body, 239 queryParams: _queryParams,
236 queryParams: _queryParams, 240 uploadOptions: _uploadOptions,
237 uploadOptions: _uploadOptions, 241 uploadMedia: _uploadMedia,
238 uploadMedia: _uploadMedia, 242 downloadOptions: _downloadOptions);
239 downloadOptions: _downloadOptions);
240 return _response.then((data) => new ContactGroup.fromJson(data)); 243 return _response.then((data) => new ContactGroup.fromJson(data));
241 } 244 }
242 245
243 /** 246 /// List all contact groups owned by the authenticated user. Members of the
244 * List all contact groups owned by the authenticated user. Members of the 247 /// contact groups are not populated.
245 * contact groups are not populated. 248 ///
246 * 249 /// Request parameters:
247 * Request parameters: 250 ///
248 * 251 /// [syncToken] - A sync token, returned by a previous call to
249 * [pageToken] - The next_page_token value returned from a previous call to 252 /// `contactgroups.list`.
250 * [ListContactGroups](/people/api/rest/v1/contactgroups/list). 253 /// Only resources changed since the sync token was created will be returned.
251 * Requests the next page of resources. 254 ///
252 * 255 /// [pageToken] - The next_page_token value returned from a previous call to
253 * [pageSize] - The maximum number of resources to return. 256 /// [ListContactGroups](/people/api/rest/v1/contactgroups/list).
254 * 257 /// Requests the next page of resources.
255 * [syncToken] - A sync token, returned by a previous call to 258 ///
256 * `contactgroups.list`. 259 /// [pageSize] - The maximum number of resources to return.
257 * Only resources changed since the sync token was created will be returned. 260 ///
258 * 261 /// Completes with a [ListContactGroupsResponse].
259 * Completes with a [ListContactGroupsResponse]. 262 ///
260 * 263 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
261 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 264 /// an error.
262 * error. 265 ///
263 * 266 /// If the used [http.Client] completes with an error when making a REST
264 * If the used [http.Client] completes with an error when making a REST call, 267 /// call, this method will complete with the same error.
265 * this method will complete with the same error. 268 async.Future<ListContactGroupsResponse> list(
266 */ 269 {core.String syncToken, core.String pageToken, core.int pageSize}) {
267 async.Future<ListContactGroupsResponse> list({core.String pageToken, core.int pageSize, core.String syncToken}) {
268 var _url = null; 270 var _url = null;
269 var _queryParams = new core.Map(); 271 var _queryParams = new core.Map();
270 var _uploadMedia = null; 272 var _uploadMedia = null;
271 var _uploadOptions = null; 273 var _uploadOptions = null;
272 var _downloadOptions = commons.DownloadOptions.Metadata; 274 var _downloadOptions = commons.DownloadOptions.Metadata;
273 var _body = null; 275 var _body = null;
274 276
277 if (syncToken != null) {
278 _queryParams["syncToken"] = [syncToken];
279 }
275 if (pageToken != null) { 280 if (pageToken != null) {
276 _queryParams["pageToken"] = [pageToken]; 281 _queryParams["pageToken"] = [pageToken];
277 } 282 }
278 if (pageSize != null) { 283 if (pageSize != null) {
279 _queryParams["pageSize"] = ["${pageSize}"]; 284 _queryParams["pageSize"] = ["${pageSize}"];
280 } 285 }
281 if (syncToken != null) {
282 _queryParams["syncToken"] = [syncToken];
283 }
284 286
285 _url = 'v1/contactGroups'; 287 _url = 'v1/contactGroups';
286 288
287 var _response = _requester.request(_url, 289 var _response = _requester.request(_url, "GET",
288 "GET", 290 body: _body,
289 body: _body, 291 queryParams: _queryParams,
290 queryParams: _queryParams, 292 uploadOptions: _uploadOptions,
291 uploadOptions: _uploadOptions, 293 uploadMedia: _uploadMedia,
292 uploadMedia: _uploadMedia, 294 downloadOptions: _downloadOptions);
293 downloadOptions: _downloadOptions); 295 return _response
294 return _response.then((data) => new ListContactGroupsResponse.fromJson(data) ); 296 .then((data) => new ListContactGroupsResponse.fromJson(data));
295 } 297 }
296 298
297 /** 299 /// Update the name of an existing contact group owned by the authenticated
298 * Update the name of an existing contact group owned by the authenticated 300 /// user.
299 * user. 301 ///
300 * 302 /// [request] - The metadata request object.
301 * [request] - The metadata request object. 303 ///
302 * 304 /// Request parameters:
303 * Request parameters: 305 ///
304 * 306 /// [resourceName] - The resource name for the contact group, assigned by the
305 * [resourceName] - The resource name for the contact group, assigned by the 307 /// server. An ASCII
306 * server. An ASCII 308 /// string, in the form of `contactGroups/`<var>contact_group_id</var>.
307 * string, in the form of `contactGroups/`<var>contact_group_id</var>. 309 /// Value must have pattern "^contactGroups/[^/]+$".
308 * Value must have pattern "^contactGroups/[^/]+$". 310 ///
309 * 311 /// Completes with a [ContactGroup].
310 * Completes with a [ContactGroup]. 312 ///
311 * 313 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
312 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 314 /// an error.
313 * error. 315 ///
314 * 316 /// If the used [http.Client] completes with an error when making a REST
315 * If the used [http.Client] completes with an error when making a REST call, 317 /// call, this method will complete with the same error.
316 * this method will complete with the same error. 318 async.Future<ContactGroup> update(
317 */ 319 UpdateContactGroupRequest request, core.String resourceName) {
318 async.Future<ContactGroup> update(UpdateContactGroupRequest request, core.Stri ng resourceName) {
319 var _url = null; 320 var _url = null;
320 var _queryParams = new core.Map(); 321 var _queryParams = new core.Map();
321 var _uploadMedia = null; 322 var _uploadMedia = null;
322 var _uploadOptions = null; 323 var _uploadOptions = null;
323 var _downloadOptions = commons.DownloadOptions.Metadata; 324 var _downloadOptions = commons.DownloadOptions.Metadata;
324 var _body = null; 325 var _body = null;
325 326
326 if (request != null) { 327 if (request != null) {
327 _body = convert.JSON.encode((request).toJson()); 328 _body = convert.JSON.encode((request).toJson());
328 } 329 }
329 if (resourceName == null) { 330 if (resourceName == null) {
330 throw new core.ArgumentError("Parameter resourceName is required."); 331 throw new core.ArgumentError("Parameter resourceName is required.");
331 } 332 }
332 333
333 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName'); 334 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName');
334 335
335 var _response = _requester.request(_url, 336 var _response = _requester.request(_url, "PUT",
336 "PUT", 337 body: _body,
337 body: _body, 338 queryParams: _queryParams,
338 queryParams: _queryParams, 339 uploadOptions: _uploadOptions,
339 uploadOptions: _uploadOptions, 340 uploadMedia: _uploadMedia,
340 uploadMedia: _uploadMedia, 341 downloadOptions: _downloadOptions);
341 downloadOptions: _downloadOptions);
342 return _response.then((data) => new ContactGroup.fromJson(data)); 342 return _response.then((data) => new ContactGroup.fromJson(data));
343 } 343 }
344
345 } 344 }
346 345
347
348 class ContactGroupsMembersResourceApi { 346 class ContactGroupsMembersResourceApi {
349 final commons.ApiRequester _requester; 347 final commons.ApiRequester _requester;
350 348
351 ContactGroupsMembersResourceApi(commons.ApiRequester client) : 349 ContactGroupsMembersResourceApi(commons.ApiRequester client)
352 _requester = client; 350 : _requester = client;
353 351
354 /** 352 /// Modify the members of a contact group owned by the authenticated user.
355 * Modify the members of a contact group owned by the authenticated user. 353 ///
356 * 354 /// [request] - The metadata request object.
357 * [request] - The metadata request object. 355 ///
358 * 356 /// Request parameters:
359 * Request parameters: 357 ///
360 * 358 /// [resourceName] - The resource name of the contact group to modify.
361 * [resourceName] - The resource name of the contact group to modify. 359 /// Value must have pattern "^contactGroups/[^/]+$".
362 * Value must have pattern "^contactGroups/[^/]+$". 360 ///
363 * 361 /// Completes with a [ModifyContactGroupMembersResponse].
364 * Completes with a [ModifyContactGroupMembersResponse]. 362 ///
365 * 363 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
366 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 364 /// an error.
367 * error. 365 ///
368 * 366 /// If the used [http.Client] completes with an error when making a REST
369 * If the used [http.Client] completes with an error when making a REST call, 367 /// call, this method will complete with the same error.
370 * this method will complete with the same error. 368 async.Future<ModifyContactGroupMembersResponse> modify(
371 */ 369 ModifyContactGroupMembersRequest request, core.String resourceName) {
372 async.Future<ModifyContactGroupMembersResponse> modify(ModifyContactGroupMembe rsRequest request, core.String resourceName) {
373 var _url = null; 370 var _url = null;
374 var _queryParams = new core.Map(); 371 var _queryParams = new core.Map();
375 var _uploadMedia = null; 372 var _uploadMedia = null;
376 var _uploadOptions = null; 373 var _uploadOptions = null;
377 var _downloadOptions = commons.DownloadOptions.Metadata; 374 var _downloadOptions = commons.DownloadOptions.Metadata;
378 var _body = null; 375 var _body = null;
379 376
380 if (request != null) { 377 if (request != null) {
381 _body = convert.JSON.encode((request).toJson()); 378 _body = convert.JSON.encode((request).toJson());
382 } 379 }
383 if (resourceName == null) { 380 if (resourceName == null) {
384 throw new core.ArgumentError("Parameter resourceName is required."); 381 throw new core.ArgumentError("Parameter resourceName is required.");
385 } 382 }
386 383
387 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName') + '/me mbers:modify'; 384 _url = 'v1/' +
385 commons.Escaper.ecapeVariableReserved('$resourceName') +
386 '/members:modify';
388 387
389 var _response = _requester.request(_url, 388 var _response = _requester.request(_url, "POST",
390 "POST", 389 body: _body,
391 body: _body, 390 queryParams: _queryParams,
392 queryParams: _queryParams, 391 uploadOptions: _uploadOptions,
393 uploadOptions: _uploadOptions, 392 uploadMedia: _uploadMedia,
394 uploadMedia: _uploadMedia, 393 downloadOptions: _downloadOptions);
395 downloadOptions: _downloadOptions); 394 return _response
396 return _response.then((data) => new ModifyContactGroupMembersResponse.fromJs on(data)); 395 .then((data) => new ModifyContactGroupMembersResponse.fromJson(data));
397 } 396 }
398
399 } 397 }
400 398
401
402 class PeopleResourceApi { 399 class PeopleResourceApi {
403 final commons.ApiRequester _requester; 400 final commons.ApiRequester _requester;
404 401
405 PeopleConnectionsResourceApi get connections => new PeopleConnectionsResourceA pi(_requester); 402 PeopleConnectionsResourceApi get connections =>
403 new PeopleConnectionsResourceApi(_requester);
406 404
407 PeopleResourceApi(commons.ApiRequester client) : 405 PeopleResourceApi(commons.ApiRequester client) : _requester = client;
408 _requester = client;
409 406
410 /** 407 /// Create a new contact and return the person resource for that contact.
411 * Create a new contact and return the person resource for that contact. 408 ///
412 * 409 /// [request] - The metadata request object.
413 * [request] - The metadata request object. 410 ///
414 * 411 /// Request parameters:
415 * Request parameters: 412 ///
416 * 413 /// [parent] - The resource name of the owning person resource.
417 * [parent] - The resource name of the owning person resource. 414 ///
418 * 415 /// Completes with a [Person].
419 * Completes with a [Person]. 416 ///
420 * 417 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
421 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 418 /// an error.
422 * error. 419 ///
423 * 420 /// If the used [http.Client] completes with an error when making a REST
424 * If the used [http.Client] completes with an error when making a REST call, 421 /// call, this method will complete with the same error.
425 * this method will complete with the same error.
426 */
427 async.Future<Person> createContact(Person request, {core.String parent}) { 422 async.Future<Person> createContact(Person request, {core.String parent}) {
428 var _url = null; 423 var _url = null;
429 var _queryParams = new core.Map(); 424 var _queryParams = new core.Map();
430 var _uploadMedia = null; 425 var _uploadMedia = null;
431 var _uploadOptions = null; 426 var _uploadOptions = null;
432 var _downloadOptions = commons.DownloadOptions.Metadata; 427 var _downloadOptions = commons.DownloadOptions.Metadata;
433 var _body = null; 428 var _body = null;
434 429
435 if (request != null) { 430 if (request != null) {
436 _body = convert.JSON.encode((request).toJson()); 431 _body = convert.JSON.encode((request).toJson());
437 } 432 }
438 if (parent != null) { 433 if (parent != null) {
439 _queryParams["parent"] = [parent]; 434 _queryParams["parent"] = [parent];
440 } 435 }
441 436
442 _url = 'v1/people:createContact'; 437 _url = 'v1/people:createContact';
443 438
444 var _response = _requester.request(_url, 439 var _response = _requester.request(_url, "POST",
445 "POST", 440 body: _body,
446 body: _body, 441 queryParams: _queryParams,
447 queryParams: _queryParams, 442 uploadOptions: _uploadOptions,
448 uploadOptions: _uploadOptions, 443 uploadMedia: _uploadMedia,
449 uploadMedia: _uploadMedia, 444 downloadOptions: _downloadOptions);
450 downloadOptions: _downloadOptions);
451 return _response.then((data) => new Person.fromJson(data)); 445 return _response.then((data) => new Person.fromJson(data));
452 } 446 }
453 447
454 /** 448 /// Delete a contact person. Any non-contact data will not be deleted.
455 * Delete a contact person. Any non-contact data will not be deleted. 449 ///
456 * 450 /// Request parameters:
457 * Request parameters: 451 ///
458 * 452 /// [resourceName] - The resource name of the contact to delete.
459 * [resourceName] - The resource name of the contact to delete. 453 /// Value must have pattern "^people/[^/]+$".
460 * Value must have pattern "^people/[^/]+$". 454 ///
461 * 455 /// Completes with a [Empty].
462 * Completes with a [Empty]. 456 ///
463 * 457 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
464 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 458 /// an error.
465 * error. 459 ///
466 * 460 /// If the used [http.Client] completes with an error when making a REST
467 * If the used [http.Client] completes with an error when making a REST call, 461 /// call, this method will complete with the same error.
468 * this method will complete with the same error.
469 */
470 async.Future<Empty> deleteContact(core.String resourceName) { 462 async.Future<Empty> deleteContact(core.String resourceName) {
471 var _url = null; 463 var _url = null;
472 var _queryParams = new core.Map(); 464 var _queryParams = new core.Map();
473 var _uploadMedia = null; 465 var _uploadMedia = null;
474 var _uploadOptions = null; 466 var _uploadOptions = null;
475 var _downloadOptions = commons.DownloadOptions.Metadata; 467 var _downloadOptions = commons.DownloadOptions.Metadata;
476 var _body = null; 468 var _body = null;
477 469
478 if (resourceName == null) { 470 if (resourceName == null) {
479 throw new core.ArgumentError("Parameter resourceName is required."); 471 throw new core.ArgumentError("Parameter resourceName is required.");
480 } 472 }
481 473
482 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName') + ':de leteContact'; 474 _url = 'v1/' +
475 commons.Escaper.ecapeVariableReserved('$resourceName') +
476 ':deleteContact';
483 477
484 var _response = _requester.request(_url, 478 var _response = _requester.request(_url, "DELETE",
485 "DELETE", 479 body: _body,
486 body: _body, 480 queryParams: _queryParams,
487 queryParams: _queryParams, 481 uploadOptions: _uploadOptions,
488 uploadOptions: _uploadOptions, 482 uploadMedia: _uploadMedia,
489 uploadMedia: _uploadMedia, 483 downloadOptions: _downloadOptions);
490 downloadOptions: _downloadOptions);
491 return _response.then((data) => new Empty.fromJson(data)); 484 return _response.then((data) => new Empty.fromJson(data));
492 } 485 }
493 486
494 /** 487 /// Provides information about a person by specifying a resource name. Use
495 * Provides information about a person by specifying a resource name. Use 488 /// `people/me` to indicate the authenticated user.
496 * `people/me` to indicate the authenticated user. 489 /// <br>
497 * <br> 490 /// The request throws a 400 error if 'personFields' is not specified.
498 * The request throws a 400 error if 'personFields' is not specified. 491 ///
499 * 492 /// Request parameters:
500 * Request parameters: 493 ///
501 * 494 /// [resourceName] - The resource name of the person to provide information
502 * [resourceName] - The resource name of the person to provide information 495 /// about.
503 * about. 496 ///
504 * 497 /// - To get information about the authenticated user, specify `people/me`.
505 * - To get information about the authenticated user, specify `people/me`. 498 /// - To get information about a google account, specify
506 * - To get information about a google account, specify 499 /// `people/`<var>account_id</var>.
507 * `people/`<var>account_id</var>. 500 /// - To get information about a contact, specify the resource name that
508 * - To get information about a contact, specify the resource name that 501 /// identifies the contact as returned by
509 * identifies the contact as returned by 502 /// [`people.connections.list`](/people/api/rest/v1/people.connections/list).
510 * [`people.connections.list`](/people/api/rest/v1/people.connections/list). 503 /// Value must have pattern "^people/[^/]+$".
511 * Value must have pattern "^people/[^/]+$". 504 ///
512 * 505 /// [personFields] - **Required.** A field mask to restrict which fields on
513 * [requestMask_includeField] - **Required.** Comma-separated list of person 506 /// the person are
514 * fields to be included in the 507 /// returned. Valid values are:
515 * response. Each path should start with `person.`: for example, 508 ///
516 * `person.names` or `person.photos`. 509 /// * addresses
517 * 510 /// * ageRanges
518 * [personFields] - **Required.** A field mask to restrict which fields on the 511 /// * biographies
519 * person are 512 /// * birthdays
520 * returned. Valid values are: 513 /// * braggingRights
521 * 514 /// * coverPhotos
522 * * addresses 515 /// * emailAddresses
523 * * ageRanges 516 /// * events
524 * * biographies 517 /// * genders
525 * * birthdays 518 /// * imClients
526 * * braggingRights 519 /// * interests
527 * * coverPhotos 520 /// * locales
528 * * emailAddresses 521 /// * memberships
529 * * events 522 /// * metadata
530 * * genders 523 /// * names
531 * * imClients 524 /// * nicknames
532 * * interests 525 /// * occupations
533 * * locales 526 /// * organizations
534 * * memberships 527 /// * phoneNumbers
535 * * metadata 528 /// * photos
536 * * names 529 /// * relations
537 * * nicknames 530 /// * relationshipInterests
538 * * occupations 531 /// * relationshipStatuses
539 * * organizations 532 /// * residences
540 * * phoneNumbers 533 /// * skills
541 * * photos 534 /// * taglines
542 * * relations 535 /// * urls
543 * * relationshipInterests 536 ///
544 * * relationshipStatuses 537 /// [requestMask_includeField] - **Required.** Comma-separated list of person
545 * * residences 538 /// fields to be included in the
546 * * skills 539 /// response. Each path should start with `person.`: for example,
547 * * taglines 540 /// `person.names` or `person.photos`.
548 * * urls 541 ///
549 * 542 /// Completes with a [Person].
550 * Completes with a [Person]. 543 ///
551 * 544 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
552 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 545 /// an error.
553 * error. 546 ///
554 * 547 /// If the used [http.Client] completes with an error when making a REST
555 * If the used [http.Client] completes with an error when making a REST call, 548 /// call, this method will complete with the same error.
556 * this method will complete with the same error. 549 async.Future<Person> get(core.String resourceName,
557 */ 550 {core.String personFields, core.String requestMask_includeField}) {
558 async.Future<Person> get(core.String resourceName, {core.String requestMask_in cludeField, core.String personFields}) {
559 var _url = null; 551 var _url = null;
560 var _queryParams = new core.Map(); 552 var _queryParams = new core.Map();
561 var _uploadMedia = null; 553 var _uploadMedia = null;
562 var _uploadOptions = null; 554 var _uploadOptions = null;
563 var _downloadOptions = commons.DownloadOptions.Metadata; 555 var _downloadOptions = commons.DownloadOptions.Metadata;
564 var _body = null; 556 var _body = null;
565 557
566 if (resourceName == null) { 558 if (resourceName == null) {
567 throw new core.ArgumentError("Parameter resourceName is required."); 559 throw new core.ArgumentError("Parameter resourceName is required.");
568 } 560 }
561 if (personFields != null) {
562 _queryParams["personFields"] = [personFields];
563 }
569 if (requestMask_includeField != null) { 564 if (requestMask_includeField != null) {
570 _queryParams["requestMask.includeField"] = [requestMask_includeField]; 565 _queryParams["requestMask.includeField"] = [requestMask_includeField];
571 } 566 }
572 if (personFields != null) {
573 _queryParams["personFields"] = [personFields];
574 }
575 567
576 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName'); 568 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName');
577 569
578 var _response = _requester.request(_url, 570 var _response = _requester.request(_url, "GET",
579 "GET", 571 body: _body,
580 body: _body, 572 queryParams: _queryParams,
581 queryParams: _queryParams, 573 uploadOptions: _uploadOptions,
582 uploadOptions: _uploadOptions, 574 uploadMedia: _uploadMedia,
583 uploadMedia: _uploadMedia, 575 downloadOptions: _downloadOptions);
584 downloadOptions: _downloadOptions);
585 return _response.then((data) => new Person.fromJson(data)); 576 return _response.then((data) => new Person.fromJson(data));
586 } 577 }
587 578
588 /** 579 /// Provides information about a list of specific people by specifying a list
589 * Provides information about a list of specific people by specifying a list 580 /// of requested resource names. Use `people/me` to indicate the
590 * of requested resource names. Use `people/me` to indicate the authenticated 581 /// authenticated
591 * user. 582 /// user.
592 * <br> 583 /// <br>
593 * The request throws a 400 error if 'personFields' is not specified. 584 /// The request throws a 400 error if 'personFields' is not specified.
594 * 585 ///
595 * Request parameters: 586 /// Request parameters:
596 * 587 ///
597 * [requestMask_includeField] - **Required.** Comma-separated list of person 588 /// [personFields] - **Required.** A field mask to restrict which fields on
598 * fields to be included in the 589 /// each person are
599 * response. Each path should start with `person.`: for example, 590 /// returned. Valid values are:
600 * `person.names` or `person.photos`. 591 ///
601 * 592 /// * addresses
602 * [resourceNames] - The resource names of the people to provide information 593 /// * ageRanges
603 * about. 594 /// * biographies
604 * 595 /// * birthdays
605 * - To get information about the authenticated user, specify `people/me`. 596 /// * braggingRights
606 * - To get information about a google account, specify 597 /// * coverPhotos
607 * `people/`<var>account_id</var>. 598 /// * emailAddresses
608 * - To get information about a contact, specify the resource name that 599 /// * events
609 * identifies the contact as returned by 600 /// * genders
610 * [`people.connections.list`](/people/api/rest/v1/people.connections/list). 601 /// * imClients
611 * 602 /// * interests
612 * You can include up to 50 resource names in one request. 603 /// * locales
613 * 604 /// * memberships
614 * [personFields] - **Required.** A field mask to restrict which fields on 605 /// * metadata
615 * each person are 606 /// * names
616 * returned. Valid values are: 607 /// * nicknames
617 * 608 /// * occupations
618 * * addresses 609 /// * organizations
619 * * ageRanges 610 /// * phoneNumbers
620 * * biographies 611 /// * photos
621 * * birthdays 612 /// * relations
622 * * braggingRights 613 /// * relationshipInterests
623 * * coverPhotos 614 /// * relationshipStatuses
624 * * emailAddresses 615 /// * residences
625 * * events 616 /// * skills
626 * * genders 617 /// * taglines
627 * * imClients 618 /// * urls
628 * * interests 619 ///
629 * * locales 620 /// [requestMask_includeField] - **Required.** Comma-separated list of person
630 * * memberships 621 /// fields to be included in the
631 * * metadata 622 /// response. Each path should start with `person.`: for example,
632 * * names 623 /// `person.names` or `person.photos`.
633 * * nicknames 624 ///
634 * * occupations 625 /// [resourceNames] - The resource names of the people to provide information
635 * * organizations 626 /// about.
636 * * phoneNumbers 627 ///
637 * * photos 628 /// - To get information about the authenticated user, specify `people/me`.
638 * * relations 629 /// - To get information about a google account, specify
639 * * relationshipInterests 630 /// `people/`<var>account_id</var>.
640 * * relationshipStatuses 631 /// - To get information about a contact, specify the resource name that
641 * * residences 632 /// identifies the contact as returned by
642 * * skills 633 /// [`people.connections.list`](/people/api/rest/v1/people.connections/list).
643 * * taglines 634 ///
644 * * urls 635 /// You can include up to 50 resource names in one request.
645 * 636 ///
646 * Completes with a [GetPeopleResponse]. 637 /// Completes with a [GetPeopleResponse].
647 * 638 ///
648 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 639 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
649 * error. 640 /// an error.
650 * 641 ///
651 * If the used [http.Client] completes with an error when making a REST call, 642 /// If the used [http.Client] completes with an error when making a REST
652 * this method will complete with the same error. 643 /// call, this method will complete with the same error.
653 */ 644 async.Future<GetPeopleResponse> getBatchGet(
654 async.Future<GetPeopleResponse> getBatchGet({core.String requestMask_includeFi eld, core.List<core.String> resourceNames, core.String personFields}) { 645 {core.String personFields,
646 core.String requestMask_includeField,
647 core.List<core.String> resourceNames}) {
655 var _url = null; 648 var _url = null;
656 var _queryParams = new core.Map(); 649 var _queryParams = new core.Map();
657 var _uploadMedia = null; 650 var _uploadMedia = null;
658 var _uploadOptions = null; 651 var _uploadOptions = null;
659 var _downloadOptions = commons.DownloadOptions.Metadata; 652 var _downloadOptions = commons.DownloadOptions.Metadata;
660 var _body = null; 653 var _body = null;
661 654
655 if (personFields != null) {
656 _queryParams["personFields"] = [personFields];
657 }
662 if (requestMask_includeField != null) { 658 if (requestMask_includeField != null) {
663 _queryParams["requestMask.includeField"] = [requestMask_includeField]; 659 _queryParams["requestMask.includeField"] = [requestMask_includeField];
664 } 660 }
665 if (resourceNames != null) { 661 if (resourceNames != null) {
666 _queryParams["resourceNames"] = resourceNames; 662 _queryParams["resourceNames"] = resourceNames;
667 } 663 }
668 if (personFields != null) {
669 _queryParams["personFields"] = [personFields];
670 }
671 664
672 _url = 'v1/people:batchGet'; 665 _url = 'v1/people:batchGet';
673 666
674 var _response = _requester.request(_url, 667 var _response = _requester.request(_url, "GET",
675 "GET", 668 body: _body,
676 body: _body, 669 queryParams: _queryParams,
677 queryParams: _queryParams, 670 uploadOptions: _uploadOptions,
678 uploadOptions: _uploadOptions, 671 uploadMedia: _uploadMedia,
679 uploadMedia: _uploadMedia, 672 downloadOptions: _downloadOptions);
680 downloadOptions: _downloadOptions);
681 return _response.then((data) => new GetPeopleResponse.fromJson(data)); 673 return _response.then((data) => new GetPeopleResponse.fromJson(data));
682 } 674 }
683 675
684 /** 676 /// Update contact data for an existing contact person. Any non-contact data
685 * Update contact data for an existing contact person. Any non-contact data 677 /// will not be modified.
686 * will not be modified. 678 ///
687 * 679 /// The request throws a 400 error if `updatePersonFields` is not specified.
688 * The request throws a 400 error if `updatePersonFields` is not specified. 680 /// <br>
689 * <br> 681 /// The request throws a 400 error if `person.metadata.sources` is not
690 * The request throws a 400 error if `person.metadata.sources` is not 682 /// specified for the contact to be updated.
691 * specified for the contact to be updated. 683 /// <br>
692 * <br> 684 /// The request throws a 412 error if `person.metadata.sources.etag` is
693 * The request throws a 412 error if `person.metadata.sources.etag` is 685 /// different than the contact's etag, which indicates the contact has
694 * different than the contact's etag, which indicates the contact has changed 686 /// changed
695 * since its data was read. Clients should get the latest person and re-apply 687 /// since its data was read. Clients should get the latest person and
696 * their updates to the latest person. 688 /// re-apply
697 * 689 /// their updates to the latest person.
698 * [request] - The metadata request object. 690 ///
699 * 691 /// [request] - The metadata request object.
700 * Request parameters: 692 ///
701 * 693 /// Request parameters:
702 * [resourceName] - The resource name for the person, assigned by the server. 694 ///
703 * An ASCII string 695 /// [resourceName] - The resource name for the person, assigned by the
704 * with a max length of 27 characters, in the form of 696 /// server. An ASCII string
705 * `people/`<var>person_id</var>. 697 /// with a max length of 27 characters, in the form of
706 * Value must have pattern "^people/[^/]+$". 698 /// `people/`<var>person_id</var>.
707 * 699 /// Value must have pattern "^people/[^/]+$".
708 * [updatePersonFields] - **Required.** A field mask to restrict which fields 700 ///
709 * on the person are 701 /// [updatePersonFields] - **Required.** A field mask to restrict which
710 * updated. Valid values are: 702 /// fields on the person are
711 * 703 /// updated. Valid values are:
712 * * addresses 704 ///
713 * * biographies 705 /// * addresses
714 * * birthdays 706 /// * biographies
715 * * braggingRights 707 /// * birthdays
716 * * emailAddresses 708 /// * braggingRights
717 * * events 709 /// * emailAddresses
718 * * genders 710 /// * events
719 * * imClients 711 /// * genders
720 * * interests 712 /// * imClients
721 * * locales 713 /// * interests
722 * * names 714 /// * locales
723 * * nicknames 715 /// * names
724 * * occupations 716 /// * nicknames
725 * * organizations 717 /// * occupations
726 * * phoneNumbers 718 /// * organizations
727 * * relations 719 /// * phoneNumbers
728 * * residences 720 /// * relations
729 * * skills 721 /// * residences
730 * * urls 722 /// * skills
731 * 723 /// * urls
732 * Completes with a [Person]. 724 ///
733 * 725 /// Completes with a [Person].
734 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 726 ///
735 * error. 727 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
736 * 728 /// an error.
737 * If the used [http.Client] completes with an error when making a REST call, 729 ///
738 * this method will complete with the same error. 730 /// If the used [http.Client] completes with an error when making a REST
739 */ 731 /// call, this method will complete with the same error.
740 async.Future<Person> updateContact(Person request, core.String resourceName, { core.String updatePersonFields}) { 732 async.Future<Person> updateContact(Person request, core.String resourceName,
733 {core.String updatePersonFields}) {
741 var _url = null; 734 var _url = null;
742 var _queryParams = new core.Map(); 735 var _queryParams = new core.Map();
743 var _uploadMedia = null; 736 var _uploadMedia = null;
744 var _uploadOptions = null; 737 var _uploadOptions = null;
745 var _downloadOptions = commons.DownloadOptions.Metadata; 738 var _downloadOptions = commons.DownloadOptions.Metadata;
746 var _body = null; 739 var _body = null;
747 740
748 if (request != null) { 741 if (request != null) {
749 _body = convert.JSON.encode((request).toJson()); 742 _body = convert.JSON.encode((request).toJson());
750 } 743 }
751 if (resourceName == null) { 744 if (resourceName == null) {
752 throw new core.ArgumentError("Parameter resourceName is required."); 745 throw new core.ArgumentError("Parameter resourceName is required.");
753 } 746 }
754 if (updatePersonFields != null) { 747 if (updatePersonFields != null) {
755 _queryParams["updatePersonFields"] = [updatePersonFields]; 748 _queryParams["updatePersonFields"] = [updatePersonFields];
756 } 749 }
757 750
758 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName') + ':up dateContact'; 751 _url = 'v1/' +
752 commons.Escaper.ecapeVariableReserved('$resourceName') +
753 ':updateContact';
759 754
760 var _response = _requester.request(_url, 755 var _response = _requester.request(_url, "PATCH",
761 "PATCH", 756 body: _body,
762 body: _body, 757 queryParams: _queryParams,
763 queryParams: _queryParams, 758 uploadOptions: _uploadOptions,
764 uploadOptions: _uploadOptions, 759 uploadMedia: _uploadMedia,
765 uploadMedia: _uploadMedia, 760 downloadOptions: _downloadOptions);
766 downloadOptions: _downloadOptions);
767 return _response.then((data) => new Person.fromJson(data)); 761 return _response.then((data) => new Person.fromJson(data));
768 } 762 }
769
770 } 763 }
771 764
772
773 class PeopleConnectionsResourceApi { 765 class PeopleConnectionsResourceApi {
774 final commons.ApiRequester _requester; 766 final commons.ApiRequester _requester;
775 767
776 PeopleConnectionsResourceApi(commons.ApiRequester client) : 768 PeopleConnectionsResourceApi(commons.ApiRequester client)
777 _requester = client; 769 : _requester = client;
778 770
779 /** 771 /// Provides a list of the authenticated user's contacts merged with any
780 * Provides a list of the authenticated user's contacts merged with any 772 /// connected profiles.
781 * connected profiles. 773 /// <br>
782 * <br> 774 /// The request throws a 400 error if 'personFields' is not specified.
783 * The request throws a 400 error if 'personFields' is not specified. 775 ///
784 * 776 /// Request parameters:
785 * Request parameters: 777 ///
786 * 778 /// [resourceName] - The resource name to return connections for. Only
787 * [resourceName] - The resource name to return connections for. Only 779 /// `people/me` is valid.
788 * `people/me` is valid. 780 /// Value must have pattern "^people/[^/]+$".
789 * Value must have pattern "^people/[^/]+$". 781 ///
790 * 782 /// [sortOrder] - The order in which the connections should be sorted.
791 * [personFields] - **Required.** A field mask to restrict which fields on 783 /// Defaults to
792 * each person are 784 /// `LAST_MODIFIED_ASCENDING`.
793 * returned. Valid values are: 785 /// Possible string values are:
794 * 786 /// - "LAST_MODIFIED_ASCENDING" : A LAST_MODIFIED_ASCENDING.
795 * * addresses 787 /// - "FIRST_NAME_ASCENDING" : A FIRST_NAME_ASCENDING.
796 * * ageRanges 788 /// - "LAST_NAME_ASCENDING" : A LAST_NAME_ASCENDING.
797 * * biographies 789 ///
798 * * birthdays 790 /// [requestSyncToken] - Whether the response should include a sync token,
799 * * braggingRights 791 /// which can be used to get
800 * * coverPhotos 792 /// all changes since the last request.
801 * * emailAddresses 793 ///
802 * * events 794 /// [pageToken] - The token of the page to be returned.
803 * * genders 795 ///
804 * * imClients 796 /// [pageSize] - The number of connections to include in the response. Valid
805 * * interests 797 /// values are
806 * * locales 798 /// between 1 and 2000, inclusive. Defaults to 100.
807 * * memberships 799 ///
808 * * metadata 800 /// [requestMask_includeField] - **Required.** Comma-separated list of person
809 * * names 801 /// fields to be included in the
810 * * nicknames 802 /// response. Each path should start with `person.`: for example,
811 * * occupations 803 /// `person.names` or `person.photos`.
812 * * organizations 804 ///
813 * * phoneNumbers 805 /// [syncToken] - A sync token, returned by a previous call to
814 * * photos 806 /// `people.connections.list`.
815 * * relations 807 /// Only resources changed since the sync token was created will be returned.
816 * * relationshipInterests 808 ///
817 * * relationshipStatuses 809 /// [personFields] - **Required.** A field mask to restrict which fields on
818 * * residences 810 /// each person are
819 * * skills 811 /// returned. Valid values are:
820 * * taglines 812 ///
821 * * urls 813 /// * addresses
822 * 814 /// * ageRanges
823 * [sortOrder] - The order in which the connections should be sorted. Defaults 815 /// * biographies
824 * to 816 /// * birthdays
825 * `LAST_MODIFIED_ASCENDING`. 817 /// * braggingRights
826 * Possible string values are: 818 /// * coverPhotos
827 * - "LAST_MODIFIED_ASCENDING" : A LAST_MODIFIED_ASCENDING. 819 /// * emailAddresses
828 * - "FIRST_NAME_ASCENDING" : A FIRST_NAME_ASCENDING. 820 /// * events
829 * - "LAST_NAME_ASCENDING" : A LAST_NAME_ASCENDING. 821 /// * genders
830 * 822 /// * imClients
831 * [requestSyncToken] - Whether the response should include a sync token, 823 /// * interests
832 * which can be used to get 824 /// * locales
833 * all changes since the last request. 825 /// * memberships
834 * 826 /// * metadata
835 * [pageToken] - The token of the page to be returned. 827 /// * names
836 * 828 /// * nicknames
837 * [requestMask_includeField] - **Required.** Comma-separated list of person 829 /// * occupations
838 * fields to be included in the 830 /// * organizations
839 * response. Each path should start with `person.`: for example, 831 /// * phoneNumbers
840 * `person.names` or `person.photos`. 832 /// * photos
841 * 833 /// * relations
842 * [pageSize] - The number of connections to include in the response. Valid 834 /// * relationshipInterests
843 * values are 835 /// * relationshipStatuses
844 * between 1 and 2000, inclusive. Defaults to 100. 836 /// * residences
845 * 837 /// * skills
846 * [syncToken] - A sync token, returned by a previous call to 838 /// * taglines
847 * `people.connections.list`. 839 /// * urls
848 * Only resources changed since the sync token was created will be returned. 840 ///
849 * 841 /// Completes with a [ListConnectionsResponse].
850 * Completes with a [ListConnectionsResponse]. 842 ///
851 * 843 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
852 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 844 /// an error.
853 * error. 845 ///
854 * 846 /// If the used [http.Client] completes with an error when making a REST
855 * If the used [http.Client] completes with an error when making a REST call, 847 /// call, this method will complete with the same error.
856 * this method will complete with the same error. 848 async.Future<ListConnectionsResponse> list(core.String resourceName,
857 */ 849 {core.String sortOrder,
858 async.Future<ListConnectionsResponse> list(core.String resourceName, {core.Str ing personFields, core.String sortOrder, core.bool requestSyncToken, core.String pageToken, core.String requestMask_includeField, core.int pageSize, core.String syncToken}) { 850 core.bool requestSyncToken,
851 core.String pageToken,
852 core.int pageSize,
853 core.String requestMask_includeField,
854 core.String syncToken,
855 core.String personFields}) {
859 var _url = null; 856 var _url = null;
860 var _queryParams = new core.Map(); 857 var _queryParams = new core.Map();
861 var _uploadMedia = null; 858 var _uploadMedia = null;
862 var _uploadOptions = null; 859 var _uploadOptions = null;
863 var _downloadOptions = commons.DownloadOptions.Metadata; 860 var _downloadOptions = commons.DownloadOptions.Metadata;
864 var _body = null; 861 var _body = null;
865 862
866 if (resourceName == null) { 863 if (resourceName == null) {
867 throw new core.ArgumentError("Parameter resourceName is required."); 864 throw new core.ArgumentError("Parameter resourceName is required.");
868 } 865 }
869 if (personFields != null) {
870 _queryParams["personFields"] = [personFields];
871 }
872 if (sortOrder != null) { 866 if (sortOrder != null) {
873 _queryParams["sortOrder"] = [sortOrder]; 867 _queryParams["sortOrder"] = [sortOrder];
874 } 868 }
875 if (requestSyncToken != null) { 869 if (requestSyncToken != null) {
876 _queryParams["requestSyncToken"] = ["${requestSyncToken}"]; 870 _queryParams["requestSyncToken"] = ["${requestSyncToken}"];
877 } 871 }
878 if (pageToken != null) { 872 if (pageToken != null) {
879 _queryParams["pageToken"] = [pageToken]; 873 _queryParams["pageToken"] = [pageToken];
880 } 874 }
875 if (pageSize != null) {
876 _queryParams["pageSize"] = ["${pageSize}"];
877 }
881 if (requestMask_includeField != null) { 878 if (requestMask_includeField != null) {
882 _queryParams["requestMask.includeField"] = [requestMask_includeField]; 879 _queryParams["requestMask.includeField"] = [requestMask_includeField];
883 } 880 }
884 if (pageSize != null) {
885 _queryParams["pageSize"] = ["${pageSize}"];
886 }
887 if (syncToken != null) { 881 if (syncToken != null) {
888 _queryParams["syncToken"] = [syncToken]; 882 _queryParams["syncToken"] = [syncToken];
889 } 883 }
884 if (personFields != null) {
885 _queryParams["personFields"] = [personFields];
886 }
890 887
891 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName') + '/co nnections'; 888 _url = 'v1/' +
889 commons.Escaper.ecapeVariableReserved('$resourceName') +
890 '/connections';
892 891
893 var _response = _requester.request(_url, 892 var _response = _requester.request(_url, "GET",
894 "GET", 893 body: _body,
895 body: _body, 894 queryParams: _queryParams,
896 queryParams: _queryParams, 895 uploadOptions: _uploadOptions,
897 uploadOptions: _uploadOptions, 896 uploadMedia: _uploadMedia,
898 uploadMedia: _uploadMedia, 897 downloadOptions: _downloadOptions);
899 downloadOptions: _downloadOptions);
900 return _response.then((data) => new ListConnectionsResponse.fromJson(data)); 898 return _response.then((data) => new ListConnectionsResponse.fromJson(data));
901 } 899 }
902
903 } 900 }
904 901
902 /// A person's physical address. May be a P.O. box or street address. All
903 /// fields
904 /// are optional.
905 class Address {
906 /// The city of the address.
907 core.String city;
905 908
909 /// The country of the address.
910 core.String country;
906 911
907 /** 912 /// The [ISO 3166-1 alpha-2](http://www.iso.org/iso/country_codes.htm)
908 * A person's physical address. May be a P.O. box or street address. All fields 913 /// country
909 * are optional. 914 /// code of the address.
910 */
911 class Address {
912 /** The city of the address. */
913 core.String city;
914 /** The country of the address. */
915 core.String country;
916 /**
917 * The [ISO 3166-1 alpha-2](http://www.iso.org/iso/country_codes.htm) country
918 * code of the address.
919 */
920 core.String countryCode; 915 core.String countryCode;
921 /** 916
922 * The extended address of the address; for example, the apartment number. 917 /// The extended address of the address; for example, the apartment number.
923 */
924 core.String extendedAddress; 918 core.String extendedAddress;
925 /** 919
926 * The read-only type of the address translated and formatted in the viewer's 920 /// The read-only type of the address translated and formatted in the
927 * account locale or the `Accept-Language` HTTP header locale. 921 /// viewer's
928 */ 922 /// account locale or the `Accept-Language` HTTP header locale.
929 core.String formattedType; 923 core.String formattedType;
930 /** 924
931 * The unstructured value of the address. If this is not set by the user it 925 /// The unstructured value of the address. If this is not set by the user it
932 * will be automatically constructed from structured values. 926 /// will be automatically constructed from structured values.
933 */
934 core.String formattedValue; 927 core.String formattedValue;
935 /** Metadata about the address. */ 928
929 /// Metadata about the address.
936 FieldMetadata metadata; 930 FieldMetadata metadata;
937 /** The P.O. box of the address. */ 931
932 /// The P.O. box of the address.
938 core.String poBox; 933 core.String poBox;
939 /** The postal code of the address. */ 934
935 /// The postal code of the address.
940 core.String postalCode; 936 core.String postalCode;
941 /** The region of the address; for example, the state or province. */ 937
938 /// The region of the address; for example, the state or province.
942 core.String region; 939 core.String region;
943 /** The street address. */ 940
941 /// The street address.
944 core.String streetAddress; 942 core.String streetAddress;
945 /** 943
946 * The type of the address. The type can be custom or predefined. 944 /// The type of the address. The type can be custom or predefined.
947 * Possible values include, but are not limited to, the following: 945 /// Possible values include, but are not limited to, the following:
948 * 946 ///
949 * * `home` 947 /// * `home`
950 * * `work` 948 /// * `work`
951 * * `other` 949 /// * `other`
952 */
953 core.String type; 950 core.String type;
954 951
955 Address(); 952 Address();
956 953
957 Address.fromJson(core.Map _json) { 954 Address.fromJson(core.Map _json) {
958 if (_json.containsKey("city")) { 955 if (_json.containsKey("city")) {
959 city = _json["city"]; 956 city = _json["city"];
960 } 957 }
961 if (_json.containsKey("country")) { 958 if (_json.containsKey("country")) {
962 country = _json["country"]; 959 country = _json["country"];
(...skipping 24 matching lines...) Expand all
987 } 984 }
988 if (_json.containsKey("streetAddress")) { 985 if (_json.containsKey("streetAddress")) {
989 streetAddress = _json["streetAddress"]; 986 streetAddress = _json["streetAddress"];
990 } 987 }
991 if (_json.containsKey("type")) { 988 if (_json.containsKey("type")) {
992 type = _json["type"]; 989 type = _json["type"];
993 } 990 }
994 } 991 }
995 992
996 core.Map<core.String, core.Object> toJson() { 993 core.Map<core.String, core.Object> toJson() {
997 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 994 final core.Map<core.String, core.Object> _json =
995 new core.Map<core.String, core.Object>();
998 if (city != null) { 996 if (city != null) {
999 _json["city"] = city; 997 _json["city"] = city;
1000 } 998 }
1001 if (country != null) { 999 if (country != null) {
1002 _json["country"] = country; 1000 _json["country"] = country;
1003 } 1001 }
1004 if (countryCode != null) { 1002 if (countryCode != null) {
1005 _json["countryCode"] = countryCode; 1003 _json["countryCode"] = countryCode;
1006 } 1004 }
1007 if (extendedAddress != null) { 1005 if (extendedAddress != null) {
(...skipping 20 matching lines...) Expand all
1028 if (streetAddress != null) { 1026 if (streetAddress != null) {
1029 _json["streetAddress"] = streetAddress; 1027 _json["streetAddress"] = streetAddress;
1030 } 1028 }
1031 if (type != null) { 1029 if (type != null) {
1032 _json["type"] = type; 1030 _json["type"] = type;
1033 } 1031 }
1034 return _json; 1032 return _json;
1035 } 1033 }
1036 } 1034 }
1037 1035
1038 /** A person's age range. */ 1036 /// A person's age range.
1039 class AgeRangeType { 1037 class AgeRangeType {
1040 /** 1038 /// The age range.
1041 * The age range. 1039 /// Possible string values are:
1042 * Possible string values are: 1040 /// - "AGE_RANGE_UNSPECIFIED" : Unspecified.
1043 * - "AGE_RANGE_UNSPECIFIED" : Unspecified. 1041 /// - "LESS_THAN_EIGHTEEN" : Younger than eighteen.
1044 * - "LESS_THAN_EIGHTEEN" : Younger than eighteen. 1042 /// - "EIGHTEEN_TO_TWENTY" : Between eighteen and twenty.
1045 * - "EIGHTEEN_TO_TWENTY" : Between eighteen and twenty. 1043 /// - "TWENTY_ONE_OR_OLDER" : Twenty-one and older.
1046 * - "TWENTY_ONE_OR_OLDER" : Twenty-one and older.
1047 */
1048 core.String ageRange; 1044 core.String ageRange;
1049 /** Metadata about the age range. */ 1045
1046 /// Metadata about the age range.
1050 FieldMetadata metadata; 1047 FieldMetadata metadata;
1051 1048
1052 AgeRangeType(); 1049 AgeRangeType();
1053 1050
1054 AgeRangeType.fromJson(core.Map _json) { 1051 AgeRangeType.fromJson(core.Map _json) {
1055 if (_json.containsKey("ageRange")) { 1052 if (_json.containsKey("ageRange")) {
1056 ageRange = _json["ageRange"]; 1053 ageRange = _json["ageRange"];
1057 } 1054 }
1058 if (_json.containsKey("metadata")) { 1055 if (_json.containsKey("metadata")) {
1059 metadata = new FieldMetadata.fromJson(_json["metadata"]); 1056 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1060 } 1057 }
1061 } 1058 }
1062 1059
1063 core.Map<core.String, core.Object> toJson() { 1060 core.Map<core.String, core.Object> toJson() {
1064 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1061 final core.Map<core.String, core.Object> _json =
1062 new core.Map<core.String, core.Object>();
1065 if (ageRange != null) { 1063 if (ageRange != null) {
1066 _json["ageRange"] = ageRange; 1064 _json["ageRange"] = ageRange;
1067 } 1065 }
1068 if (metadata != null) { 1066 if (metadata != null) {
1069 _json["metadata"] = (metadata).toJson(); 1067 _json["metadata"] = (metadata).toJson();
1070 } 1068 }
1071 return _json; 1069 return _json;
1072 } 1070 }
1073 } 1071 }
1074 1072
1075 /** The response to a batch get contact groups request. */ 1073 /// The response to a batch get contact groups request.
1076 class BatchGetContactGroupsResponse { 1074 class BatchGetContactGroupsResponse {
1077 /** The list of responses for each requested contact group resource. */ 1075 /// The list of responses for each requested contact group resource.
1078 core.List<ContactGroupResponse> responses; 1076 core.List<ContactGroupResponse> responses;
1079 1077
1080 BatchGetContactGroupsResponse(); 1078 BatchGetContactGroupsResponse();
1081 1079
1082 BatchGetContactGroupsResponse.fromJson(core.Map _json) { 1080 BatchGetContactGroupsResponse.fromJson(core.Map _json) {
1083 if (_json.containsKey("responses")) { 1081 if (_json.containsKey("responses")) {
1084 responses = _json["responses"].map((value) => new ContactGroupResponse.fro mJson(value)).toList(); 1082 responses = _json["responses"]
1083 .map((value) => new ContactGroupResponse.fromJson(value))
1084 .toList();
1085 } 1085 }
1086 } 1086 }
1087 1087
1088 core.Map<core.String, core.Object> toJson() { 1088 core.Map<core.String, core.Object> toJson() {
1089 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1089 final core.Map<core.String, core.Object> _json =
1090 new core.Map<core.String, core.Object>();
1090 if (responses != null) { 1091 if (responses != null) {
1091 _json["responses"] = responses.map((value) => (value).toJson()).toList(); 1092 _json["responses"] = responses.map((value) => (value).toJson()).toList();
1092 } 1093 }
1093 return _json; 1094 return _json;
1094 } 1095 }
1095 } 1096 }
1096 1097
1097 /** A person's short biography. */ 1098 /// A person's short biography.
1098 class Biography { 1099 class Biography {
1099 /** 1100 /// The content type of the biography.
1100 * The content type of the biography. 1101 /// Possible string values are:
1101 * Possible string values are: 1102 /// - "CONTENT_TYPE_UNSPECIFIED" : Unspecified.
1102 * - "CONTENT_TYPE_UNSPECIFIED" : Unspecified. 1103 /// - "TEXT_PLAIN" : Plain text.
1103 * - "TEXT_PLAIN" : Plain text. 1104 /// - "TEXT_HTML" : HTML text.
1104 * - "TEXT_HTML" : HTML text.
1105 */
1106 core.String contentType; 1105 core.String contentType;
1107 /** Metadata about the biography. */ 1106
1107 /// Metadata about the biography.
1108 FieldMetadata metadata; 1108 FieldMetadata metadata;
1109 /** The short biography. */ 1109
1110 /// The short biography.
1110 core.String value; 1111 core.String value;
1111 1112
1112 Biography(); 1113 Biography();
1113 1114
1114 Biography.fromJson(core.Map _json) { 1115 Biography.fromJson(core.Map _json) {
1115 if (_json.containsKey("contentType")) { 1116 if (_json.containsKey("contentType")) {
1116 contentType = _json["contentType"]; 1117 contentType = _json["contentType"];
1117 } 1118 }
1118 if (_json.containsKey("metadata")) { 1119 if (_json.containsKey("metadata")) {
1119 metadata = new FieldMetadata.fromJson(_json["metadata"]); 1120 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1120 } 1121 }
1121 if (_json.containsKey("value")) { 1122 if (_json.containsKey("value")) {
1122 value = _json["value"]; 1123 value = _json["value"];
1123 } 1124 }
1124 } 1125 }
1125 1126
1126 core.Map<core.String, core.Object> toJson() { 1127 core.Map<core.String, core.Object> toJson() {
1127 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1128 final core.Map<core.String, core.Object> _json =
1129 new core.Map<core.String, core.Object>();
1128 if (contentType != null) { 1130 if (contentType != null) {
1129 _json["contentType"] = contentType; 1131 _json["contentType"] = contentType;
1130 } 1132 }
1131 if (metadata != null) { 1133 if (metadata != null) {
1132 _json["metadata"] = (metadata).toJson(); 1134 _json["metadata"] = (metadata).toJson();
1133 } 1135 }
1134 if (value != null) { 1136 if (value != null) {
1135 _json["value"] = value; 1137 _json["value"] = value;
1136 } 1138 }
1137 return _json; 1139 return _json;
1138 } 1140 }
1139 } 1141 }
1140 1142
1141 /** 1143 /// A person's birthday. At least one of the `date` and `text` fields are
1142 * A person's birthday. At least one of the `date` and `text` fields are 1144 /// specified. The `date` and `text` fields typically represent the same
1143 * specified. The `date` and `text` fields typically represent the same 1145 /// date, but are not guaranteed to.
1144 * date, but are not guaranteed to.
1145 */
1146 class Birthday { 1146 class Birthday {
1147 /** The date of the birthday. */ 1147 /// The date of the birthday.
1148 Date date; 1148 Date date;
1149 /** Metadata about the birthday. */ 1149
1150 /// Metadata about the birthday.
1150 FieldMetadata metadata; 1151 FieldMetadata metadata;
1151 /** A free-form string representing the user's birthday. */ 1152
1153 /// A free-form string representing the user's birthday.
1152 core.String text; 1154 core.String text;
1153 1155
1154 Birthday(); 1156 Birthday();
1155 1157
1156 Birthday.fromJson(core.Map _json) { 1158 Birthday.fromJson(core.Map _json) {
1157 if (_json.containsKey("date")) { 1159 if (_json.containsKey("date")) {
1158 date = new Date.fromJson(_json["date"]); 1160 date = new Date.fromJson(_json["date"]);
1159 } 1161 }
1160 if (_json.containsKey("metadata")) { 1162 if (_json.containsKey("metadata")) {
1161 metadata = new FieldMetadata.fromJson(_json["metadata"]); 1163 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1162 } 1164 }
1163 if (_json.containsKey("text")) { 1165 if (_json.containsKey("text")) {
1164 text = _json["text"]; 1166 text = _json["text"];
1165 } 1167 }
1166 } 1168 }
1167 1169
1168 core.Map<core.String, core.Object> toJson() { 1170 core.Map<core.String, core.Object> toJson() {
1169 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1171 final core.Map<core.String, core.Object> _json =
1172 new core.Map<core.String, core.Object>();
1170 if (date != null) { 1173 if (date != null) {
1171 _json["date"] = (date).toJson(); 1174 _json["date"] = (date).toJson();
1172 } 1175 }
1173 if (metadata != null) { 1176 if (metadata != null) {
1174 _json["metadata"] = (metadata).toJson(); 1177 _json["metadata"] = (metadata).toJson();
1175 } 1178 }
1176 if (text != null) { 1179 if (text != null) {
1177 _json["text"] = text; 1180 _json["text"] = text;
1178 } 1181 }
1179 return _json; 1182 return _json;
1180 } 1183 }
1181 } 1184 }
1182 1185
1183 /** A person's bragging rights. */ 1186 /// A person's bragging rights.
1184 class BraggingRights { 1187 class BraggingRights {
1185 /** Metadata about the bragging rights. */ 1188 /// Metadata about the bragging rights.
1186 FieldMetadata metadata; 1189 FieldMetadata metadata;
1187 /** The bragging rights; for example, `climbed mount everest`. */ 1190
1191 /// The bragging rights; for example, `climbed mount everest`.
1188 core.String value; 1192 core.String value;
1189 1193
1190 BraggingRights(); 1194 BraggingRights();
1191 1195
1192 BraggingRights.fromJson(core.Map _json) { 1196 BraggingRights.fromJson(core.Map _json) {
1193 if (_json.containsKey("metadata")) { 1197 if (_json.containsKey("metadata")) {
1194 metadata = new FieldMetadata.fromJson(_json["metadata"]); 1198 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1195 } 1199 }
1196 if (_json.containsKey("value")) { 1200 if (_json.containsKey("value")) {
1197 value = _json["value"]; 1201 value = _json["value"];
1198 } 1202 }
1199 } 1203 }
1200 1204
1201 core.Map<core.String, core.Object> toJson() { 1205 core.Map<core.String, core.Object> toJson() {
1202 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1206 final core.Map<core.String, core.Object> _json =
1207 new core.Map<core.String, core.Object>();
1203 if (metadata != null) { 1208 if (metadata != null) {
1204 _json["metadata"] = (metadata).toJson(); 1209 _json["metadata"] = (metadata).toJson();
1205 } 1210 }
1206 if (value != null) { 1211 if (value != null) {
1207 _json["value"] = value; 1212 _json["value"] = value;
1208 } 1213 }
1209 return _json; 1214 return _json;
1210 } 1215 }
1211 } 1216 }
1212 1217
1213 /** A contact group. */ 1218 /// A contact group.
1214 class ContactGroup { 1219 class ContactGroup {
1215 /** 1220 /// The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the
1216 * The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the 1221 /// resource. Used for web cache validation.
1217 * resource. Used for web cache validation.
1218 */
1219 core.String etag; 1222 core.String etag;
1220 /** 1223
1221 * The read-only name translated and formatted in the viewer's account locale 1224 /// The read-only name translated and formatted in the viewer's account
1222 * or the `Accept-Language` HTTP header locale for system groups names. 1225 /// locale
1223 * Group names set by the owner are the same as name. 1226 /// or the `Accept-Language` HTTP header locale for system groups names.
1224 */ 1227 /// Group names set by the owner are the same as name.
1225 core.String formattedName; 1228 core.String formattedName;
1226 /** 1229
1227 * The read-only contact group type. 1230 /// The read-only contact group type.
1228 * Possible string values are: 1231 /// Possible string values are:
1229 * - "GROUP_TYPE_UNSPECIFIED" : Unspecified. 1232 /// - "GROUP_TYPE_UNSPECIFIED" : Unspecified.
1230 * - "USER_CONTACT_GROUP" : User defined contact group. 1233 /// - "USER_CONTACT_GROUP" : User defined contact group.
1231 * - "SYSTEM_CONTACT_GROUP" : System defined contact group. 1234 /// - "SYSTEM_CONTACT_GROUP" : System defined contact group.
1232 */
1233 core.String groupType; 1235 core.String groupType;
1234 /** 1236
1235 * The total number of contacts in the group irrespective of max members in 1237 /// The total number of contacts in the group irrespective of max members in
1236 * specified in the request. 1238 /// specified in the request.
1237 */
1238 core.int memberCount; 1239 core.int memberCount;
1239 /** 1240
1240 * The list of contact person resource names that are members of the contact 1241 /// The list of contact person resource names that are members of the contact
1241 * group. The field is not populated for LIST requests and can only be updated 1242 /// group. The field is not populated for LIST requests and can only be
1242 * through the 1243 /// updated
1243 * [ModifyContactGroupMembers](/people/api/rest/v1/contactgroups/members/modif y). 1244 /// through the
1244 */ 1245 /// [ModifyContactGroupMembers](/people/api/rest/v1/contactgroups/members/modi fy).
1245 core.List<core.String> memberResourceNames; 1246 core.List<core.String> memberResourceNames;
1246 /** Metadata about the contact group. */ 1247
1248 /// Metadata about the contact group.
1247 ContactGroupMetadata metadata; 1249 ContactGroupMetadata metadata;
1248 /** 1250
1249 * The contact group name set by the group owner or a system provided name 1251 /// The contact group name set by the group owner or a system provided name
1250 * for system groups. 1252 /// for system groups.
1251 */
1252 core.String name; 1253 core.String name;
1253 /** 1254
1254 * The resource name for the contact group, assigned by the server. An ASCII 1255 /// The resource name for the contact group, assigned by the server. An ASCII
1255 * string, in the form of `contactGroups/`<var>contact_group_id</var>. 1256 /// string, in the form of `contactGroups/`<var>contact_group_id</var>.
1256 */
1257 core.String resourceName; 1257 core.String resourceName;
1258 1258
1259 ContactGroup(); 1259 ContactGroup();
1260 1260
1261 ContactGroup.fromJson(core.Map _json) { 1261 ContactGroup.fromJson(core.Map _json) {
1262 if (_json.containsKey("etag")) { 1262 if (_json.containsKey("etag")) {
1263 etag = _json["etag"]; 1263 etag = _json["etag"];
1264 } 1264 }
1265 if (_json.containsKey("formattedName")) { 1265 if (_json.containsKey("formattedName")) {
1266 formattedName = _json["formattedName"]; 1266 formattedName = _json["formattedName"];
(...skipping 12 matching lines...) Expand all
1279 } 1279 }
1280 if (_json.containsKey("name")) { 1280 if (_json.containsKey("name")) {
1281 name = _json["name"]; 1281 name = _json["name"];
1282 } 1282 }
1283 if (_json.containsKey("resourceName")) { 1283 if (_json.containsKey("resourceName")) {
1284 resourceName = _json["resourceName"]; 1284 resourceName = _json["resourceName"];
1285 } 1285 }
1286 } 1286 }
1287 1287
1288 core.Map<core.String, core.Object> toJson() { 1288 core.Map<core.String, core.Object> toJson() {
1289 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1289 final core.Map<core.String, core.Object> _json =
1290 new core.Map<core.String, core.Object>();
1290 if (etag != null) { 1291 if (etag != null) {
1291 _json["etag"] = etag; 1292 _json["etag"] = etag;
1292 } 1293 }
1293 if (formattedName != null) { 1294 if (formattedName != null) {
1294 _json["formattedName"] = formattedName; 1295 _json["formattedName"] = formattedName;
1295 } 1296 }
1296 if (groupType != null) { 1297 if (groupType != null) {
1297 _json["groupType"] = groupType; 1298 _json["groupType"] = groupType;
1298 } 1299 }
1299 if (memberCount != null) { 1300 if (memberCount != null) {
1300 _json["memberCount"] = memberCount; 1301 _json["memberCount"] = memberCount;
1301 } 1302 }
1302 if (memberResourceNames != null) { 1303 if (memberResourceNames != null) {
1303 _json["memberResourceNames"] = memberResourceNames; 1304 _json["memberResourceNames"] = memberResourceNames;
1304 } 1305 }
1305 if (metadata != null) { 1306 if (metadata != null) {
1306 _json["metadata"] = (metadata).toJson(); 1307 _json["metadata"] = (metadata).toJson();
1307 } 1308 }
1308 if (name != null) { 1309 if (name != null) {
1309 _json["name"] = name; 1310 _json["name"] = name;
1310 } 1311 }
1311 if (resourceName != null) { 1312 if (resourceName != null) {
1312 _json["resourceName"] = resourceName; 1313 _json["resourceName"] = resourceName;
1313 } 1314 }
1314 return _json; 1315 return _json;
1315 } 1316 }
1316 } 1317 }
1317 1318
1318 /** A Google contact group membership. */ 1319 /// A Google contact group membership.
1319 class ContactGroupMembership { 1320 class ContactGroupMembership {
1320 /** 1321 /// The contact group ID for the contact group membership. The contact group
1321 * The contact group ID for the contact group membership. The contact group 1322 /// ID can be custom or predefined. Possible values include, but are not
1322 * ID can be custom or predefined. Possible values include, but are not 1323 /// limited to, the following:
1323 * limited to, the following: 1324 ///
1324 * 1325 /// * `myContacts`
1325 * * `myContacts` 1326 /// * `starred`
1326 * * `starred` 1327 /// * A numerical ID for user-created groups.
1327 * * A numerical ID for user-created groups.
1328 */
1329 core.String contactGroupId; 1328 core.String contactGroupId;
1330 1329
1331 ContactGroupMembership(); 1330 ContactGroupMembership();
1332 1331
1333 ContactGroupMembership.fromJson(core.Map _json) { 1332 ContactGroupMembership.fromJson(core.Map _json) {
1334 if (_json.containsKey("contactGroupId")) { 1333 if (_json.containsKey("contactGroupId")) {
1335 contactGroupId = _json["contactGroupId"]; 1334 contactGroupId = _json["contactGroupId"];
1336 } 1335 }
1337 } 1336 }
1338 1337
1339 core.Map<core.String, core.Object> toJson() { 1338 core.Map<core.String, core.Object> toJson() {
1340 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1339 final core.Map<core.String, core.Object> _json =
1340 new core.Map<core.String, core.Object>();
1341 if (contactGroupId != null) { 1341 if (contactGroupId != null) {
1342 _json["contactGroupId"] = contactGroupId; 1342 _json["contactGroupId"] = contactGroupId;
1343 } 1343 }
1344 return _json; 1344 return _json;
1345 } 1345 }
1346 } 1346 }
1347 1347
1348 /** The read-only metadata about a contact group. */ 1348 /// The read-only metadata about a contact group.
1349 class ContactGroupMetadata { 1349 class ContactGroupMetadata {
1350 /** 1350 /// True if the contact group resource has been deleted. Populated only for
1351 * True if the contact group resource has been deleted. Populated only for 1351 /// [`ListContactGroups`](/people/api/rest/v1/contactgroups/list) requests
1352 * [`ListContactGroups`](/people/api/rest/v1/contactgroups/list) requests 1352 /// that include a sync token.
1353 * that include a sync token.
1354 */
1355 core.bool deleted; 1353 core.bool deleted;
1356 /** The time the group was last updated. */ 1354
1355 /// The time the group was last updated.
1357 core.String updateTime; 1356 core.String updateTime;
1358 1357
1359 ContactGroupMetadata(); 1358 ContactGroupMetadata();
1360 1359
1361 ContactGroupMetadata.fromJson(core.Map _json) { 1360 ContactGroupMetadata.fromJson(core.Map _json) {
1362 if (_json.containsKey("deleted")) { 1361 if (_json.containsKey("deleted")) {
1363 deleted = _json["deleted"]; 1362 deleted = _json["deleted"];
1364 } 1363 }
1365 if (_json.containsKey("updateTime")) { 1364 if (_json.containsKey("updateTime")) {
1366 updateTime = _json["updateTime"]; 1365 updateTime = _json["updateTime"];
1367 } 1366 }
1368 } 1367 }
1369 1368
1370 core.Map<core.String, core.Object> toJson() { 1369 core.Map<core.String, core.Object> toJson() {
1371 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1370 final core.Map<core.String, core.Object> _json =
1371 new core.Map<core.String, core.Object>();
1372 if (deleted != null) { 1372 if (deleted != null) {
1373 _json["deleted"] = deleted; 1373 _json["deleted"] = deleted;
1374 } 1374 }
1375 if (updateTime != null) { 1375 if (updateTime != null) {
1376 _json["updateTime"] = updateTime; 1376 _json["updateTime"] = updateTime;
1377 } 1377 }
1378 return _json; 1378 return _json;
1379 } 1379 }
1380 } 1380 }
1381 1381
1382 /** The response for a specific contact group. */ 1382 /// The response for a specific contact group.
1383 class ContactGroupResponse { 1383 class ContactGroupResponse {
1384 /** The contact group. */ 1384 /// The contact group.
1385 ContactGroup contactGroup; 1385 ContactGroup contactGroup;
1386 /** The original requested resource name. */ 1386
1387 /// The original requested resource name.
1387 core.String requestedResourceName; 1388 core.String requestedResourceName;
1388 /** The status of the response. */ 1389
1390 /// The status of the response.
1389 Status status; 1391 Status status;
1390 1392
1391 ContactGroupResponse(); 1393 ContactGroupResponse();
1392 1394
1393 ContactGroupResponse.fromJson(core.Map _json) { 1395 ContactGroupResponse.fromJson(core.Map _json) {
1394 if (_json.containsKey("contactGroup")) { 1396 if (_json.containsKey("contactGroup")) {
1395 contactGroup = new ContactGroup.fromJson(_json["contactGroup"]); 1397 contactGroup = new ContactGroup.fromJson(_json["contactGroup"]);
1396 } 1398 }
1397 if (_json.containsKey("requestedResourceName")) { 1399 if (_json.containsKey("requestedResourceName")) {
1398 requestedResourceName = _json["requestedResourceName"]; 1400 requestedResourceName = _json["requestedResourceName"];
1399 } 1401 }
1400 if (_json.containsKey("status")) { 1402 if (_json.containsKey("status")) {
1401 status = new Status.fromJson(_json["status"]); 1403 status = new Status.fromJson(_json["status"]);
1402 } 1404 }
1403 } 1405 }
1404 1406
1405 core.Map<core.String, core.Object> toJson() { 1407 core.Map<core.String, core.Object> toJson() {
1406 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1408 final core.Map<core.String, core.Object> _json =
1409 new core.Map<core.String, core.Object>();
1407 if (contactGroup != null) { 1410 if (contactGroup != null) {
1408 _json["contactGroup"] = (contactGroup).toJson(); 1411 _json["contactGroup"] = (contactGroup).toJson();
1409 } 1412 }
1410 if (requestedResourceName != null) { 1413 if (requestedResourceName != null) {
1411 _json["requestedResourceName"] = requestedResourceName; 1414 _json["requestedResourceName"] = requestedResourceName;
1412 } 1415 }
1413 if (status != null) { 1416 if (status != null) {
1414 _json["status"] = (status).toJson(); 1417 _json["status"] = (status).toJson();
1415 } 1418 }
1416 return _json; 1419 return _json;
1417 } 1420 }
1418 } 1421 }
1419 1422
1420 /** 1423 /// A person's read-only cover photo. A large image shown on the person's
1421 * A person's read-only cover photo. A large image shown on the person's 1424 /// profile page that represents who they are or what they care about.
1422 * profile page that represents who they are or what they care about.
1423 */
1424 class CoverPhoto { 1425 class CoverPhoto {
1425 /** 1426 /// True if the cover photo is the default cover photo;
1426 * True if the cover photo is the default cover photo; 1427 /// false if the cover photo is a user-provided cover photo.
1427 * false if the cover photo is a user-provided cover photo.
1428 */
1429 core.bool default_; 1428 core.bool default_;
1430 /** Metadata about the cover photo. */ 1429
1430 /// Metadata about the cover photo.
1431 FieldMetadata metadata; 1431 FieldMetadata metadata;
1432 /** The URL of the cover photo. */ 1432
1433 /// The URL of the cover photo.
1433 core.String url; 1434 core.String url;
1434 1435
1435 CoverPhoto(); 1436 CoverPhoto();
1436 1437
1437 CoverPhoto.fromJson(core.Map _json) { 1438 CoverPhoto.fromJson(core.Map _json) {
1438 if (_json.containsKey("default")) { 1439 if (_json.containsKey("default")) {
1439 default_ = _json["default"]; 1440 default_ = _json["default"];
1440 } 1441 }
1441 if (_json.containsKey("metadata")) { 1442 if (_json.containsKey("metadata")) {
1442 metadata = new FieldMetadata.fromJson(_json["metadata"]); 1443 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1443 } 1444 }
1444 if (_json.containsKey("url")) { 1445 if (_json.containsKey("url")) {
1445 url = _json["url"]; 1446 url = _json["url"];
1446 } 1447 }
1447 } 1448 }
1448 1449
1449 core.Map<core.String, core.Object> toJson() { 1450 core.Map<core.String, core.Object> toJson() {
1450 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1451 final core.Map<core.String, core.Object> _json =
1452 new core.Map<core.String, core.Object>();
1451 if (default_ != null) { 1453 if (default_ != null) {
1452 _json["default"] = default_; 1454 _json["default"] = default_;
1453 } 1455 }
1454 if (metadata != null) { 1456 if (metadata != null) {
1455 _json["metadata"] = (metadata).toJson(); 1457 _json["metadata"] = (metadata).toJson();
1456 } 1458 }
1457 if (url != null) { 1459 if (url != null) {
1458 _json["url"] = url; 1460 _json["url"] = url;
1459 } 1461 }
1460 return _json; 1462 return _json;
1461 } 1463 }
1462 } 1464 }
1463 1465
1464 /** A request to create a new contact group. */ 1466 /// A request to create a new contact group.
1465 class CreateContactGroupRequest { 1467 class CreateContactGroupRequest {
1466 /** The contact group to create. */ 1468 /// The contact group to create.
1467 ContactGroup contactGroup; 1469 ContactGroup contactGroup;
1468 1470
1469 CreateContactGroupRequest(); 1471 CreateContactGroupRequest();
1470 1472
1471 CreateContactGroupRequest.fromJson(core.Map _json) { 1473 CreateContactGroupRequest.fromJson(core.Map _json) {
1472 if (_json.containsKey("contactGroup")) { 1474 if (_json.containsKey("contactGroup")) {
1473 contactGroup = new ContactGroup.fromJson(_json["contactGroup"]); 1475 contactGroup = new ContactGroup.fromJson(_json["contactGroup"]);
1474 } 1476 }
1475 } 1477 }
1476 1478
1477 core.Map<core.String, core.Object> toJson() { 1479 core.Map<core.String, core.Object> toJson() {
1478 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1480 final core.Map<core.String, core.Object> _json =
1481 new core.Map<core.String, core.Object>();
1479 if (contactGroup != null) { 1482 if (contactGroup != null) {
1480 _json["contactGroup"] = (contactGroup).toJson(); 1483 _json["contactGroup"] = (contactGroup).toJson();
1481 } 1484 }
1482 return _json; 1485 return _json;
1483 } 1486 }
1484 } 1487 }
1485 1488
1486 /** 1489 /// Represents a whole calendar date, for example a date of birth. The time
1487 * Represents a whole calendar date, for example a date of birth. The time 1490 /// of day and time zone are either specified elsewhere or are not
1488 * of day and time zone are either specified elsewhere or are not 1491 /// significant. The date is relative to the
1489 * significant. The date is relative to the 1492 /// [Proleptic Gregorian
1490 * [Proleptic Gregorian 1493 /// Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar).
1491 * Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). 1494 /// The day may be 0 to represent a year and month where the day is not
1492 * The day may be 0 to represent a year and month where the day is not 1495 /// significant. The year may be 0 to represent a month and day independent
1493 * significant. The year may be 0 to represent a month and day independent 1496 /// of year; for example, anniversary date.
1494 * of year; for example, anniversary date.
1495 */
1496 class Date { 1497 class Date {
1497 /** 1498 /// Day of month. Must be from 1 to 31 and valid for the year and month, or 0
1498 * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 1499 /// if specifying a year/month where the day is not significant.
1499 * if specifying a year/month where the day is not significant.
1500 */
1501 core.int day; 1500 core.int day;
1502 /** Month of year. Must be from 1 to 12. */ 1501
1502 /// Month of year. Must be from 1 to 12.
1503 core.int month; 1503 core.int month;
1504 /** 1504
1505 * Year of date. Must be from 1 to 9999, or 0 if specifying a date without 1505 /// Year of date. Must be from 1 to 9999, or 0 if specifying a date without
1506 * a year. 1506 /// a year.
1507 */
1508 core.int year; 1507 core.int year;
1509 1508
1510 Date(); 1509 Date();
1511 1510
1512 Date.fromJson(core.Map _json) { 1511 Date.fromJson(core.Map _json) {
1513 if (_json.containsKey("day")) { 1512 if (_json.containsKey("day")) {
1514 day = _json["day"]; 1513 day = _json["day"];
1515 } 1514 }
1516 if (_json.containsKey("month")) { 1515 if (_json.containsKey("month")) {
1517 month = _json["month"]; 1516 month = _json["month"];
1518 } 1517 }
1519 if (_json.containsKey("year")) { 1518 if (_json.containsKey("year")) {
1520 year = _json["year"]; 1519 year = _json["year"];
1521 } 1520 }
1522 } 1521 }
1523 1522
1524 core.Map<core.String, core.Object> toJson() { 1523 core.Map<core.String, core.Object> toJson() {
1525 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1524 final core.Map<core.String, core.Object> _json =
1525 new core.Map<core.String, core.Object>();
1526 if (day != null) { 1526 if (day != null) {
1527 _json["day"] = day; 1527 _json["day"] = day;
1528 } 1528 }
1529 if (month != null) { 1529 if (month != null) {
1530 _json["month"] = month; 1530 _json["month"] = month;
1531 } 1531 }
1532 if (year != null) { 1532 if (year != null) {
1533 _json["year"] = year; 1533 _json["year"] = year;
1534 } 1534 }
1535 return _json; 1535 return _json;
1536 } 1536 }
1537 } 1537 }
1538 1538
1539 /** A Google Apps Domain membership. */ 1539 /// A Google Apps Domain membership.
1540 class DomainMembership { 1540 class DomainMembership {
1541 /** True if the person is in the viewer's Google Apps domain. */ 1541 /// True if the person is in the viewer's Google Apps domain.
1542 core.bool inViewerDomain; 1542 core.bool inViewerDomain;
1543 1543
1544 DomainMembership(); 1544 DomainMembership();
1545 1545
1546 DomainMembership.fromJson(core.Map _json) { 1546 DomainMembership.fromJson(core.Map _json) {
1547 if (_json.containsKey("inViewerDomain")) { 1547 if (_json.containsKey("inViewerDomain")) {
1548 inViewerDomain = _json["inViewerDomain"]; 1548 inViewerDomain = _json["inViewerDomain"];
1549 } 1549 }
1550 } 1550 }
1551 1551
1552 core.Map<core.String, core.Object> toJson() { 1552 core.Map<core.String, core.Object> toJson() {
1553 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1553 final core.Map<core.String, core.Object> _json =
1554 new core.Map<core.String, core.Object>();
1554 if (inViewerDomain != null) { 1555 if (inViewerDomain != null) {
1555 _json["inViewerDomain"] = inViewerDomain; 1556 _json["inViewerDomain"] = inViewerDomain;
1556 } 1557 }
1557 return _json; 1558 return _json;
1558 } 1559 }
1559 } 1560 }
1560 1561
1561 /** A person's email address. */ 1562 /// A person's email address.
1562 class EmailAddress { 1563 class EmailAddress {
1563 /** The display name of the email. */ 1564 /// The display name of the email.
1564 core.String displayName; 1565 core.String displayName;
1565 /** 1566
1566 * The read-only type of the email address translated and formatted in the 1567 /// The read-only type of the email address translated and formatted in the
1567 * viewer's account locale or the `Accept-Language` HTTP header locale. 1568 /// viewer's account locale or the `Accept-Language` HTTP header locale.
1568 */
1569 core.String formattedType; 1569 core.String formattedType;
1570 /** Metadata about the email address. */ 1570
1571 /// Metadata about the email address.
1571 FieldMetadata metadata; 1572 FieldMetadata metadata;
1572 /** 1573
1573 * The type of the email address. The type can be custom or predefined. 1574 /// The type of the email address. The type can be custom or predefined.
1574 * Possible values include, but are not limited to, the following: 1575 /// Possible values include, but are not limited to, the following:
1575 * 1576 ///
1576 * * `home` 1577 /// * `home`
1577 * * `work` 1578 /// * `work`
1578 * * `other` 1579 /// * `other`
1579 */
1580 core.String type; 1580 core.String type;
1581 /** The email address. */ 1581
1582 /// The email address.
1582 core.String value; 1583 core.String value;
1583 1584
1584 EmailAddress(); 1585 EmailAddress();
1585 1586
1586 EmailAddress.fromJson(core.Map _json) { 1587 EmailAddress.fromJson(core.Map _json) {
1587 if (_json.containsKey("displayName")) { 1588 if (_json.containsKey("displayName")) {
1588 displayName = _json["displayName"]; 1589 displayName = _json["displayName"];
1589 } 1590 }
1590 if (_json.containsKey("formattedType")) { 1591 if (_json.containsKey("formattedType")) {
1591 formattedType = _json["formattedType"]; 1592 formattedType = _json["formattedType"];
1592 } 1593 }
1593 if (_json.containsKey("metadata")) { 1594 if (_json.containsKey("metadata")) {
1594 metadata = new FieldMetadata.fromJson(_json["metadata"]); 1595 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1595 } 1596 }
1596 if (_json.containsKey("type")) { 1597 if (_json.containsKey("type")) {
1597 type = _json["type"]; 1598 type = _json["type"];
1598 } 1599 }
1599 if (_json.containsKey("value")) { 1600 if (_json.containsKey("value")) {
1600 value = _json["value"]; 1601 value = _json["value"];
1601 } 1602 }
1602 } 1603 }
1603 1604
1604 core.Map<core.String, core.Object> toJson() { 1605 core.Map<core.String, core.Object> toJson() {
1605 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1606 final core.Map<core.String, core.Object> _json =
1607 new core.Map<core.String, core.Object>();
1606 if (displayName != null) { 1608 if (displayName != null) {
1607 _json["displayName"] = displayName; 1609 _json["displayName"] = displayName;
1608 } 1610 }
1609 if (formattedType != null) { 1611 if (formattedType != null) {
1610 _json["formattedType"] = formattedType; 1612 _json["formattedType"] = formattedType;
1611 } 1613 }
1612 if (metadata != null) { 1614 if (metadata != null) {
1613 _json["metadata"] = (metadata).toJson(); 1615 _json["metadata"] = (metadata).toJson();
1614 } 1616 }
1615 if (type != null) { 1617 if (type != null) {
1616 _json["type"] = type; 1618 _json["type"] = type;
1617 } 1619 }
1618 if (value != null) { 1620 if (value != null) {
1619 _json["value"] = value; 1621 _json["value"] = value;
1620 } 1622 }
1621 return _json; 1623 return _json;
1622 } 1624 }
1623 } 1625 }
1624 1626
1625 /** 1627 /// A generic empty message that you can re-use to avoid defining duplicated
1626 * A generic empty message that you can re-use to avoid defining duplicated 1628 /// empty messages in your APIs. A typical example is to use it as the request
1627 * empty messages in your APIs. A typical example is to use it as the request 1629 /// or the response type of an API method. For instance:
1628 * or the response type of an API method. For instance: 1630 ///
1629 * 1631 /// service Foo {
1630 * service Foo { 1632 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1631 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 1633 /// }
1632 * } 1634 ///
1633 * 1635 /// The JSON representation for `Empty` is empty JSON object `{}`.
1634 * The JSON representation for `Empty` is empty JSON object `{}`.
1635 */
1636 class Empty { 1636 class Empty {
1637
1638 Empty(); 1637 Empty();
1639 1638
1640 Empty.fromJson(core.Map _json) { 1639 Empty.fromJson(core.Map _json) {}
1641 }
1642 1640
1643 core.Map<core.String, core.Object> toJson() { 1641 core.Map<core.String, core.Object> toJson() {
1644 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1642 final core.Map<core.String, core.Object> _json =
1643 new core.Map<core.String, core.Object>();
1645 return _json; 1644 return _json;
1646 } 1645 }
1647 } 1646 }
1648 1647
1649 /** An event related to the person. */ 1648 /// An event related to the person.
1650 class Event { 1649 class Event {
1651 /** The date of the event. */ 1650 /// The date of the event.
1652 Date date; 1651 Date date;
1653 /** 1652
1654 * The read-only type of the event translated and formatted in the 1653 /// The read-only type of the event translated and formatted in the
1655 * viewer's account locale or the `Accept-Language` HTTP header locale. 1654 /// viewer's account locale or the `Accept-Language` HTTP header locale.
1656 */
1657 core.String formattedType; 1655 core.String formattedType;
1658 /** Metadata about the event. */ 1656
1657 /// Metadata about the event.
1659 FieldMetadata metadata; 1658 FieldMetadata metadata;
1660 /** 1659
1661 * The type of the event. The type can be custom or predefined. 1660 /// The type of the event. The type can be custom or predefined.
1662 * Possible values include, but are not limited to, the following: 1661 /// Possible values include, but are not limited to, the following:
1663 * 1662 ///
1664 * * `anniversary` 1663 /// * `anniversary`
1665 * * `other` 1664 /// * `other`
1666 */
1667 core.String type; 1665 core.String type;
1668 1666
1669 Event(); 1667 Event();
1670 1668
1671 Event.fromJson(core.Map _json) { 1669 Event.fromJson(core.Map _json) {
1672 if (_json.containsKey("date")) { 1670 if (_json.containsKey("date")) {
1673 date = new Date.fromJson(_json["date"]); 1671 date = new Date.fromJson(_json["date"]);
1674 } 1672 }
1675 if (_json.containsKey("formattedType")) { 1673 if (_json.containsKey("formattedType")) {
1676 formattedType = _json["formattedType"]; 1674 formattedType = _json["formattedType"];
1677 } 1675 }
1678 if (_json.containsKey("metadata")) { 1676 if (_json.containsKey("metadata")) {
1679 metadata = new FieldMetadata.fromJson(_json["metadata"]); 1677 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1680 } 1678 }
1681 if (_json.containsKey("type")) { 1679 if (_json.containsKey("type")) {
1682 type = _json["type"]; 1680 type = _json["type"];
1683 } 1681 }
1684 } 1682 }
1685 1683
1686 core.Map<core.String, core.Object> toJson() { 1684 core.Map<core.String, core.Object> toJson() {
1687 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1685 final core.Map<core.String, core.Object> _json =
1686 new core.Map<core.String, core.Object>();
1688 if (date != null) { 1687 if (date != null) {
1689 _json["date"] = (date).toJson(); 1688 _json["date"] = (date).toJson();
1690 } 1689 }
1691 if (formattedType != null) { 1690 if (formattedType != null) {
1692 _json["formattedType"] = formattedType; 1691 _json["formattedType"] = formattedType;
1693 } 1692 }
1694 if (metadata != null) { 1693 if (metadata != null) {
1695 _json["metadata"] = (metadata).toJson(); 1694 _json["metadata"] = (metadata).toJson();
1696 } 1695 }
1697 if (type != null) { 1696 if (type != null) {
1698 _json["type"] = type; 1697 _json["type"] = type;
1699 } 1698 }
1700 return _json; 1699 return _json;
1701 } 1700 }
1702 } 1701 }
1703 1702
1704 /** Metadata about a field. */ 1703 /// Metadata about a field.
1705 class FieldMetadata { 1704 class FieldMetadata {
1706 /** 1705 /// True if the field is the primary field; false if the field is a secondary
1707 * True if the field is the primary field; false if the field is a secondary 1706 /// field.
1708 * field.
1709 */
1710 core.bool primary; 1707 core.bool primary;
1711 /** The source of the field. */ 1708
1709 /// The source of the field.
1712 Source source; 1710 Source source;
1713 /** 1711
1714 * True if the field is verified; false if the field is unverified. A 1712 /// True if the field is verified; false if the field is unverified. A
1715 * verified field is typically a name, email address, phone number, or 1713 /// verified field is typically a name, email address, phone number, or
1716 * website that has been confirmed to be owned by the person. 1714 /// website that has been confirmed to be owned by the person.
1717 */
1718 core.bool verified; 1715 core.bool verified;
1719 1716
1720 FieldMetadata(); 1717 FieldMetadata();
1721 1718
1722 FieldMetadata.fromJson(core.Map _json) { 1719 FieldMetadata.fromJson(core.Map _json) {
1723 if (_json.containsKey("primary")) { 1720 if (_json.containsKey("primary")) {
1724 primary = _json["primary"]; 1721 primary = _json["primary"];
1725 } 1722 }
1726 if (_json.containsKey("source")) { 1723 if (_json.containsKey("source")) {
1727 source = new Source.fromJson(_json["source"]); 1724 source = new Source.fromJson(_json["source"]);
1728 } 1725 }
1729 if (_json.containsKey("verified")) { 1726 if (_json.containsKey("verified")) {
1730 verified = _json["verified"]; 1727 verified = _json["verified"];
1731 } 1728 }
1732 } 1729 }
1733 1730
1734 core.Map<core.String, core.Object> toJson() { 1731 core.Map<core.String, core.Object> toJson() {
1735 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1732 final core.Map<core.String, core.Object> _json =
1733 new core.Map<core.String, core.Object>();
1736 if (primary != null) { 1734 if (primary != null) {
1737 _json["primary"] = primary; 1735 _json["primary"] = primary;
1738 } 1736 }
1739 if (source != null) { 1737 if (source != null) {
1740 _json["source"] = (source).toJson(); 1738 _json["source"] = (source).toJson();
1741 } 1739 }
1742 if (verified != null) { 1740 if (verified != null) {
1743 _json["verified"] = verified; 1741 _json["verified"] = verified;
1744 } 1742 }
1745 return _json; 1743 return _json;
1746 } 1744 }
1747 } 1745 }
1748 1746
1749 /** A person's gender. */ 1747 /// A person's gender.
1750 class Gender { 1748 class Gender {
1751 /** 1749 /// The read-only value of the gender translated and formatted in the
1752 * The read-only value of the gender translated and formatted in the viewer's 1750 /// viewer's
1753 * account locale or the `Accept-Language` HTTP header locale. 1751 /// account locale or the `Accept-Language` HTTP header locale.
1754 */
1755 core.String formattedValue; 1752 core.String formattedValue;
1756 /** Metadata about the gender. */ 1753
1754 /// Metadata about the gender.
1757 FieldMetadata metadata; 1755 FieldMetadata metadata;
1758 /** 1756
1759 * The gender for the person. The gender can be custom or predefined. 1757 /// The gender for the person. The gender can be custom or predefined.
1760 * Possible values include, but are not limited to, the 1758 /// Possible values include, but are not limited to, the
1761 * following: 1759 /// following:
1762 * 1760 ///
1763 * * `male` 1761 /// * `male`
1764 * * `female` 1762 /// * `female`
1765 * * `other` 1763 /// * `other`
1766 * * `unknown` 1764 /// * `unknown`
1767 */
1768 core.String value; 1765 core.String value;
1769 1766
1770 Gender(); 1767 Gender();
1771 1768
1772 Gender.fromJson(core.Map _json) { 1769 Gender.fromJson(core.Map _json) {
1773 if (_json.containsKey("formattedValue")) { 1770 if (_json.containsKey("formattedValue")) {
1774 formattedValue = _json["formattedValue"]; 1771 formattedValue = _json["formattedValue"];
1775 } 1772 }
1776 if (_json.containsKey("metadata")) { 1773 if (_json.containsKey("metadata")) {
1777 metadata = new FieldMetadata.fromJson(_json["metadata"]); 1774 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1778 } 1775 }
1779 if (_json.containsKey("value")) { 1776 if (_json.containsKey("value")) {
1780 value = _json["value"]; 1777 value = _json["value"];
1781 } 1778 }
1782 } 1779 }
1783 1780
1784 core.Map<core.String, core.Object> toJson() { 1781 core.Map<core.String, core.Object> toJson() {
1785 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1782 final core.Map<core.String, core.Object> _json =
1783 new core.Map<core.String, core.Object>();
1786 if (formattedValue != null) { 1784 if (formattedValue != null) {
1787 _json["formattedValue"] = formattedValue; 1785 _json["formattedValue"] = formattedValue;
1788 } 1786 }
1789 if (metadata != null) { 1787 if (metadata != null) {
1790 _json["metadata"] = (metadata).toJson(); 1788 _json["metadata"] = (metadata).toJson();
1791 } 1789 }
1792 if (value != null) { 1790 if (value != null) {
1793 _json["value"] = value; 1791 _json["value"] = value;
1794 } 1792 }
1795 return _json; 1793 return _json;
1796 } 1794 }
1797 } 1795 }
1798 1796
1799 class GetPeopleResponse { 1797 class GetPeopleResponse {
1800 /** The response for each requested resource name. */ 1798 /// The response for each requested resource name.
1801 core.List<PersonResponse> responses; 1799 core.List<PersonResponse> responses;
1802 1800
1803 GetPeopleResponse(); 1801 GetPeopleResponse();
1804 1802
1805 GetPeopleResponse.fromJson(core.Map _json) { 1803 GetPeopleResponse.fromJson(core.Map _json) {
1806 if (_json.containsKey("responses")) { 1804 if (_json.containsKey("responses")) {
1807 responses = _json["responses"].map((value) => new PersonResponse.fromJson( value)).toList(); 1805 responses = _json["responses"]
1806 .map((value) => new PersonResponse.fromJson(value))
1807 .toList();
1808 } 1808 }
1809 } 1809 }
1810 1810
1811 core.Map<core.String, core.Object> toJson() { 1811 core.Map<core.String, core.Object> toJson() {
1812 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1812 final core.Map<core.String, core.Object> _json =
1813 new core.Map<core.String, core.Object>();
1813 if (responses != null) { 1814 if (responses != null) {
1814 _json["responses"] = responses.map((value) => (value).toJson()).toList(); 1815 _json["responses"] = responses.map((value) => (value).toJson()).toList();
1815 } 1816 }
1816 return _json; 1817 return _json;
1817 } 1818 }
1818 } 1819 }
1819 1820
1820 /** A person's instant messaging client. */ 1821 /// A person's instant messaging client.
1821 class ImClient { 1822 class ImClient {
1822 /** 1823 /// The read-only protocol of the IM client formatted in the viewer's account
1823 * The read-only protocol of the IM client formatted in the viewer's account 1824 /// locale or the `Accept-Language` HTTP header locale.
1824 * locale or the `Accept-Language` HTTP header locale.
1825 */
1826 core.String formattedProtocol; 1825 core.String formattedProtocol;
1827 /** 1826
1828 * The read-only type of the IM client translated and formatted in the 1827 /// The read-only type of the IM client translated and formatted in the
1829 * viewer's account locale or the `Accept-Language` HTTP header locale. 1828 /// viewer's account locale or the `Accept-Language` HTTP header locale.
1830 */
1831 core.String formattedType; 1829 core.String formattedType;
1832 /** Metadata about the IM client. */ 1830
1831 /// Metadata about the IM client.
1833 FieldMetadata metadata; 1832 FieldMetadata metadata;
1834 /** 1833
1835 * The protocol of the IM client. The protocol can be custom or predefined. 1834 /// The protocol of the IM client. The protocol can be custom or predefined.
1836 * Possible values include, but are not limited to, the following: 1835 /// Possible values include, but are not limited to, the following:
1837 * 1836 ///
1838 * * `aim` 1837 /// * `aim`
1839 * * `msn` 1838 /// * `msn`
1840 * * `yahoo` 1839 /// * `yahoo`
1841 * * `skype` 1840 /// * `skype`
1842 * * `qq` 1841 /// * `qq`
1843 * * `googleTalk` 1842 /// * `googleTalk`
1844 * * `icq` 1843 /// * `icq`
1845 * * `jabber` 1844 /// * `jabber`
1846 * * `netMeeting` 1845 /// * `netMeeting`
1847 */
1848 core.String protocol; 1846 core.String protocol;
1849 /** 1847
1850 * The type of the IM client. The type can be custom or predefined. 1848 /// The type of the IM client. The type can be custom or predefined.
1851 * Possible values include, but are not limited to, the following: 1849 /// Possible values include, but are not limited to, the following:
1852 * 1850 ///
1853 * * `home` 1851 /// * `home`
1854 * * `work` 1852 /// * `work`
1855 * * `other` 1853 /// * `other`
1856 */
1857 core.String type; 1854 core.String type;
1858 /** The user name used in the IM client. */ 1855
1856 /// The user name used in the IM client.
1859 core.String username; 1857 core.String username;
1860 1858
1861 ImClient(); 1859 ImClient();
1862 1860
1863 ImClient.fromJson(core.Map _json) { 1861 ImClient.fromJson(core.Map _json) {
1864 if (_json.containsKey("formattedProtocol")) { 1862 if (_json.containsKey("formattedProtocol")) {
1865 formattedProtocol = _json["formattedProtocol"]; 1863 formattedProtocol = _json["formattedProtocol"];
1866 } 1864 }
1867 if (_json.containsKey("formattedType")) { 1865 if (_json.containsKey("formattedType")) {
1868 formattedType = _json["formattedType"]; 1866 formattedType = _json["formattedType"];
1869 } 1867 }
1870 if (_json.containsKey("metadata")) { 1868 if (_json.containsKey("metadata")) {
1871 metadata = new FieldMetadata.fromJson(_json["metadata"]); 1869 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1872 } 1870 }
1873 if (_json.containsKey("protocol")) { 1871 if (_json.containsKey("protocol")) {
1874 protocol = _json["protocol"]; 1872 protocol = _json["protocol"];
1875 } 1873 }
1876 if (_json.containsKey("type")) { 1874 if (_json.containsKey("type")) {
1877 type = _json["type"]; 1875 type = _json["type"];
1878 } 1876 }
1879 if (_json.containsKey("username")) { 1877 if (_json.containsKey("username")) {
1880 username = _json["username"]; 1878 username = _json["username"];
1881 } 1879 }
1882 } 1880 }
1883 1881
1884 core.Map<core.String, core.Object> toJson() { 1882 core.Map<core.String, core.Object> toJson() {
1885 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1883 final core.Map<core.String, core.Object> _json =
1884 new core.Map<core.String, core.Object>();
1886 if (formattedProtocol != null) { 1885 if (formattedProtocol != null) {
1887 _json["formattedProtocol"] = formattedProtocol; 1886 _json["formattedProtocol"] = formattedProtocol;
1888 } 1887 }
1889 if (formattedType != null) { 1888 if (formattedType != null) {
1890 _json["formattedType"] = formattedType; 1889 _json["formattedType"] = formattedType;
1891 } 1890 }
1892 if (metadata != null) { 1891 if (metadata != null) {
1893 _json["metadata"] = (metadata).toJson(); 1892 _json["metadata"] = (metadata).toJson();
1894 } 1893 }
1895 if (protocol != null) { 1894 if (protocol != null) {
1896 _json["protocol"] = protocol; 1895 _json["protocol"] = protocol;
1897 } 1896 }
1898 if (type != null) { 1897 if (type != null) {
1899 _json["type"] = type; 1898 _json["type"] = type;
1900 } 1899 }
1901 if (username != null) { 1900 if (username != null) {
1902 _json["username"] = username; 1901 _json["username"] = username;
1903 } 1902 }
1904 return _json; 1903 return _json;
1905 } 1904 }
1906 } 1905 }
1907 1906
1908 /** One of the person's interests. */ 1907 /// One of the person's interests.
1909 class Interest { 1908 class Interest {
1910 /** Metadata about the interest. */ 1909 /// Metadata about the interest.
1911 FieldMetadata metadata; 1910 FieldMetadata metadata;
1912 /** The interest; for example, `stargazing`. */ 1911
1912 /// The interest; for example, `stargazing`.
1913 core.String value; 1913 core.String value;
1914 1914
1915 Interest(); 1915 Interest();
1916 1916
1917 Interest.fromJson(core.Map _json) { 1917 Interest.fromJson(core.Map _json) {
1918 if (_json.containsKey("metadata")) { 1918 if (_json.containsKey("metadata")) {
1919 metadata = new FieldMetadata.fromJson(_json["metadata"]); 1919 metadata = new FieldMetadata.fromJson(_json["metadata"]);
1920 } 1920 }
1921 if (_json.containsKey("value")) { 1921 if (_json.containsKey("value")) {
1922 value = _json["value"]; 1922 value = _json["value"];
1923 } 1923 }
1924 } 1924 }
1925 1925
1926 core.Map<core.String, core.Object> toJson() { 1926 core.Map<core.String, core.Object> toJson() {
1927 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1927 final core.Map<core.String, core.Object> _json =
1928 new core.Map<core.String, core.Object>();
1928 if (metadata != null) { 1929 if (metadata != null) {
1929 _json["metadata"] = (metadata).toJson(); 1930 _json["metadata"] = (metadata).toJson();
1930 } 1931 }
1931 if (value != null) { 1932 if (value != null) {
1932 _json["value"] = value; 1933 _json["value"] = value;
1933 } 1934 }
1934 return _json; 1935 return _json;
1935 } 1936 }
1936 } 1937 }
1937 1938
1938 class ListConnectionsResponse { 1939 class ListConnectionsResponse {
1939 /** The list of people that the requestor is connected to. */ 1940 /// The list of people that the requestor is connected to.
1940 core.List<Person> connections; 1941 core.List<Person> connections;
1941 /** The token that can be used to retrieve the next page of results. */ 1942
1943 /// The token that can be used to retrieve the next page of results.
1942 core.String nextPageToken; 1944 core.String nextPageToken;
1943 /** The token that can be used to retrieve changes since the last request. */ 1945
1946 /// The token that can be used to retrieve changes since the last request.
1944 core.String nextSyncToken; 1947 core.String nextSyncToken;
1945 /** The total number of items in the list without pagination. */ 1948
1949 /// The total number of items in the list without pagination.
1946 core.int totalItems; 1950 core.int totalItems;
1947 /** 1951
1948 * **DEPRECATED** (Please use totalItems) 1952 /// **DEPRECATED** (Please use totalItems)
1949 * The total number of people in the list without pagination. 1953 /// The total number of people in the list without pagination.
1950 */
1951 core.int totalPeople; 1954 core.int totalPeople;
1952 1955
1953 ListConnectionsResponse(); 1956 ListConnectionsResponse();
1954 1957
1955 ListConnectionsResponse.fromJson(core.Map _json) { 1958 ListConnectionsResponse.fromJson(core.Map _json) {
1956 if (_json.containsKey("connections")) { 1959 if (_json.containsKey("connections")) {
1957 connections = _json["connections"].map((value) => new Person.fromJson(valu e)).toList(); 1960 connections = _json["connections"]
1961 .map((value) => new Person.fromJson(value))
1962 .toList();
1958 } 1963 }
1959 if (_json.containsKey("nextPageToken")) { 1964 if (_json.containsKey("nextPageToken")) {
1960 nextPageToken = _json["nextPageToken"]; 1965 nextPageToken = _json["nextPageToken"];
1961 } 1966 }
1962 if (_json.containsKey("nextSyncToken")) { 1967 if (_json.containsKey("nextSyncToken")) {
1963 nextSyncToken = _json["nextSyncToken"]; 1968 nextSyncToken = _json["nextSyncToken"];
1964 } 1969 }
1965 if (_json.containsKey("totalItems")) { 1970 if (_json.containsKey("totalItems")) {
1966 totalItems = _json["totalItems"]; 1971 totalItems = _json["totalItems"];
1967 } 1972 }
1968 if (_json.containsKey("totalPeople")) { 1973 if (_json.containsKey("totalPeople")) {
1969 totalPeople = _json["totalPeople"]; 1974 totalPeople = _json["totalPeople"];
1970 } 1975 }
1971 } 1976 }
1972 1977
1973 core.Map<core.String, core.Object> toJson() { 1978 core.Map<core.String, core.Object> toJson() {
1974 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1979 final core.Map<core.String, core.Object> _json =
1980 new core.Map<core.String, core.Object>();
1975 if (connections != null) { 1981 if (connections != null) {
1976 _json["connections"] = connections.map((value) => (value).toJson()).toList (); 1982 _json["connections"] =
1983 connections.map((value) => (value).toJson()).toList();
1977 } 1984 }
1978 if (nextPageToken != null) { 1985 if (nextPageToken != null) {
1979 _json["nextPageToken"] = nextPageToken; 1986 _json["nextPageToken"] = nextPageToken;
1980 } 1987 }
1981 if (nextSyncToken != null) { 1988 if (nextSyncToken != null) {
1982 _json["nextSyncToken"] = nextSyncToken; 1989 _json["nextSyncToken"] = nextSyncToken;
1983 } 1990 }
1984 if (totalItems != null) { 1991 if (totalItems != null) {
1985 _json["totalItems"] = totalItems; 1992 _json["totalItems"] = totalItems;
1986 } 1993 }
1987 if (totalPeople != null) { 1994 if (totalPeople != null) {
1988 _json["totalPeople"] = totalPeople; 1995 _json["totalPeople"] = totalPeople;
1989 } 1996 }
1990 return _json; 1997 return _json;
1991 } 1998 }
1992 } 1999 }
1993 2000
1994 /** The response to a list contact groups request. */ 2001 /// The response to a list contact groups request.
1995 class ListContactGroupsResponse { 2002 class ListContactGroupsResponse {
1996 /** 2003 /// The list of contact groups. Members of the contact groups are not
1997 * The list of contact groups. Members of the contact groups are not 2004 /// populated.
1998 * populated.
1999 */
2000 core.List<ContactGroup> contactGroups; 2005 core.List<ContactGroup> contactGroups;
2001 /** The token that can be used to retrieve the next page of results. */ 2006
2007 /// The token that can be used to retrieve the next page of results.
2002 core.String nextPageToken; 2008 core.String nextPageToken;
2003 /** The token that can be used to retrieve changes since the last request. */ 2009
2010 /// The token that can be used to retrieve changes since the last request.
2004 core.String nextSyncToken; 2011 core.String nextSyncToken;
2005 /** The total number of items in the list without pagination. */ 2012
2013 /// The total number of items in the list without pagination.
2006 core.int totalItems; 2014 core.int totalItems;
2007 2015
2008 ListContactGroupsResponse(); 2016 ListContactGroupsResponse();
2009 2017
2010 ListContactGroupsResponse.fromJson(core.Map _json) { 2018 ListContactGroupsResponse.fromJson(core.Map _json) {
2011 if (_json.containsKey("contactGroups")) { 2019 if (_json.containsKey("contactGroups")) {
2012 contactGroups = _json["contactGroups"].map((value) => new ContactGroup.fro mJson(value)).toList(); 2020 contactGroups = _json["contactGroups"]
2021 .map((value) => new ContactGroup.fromJson(value))
2022 .toList();
2013 } 2023 }
2014 if (_json.containsKey("nextPageToken")) { 2024 if (_json.containsKey("nextPageToken")) {
2015 nextPageToken = _json["nextPageToken"]; 2025 nextPageToken = _json["nextPageToken"];
2016 } 2026 }
2017 if (_json.containsKey("nextSyncToken")) { 2027 if (_json.containsKey("nextSyncToken")) {
2018 nextSyncToken = _json["nextSyncToken"]; 2028 nextSyncToken = _json["nextSyncToken"];
2019 } 2029 }
2020 if (_json.containsKey("totalItems")) { 2030 if (_json.containsKey("totalItems")) {
2021 totalItems = _json["totalItems"]; 2031 totalItems = _json["totalItems"];
2022 } 2032 }
2023 } 2033 }
2024 2034
2025 core.Map<core.String, core.Object> toJson() { 2035 core.Map<core.String, core.Object> toJson() {
2026 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2036 final core.Map<core.String, core.Object> _json =
2037 new core.Map<core.String, core.Object>();
2027 if (contactGroups != null) { 2038 if (contactGroups != null) {
2028 _json["contactGroups"] = contactGroups.map((value) => (value).toJson()).to List(); 2039 _json["contactGroups"] =
2040 contactGroups.map((value) => (value).toJson()).toList();
2029 } 2041 }
2030 if (nextPageToken != null) { 2042 if (nextPageToken != null) {
2031 _json["nextPageToken"] = nextPageToken; 2043 _json["nextPageToken"] = nextPageToken;
2032 } 2044 }
2033 if (nextSyncToken != null) { 2045 if (nextSyncToken != null) {
2034 _json["nextSyncToken"] = nextSyncToken; 2046 _json["nextSyncToken"] = nextSyncToken;
2035 } 2047 }
2036 if (totalItems != null) { 2048 if (totalItems != null) {
2037 _json["totalItems"] = totalItems; 2049 _json["totalItems"] = totalItems;
2038 } 2050 }
2039 return _json; 2051 return _json;
2040 } 2052 }
2041 } 2053 }
2042 2054
2043 /** A person's locale preference. */ 2055 /// A person's locale preference.
2044 class Locale { 2056 class Locale {
2045 /** Metadata about the locale. */ 2057 /// Metadata about the locale.
2046 FieldMetadata metadata; 2058 FieldMetadata metadata;
2047 /** 2059
2048 * The well-formed [IETF BCP 47](https://tools.ietf.org/html/bcp47) 2060 /// The well-formed [IETF BCP 47](https://tools.ietf.org/html/bcp47)
2049 * language tag representing the locale. 2061 /// language tag representing the locale.
2050 */
2051 core.String value; 2062 core.String value;
2052 2063
2053 Locale(); 2064 Locale();
2054 2065
2055 Locale.fromJson(core.Map _json) { 2066 Locale.fromJson(core.Map _json) {
2056 if (_json.containsKey("metadata")) { 2067 if (_json.containsKey("metadata")) {
2057 metadata = new FieldMetadata.fromJson(_json["metadata"]); 2068 metadata = new FieldMetadata.fromJson(_json["metadata"]);
2058 } 2069 }
2059 if (_json.containsKey("value")) { 2070 if (_json.containsKey("value")) {
2060 value = _json["value"]; 2071 value = _json["value"];
2061 } 2072 }
2062 } 2073 }
2063 2074
2064 core.Map<core.String, core.Object> toJson() { 2075 core.Map<core.String, core.Object> toJson() {
2065 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2076 final core.Map<core.String, core.Object> _json =
2077 new core.Map<core.String, core.Object>();
2066 if (metadata != null) { 2078 if (metadata != null) {
2067 _json["metadata"] = (metadata).toJson(); 2079 _json["metadata"] = (metadata).toJson();
2068 } 2080 }
2069 if (value != null) { 2081 if (value != null) {
2070 _json["value"] = value; 2082 _json["value"] = value;
2071 } 2083 }
2072 return _json; 2084 return _json;
2073 } 2085 }
2074 } 2086 }
2075 2087
2076 /** A person's read-only membership in a group. */ 2088 /// A person's read-only membership in a group.
2077 class Membership { 2089 class Membership {
2078 /** The contact group membership. */ 2090 /// The contact group membership.
2079 ContactGroupMembership contactGroupMembership; 2091 ContactGroupMembership contactGroupMembership;
2080 /** The domain membership. */ 2092
2093 /// The domain membership.
2081 DomainMembership domainMembership; 2094 DomainMembership domainMembership;
2082 /** Metadata about the membership. */ 2095
2096 /// Metadata about the membership.
2083 FieldMetadata metadata; 2097 FieldMetadata metadata;
2084 2098
2085 Membership(); 2099 Membership();
2086 2100
2087 Membership.fromJson(core.Map _json) { 2101 Membership.fromJson(core.Map _json) {
2088 if (_json.containsKey("contactGroupMembership")) { 2102 if (_json.containsKey("contactGroupMembership")) {
2089 contactGroupMembership = new ContactGroupMembership.fromJson(_json["contac tGroupMembership"]); 2103 contactGroupMembership =
2104 new ContactGroupMembership.fromJson(_json["contactGroupMembership"]);
2090 } 2105 }
2091 if (_json.containsKey("domainMembership")) { 2106 if (_json.containsKey("domainMembership")) {
2092 domainMembership = new DomainMembership.fromJson(_json["domainMembership"] ); 2107 domainMembership =
2108 new DomainMembership.fromJson(_json["domainMembership"]);
2093 } 2109 }
2094 if (_json.containsKey("metadata")) { 2110 if (_json.containsKey("metadata")) {
2095 metadata = new FieldMetadata.fromJson(_json["metadata"]); 2111 metadata = new FieldMetadata.fromJson(_json["metadata"]);
2096 } 2112 }
2097 } 2113 }
2098 2114
2099 core.Map<core.String, core.Object> toJson() { 2115 core.Map<core.String, core.Object> toJson() {
2100 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2116 final core.Map<core.String, core.Object> _json =
2117 new core.Map<core.String, core.Object>();
2101 if (contactGroupMembership != null) { 2118 if (contactGroupMembership != null) {
2102 _json["contactGroupMembership"] = (contactGroupMembership).toJson(); 2119 _json["contactGroupMembership"] = (contactGroupMembership).toJson();
2103 } 2120 }
2104 if (domainMembership != null) { 2121 if (domainMembership != null) {
2105 _json["domainMembership"] = (domainMembership).toJson(); 2122 _json["domainMembership"] = (domainMembership).toJson();
2106 } 2123 }
2107 if (metadata != null) { 2124 if (metadata != null) {
2108 _json["metadata"] = (metadata).toJson(); 2125 _json["metadata"] = (metadata).toJson();
2109 } 2126 }
2110 return _json; 2127 return _json;
2111 } 2128 }
2112 } 2129 }
2113 2130
2114 /** A request to modify an existing contact group's members. */ 2131 /// A request to modify an existing contact group's members.
2115 class ModifyContactGroupMembersRequest { 2132 class ModifyContactGroupMembersRequest {
2116 /** 2133 /// The resource names of the contact people to add in the form of in the
2117 * The resource names of the contact people to add in the form of in the form 2134 /// form
2118 * `people/`<var>person_id</var>. 2135 /// `people/`<var>person_id</var>.
2119 */
2120 core.List<core.String> resourceNamesToAdd; 2136 core.List<core.String> resourceNamesToAdd;
2121 /** 2137
2122 * The resource names of the contact people to remove in the form of in the 2138 /// The resource names of the contact people to remove in the form of in the
2123 * form of `people/`<var>person_id</var>. 2139 /// form of `people/`<var>person_id</var>.
2124 */
2125 core.List<core.String> resourceNamesToRemove; 2140 core.List<core.String> resourceNamesToRemove;
2126 2141
2127 ModifyContactGroupMembersRequest(); 2142 ModifyContactGroupMembersRequest();
2128 2143
2129 ModifyContactGroupMembersRequest.fromJson(core.Map _json) { 2144 ModifyContactGroupMembersRequest.fromJson(core.Map _json) {
2130 if (_json.containsKey("resourceNamesToAdd")) { 2145 if (_json.containsKey("resourceNamesToAdd")) {
2131 resourceNamesToAdd = _json["resourceNamesToAdd"]; 2146 resourceNamesToAdd = _json["resourceNamesToAdd"];
2132 } 2147 }
2133 if (_json.containsKey("resourceNamesToRemove")) { 2148 if (_json.containsKey("resourceNamesToRemove")) {
2134 resourceNamesToRemove = _json["resourceNamesToRemove"]; 2149 resourceNamesToRemove = _json["resourceNamesToRemove"];
2135 } 2150 }
2136 } 2151 }
2137 2152
2138 core.Map<core.String, core.Object> toJson() { 2153 core.Map<core.String, core.Object> toJson() {
2139 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2154 final core.Map<core.String, core.Object> _json =
2155 new core.Map<core.String, core.Object>();
2140 if (resourceNamesToAdd != null) { 2156 if (resourceNamesToAdd != null) {
2141 _json["resourceNamesToAdd"] = resourceNamesToAdd; 2157 _json["resourceNamesToAdd"] = resourceNamesToAdd;
2142 } 2158 }
2143 if (resourceNamesToRemove != null) { 2159 if (resourceNamesToRemove != null) {
2144 _json["resourceNamesToRemove"] = resourceNamesToRemove; 2160 _json["resourceNamesToRemove"] = resourceNamesToRemove;
2145 } 2161 }
2146 return _json; 2162 return _json;
2147 } 2163 }
2148 } 2164 }
2149 2165
2150 /** The response to a modify contact group members request. */ 2166 /// The response to a modify contact group members request.
2151 class ModifyContactGroupMembersResponse { 2167 class ModifyContactGroupMembersResponse {
2152 /** The contact people resource names that were not found. */ 2168 /// The contact people resource names that were not found.
2153 core.List<core.String> notFoundResourceNames; 2169 core.List<core.String> notFoundResourceNames;
2154 2170
2155 ModifyContactGroupMembersResponse(); 2171 ModifyContactGroupMembersResponse();
2156 2172
2157 ModifyContactGroupMembersResponse.fromJson(core.Map _json) { 2173 ModifyContactGroupMembersResponse.fromJson(core.Map _json) {
2158 if (_json.containsKey("notFoundResourceNames")) { 2174 if (_json.containsKey("notFoundResourceNames")) {
2159 notFoundResourceNames = _json["notFoundResourceNames"]; 2175 notFoundResourceNames = _json["notFoundResourceNames"];
2160 } 2176 }
2161 } 2177 }
2162 2178
2163 core.Map<core.String, core.Object> toJson() { 2179 core.Map<core.String, core.Object> toJson() {
2164 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2180 final core.Map<core.String, core.Object> _json =
2181 new core.Map<core.String, core.Object>();
2165 if (notFoundResourceNames != null) { 2182 if (notFoundResourceNames != null) {
2166 _json["notFoundResourceNames"] = notFoundResourceNames; 2183 _json["notFoundResourceNames"] = notFoundResourceNames;
2167 } 2184 }
2168 return _json; 2185 return _json;
2169 } 2186 }
2170 } 2187 }
2171 2188
2172 /** A person's name. If the name is a mononym, the family name is empty. */ 2189 /// A person's name. If the name is a mononym, the family name is empty.
2173 class Name { 2190 class Name {
2174 /** 2191 /// The read-only display name formatted according to the locale specified by
2175 * The read-only display name formatted according to the locale specified by 2192 /// the viewer's account or the `Accept-Language` HTTP header.
2176 * the viewer's account or the `Accept-Language` HTTP header.
2177 */
2178 core.String displayName; 2193 core.String displayName;
2179 /** 2194
2180 * The read-only display name with the last name first formatted according to 2195 /// The read-only display name with the last name first formatted according
2181 * the locale specified by the viewer's account or the 2196 /// to
2182 * `Accept-Language` HTTP header. 2197 /// the locale specified by the viewer's account or the
2183 */ 2198 /// `Accept-Language` HTTP header.
2184 core.String displayNameLastFirst; 2199 core.String displayNameLastFirst;
2185 /** The family name. */ 2200
2201 /// The family name.
2186 core.String familyName; 2202 core.String familyName;
2187 /** The given name. */ 2203
2204 /// The given name.
2188 core.String givenName; 2205 core.String givenName;
2189 /** The honorific prefixes, such as `Mrs.` or `Dr.` */ 2206
2207 /// The honorific prefixes, such as `Mrs.` or `Dr.`
2190 core.String honorificPrefix; 2208 core.String honorificPrefix;
2191 /** The honorific suffixes, such as `Jr.` */ 2209
2210 /// The honorific suffixes, such as `Jr.`
2192 core.String honorificSuffix; 2211 core.String honorificSuffix;
2193 /** Metadata about the name. */ 2212
2213 /// Metadata about the name.
2194 FieldMetadata metadata; 2214 FieldMetadata metadata;
2195 /** The middle name(s). */ 2215
2216 /// The middle name(s).
2196 core.String middleName; 2217 core.String middleName;
2197 /** The family name spelled as it sounds. */ 2218
2219 /// The family name spelled as it sounds.
2198 core.String phoneticFamilyName; 2220 core.String phoneticFamilyName;
2199 /** The full name spelled as it sounds. */ 2221
2222 /// The full name spelled as it sounds.
2200 core.String phoneticFullName; 2223 core.String phoneticFullName;
2201 /** The given name spelled as it sounds. */ 2224
2225 /// The given name spelled as it sounds.
2202 core.String phoneticGivenName; 2226 core.String phoneticGivenName;
2203 /** The honorific prefixes spelled as they sound. */ 2227
2228 /// The honorific prefixes spelled as they sound.
2204 core.String phoneticHonorificPrefix; 2229 core.String phoneticHonorificPrefix;
2205 /** The honorific suffixes spelled as they sound. */ 2230
2231 /// The honorific suffixes spelled as they sound.
2206 core.String phoneticHonorificSuffix; 2232 core.String phoneticHonorificSuffix;
2207 /** The middle name(s) spelled as they sound. */ 2233
2234 /// The middle name(s) spelled as they sound.
2208 core.String phoneticMiddleName; 2235 core.String phoneticMiddleName;
2209 2236
2210 Name(); 2237 Name();
2211 2238
2212 Name.fromJson(core.Map _json) { 2239 Name.fromJson(core.Map _json) {
2213 if (_json.containsKey("displayName")) { 2240 if (_json.containsKey("displayName")) {
2214 displayName = _json["displayName"]; 2241 displayName = _json["displayName"];
2215 } 2242 }
2216 if (_json.containsKey("displayNameLastFirst")) { 2243 if (_json.containsKey("displayNameLastFirst")) {
2217 displayNameLastFirst = _json["displayNameLastFirst"]; 2244 displayNameLastFirst = _json["displayNameLastFirst"];
(...skipping 30 matching lines...) Expand all
2248 } 2275 }
2249 if (_json.containsKey("phoneticHonorificSuffix")) { 2276 if (_json.containsKey("phoneticHonorificSuffix")) {
2250 phoneticHonorificSuffix = _json["phoneticHonorificSuffix"]; 2277 phoneticHonorificSuffix = _json["phoneticHonorificSuffix"];
2251 } 2278 }
2252 if (_json.containsKey("phoneticMiddleName")) { 2279 if (_json.containsKey("phoneticMiddleName")) {
2253 phoneticMiddleName = _json["phoneticMiddleName"]; 2280 phoneticMiddleName = _json["phoneticMiddleName"];
2254 } 2281 }
2255 } 2282 }
2256 2283
2257 core.Map<core.String, core.Object> toJson() { 2284 core.Map<core.String, core.Object> toJson() {
2258 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2285 final core.Map<core.String, core.Object> _json =
2286 new core.Map<core.String, core.Object>();
2259 if (displayName != null) { 2287 if (displayName != null) {
2260 _json["displayName"] = displayName; 2288 _json["displayName"] = displayName;
2261 } 2289 }
2262 if (displayNameLastFirst != null) { 2290 if (displayNameLastFirst != null) {
2263 _json["displayNameLastFirst"] = displayNameLastFirst; 2291 _json["displayNameLastFirst"] = displayNameLastFirst;
2264 } 2292 }
2265 if (familyName != null) { 2293 if (familyName != null) {
2266 _json["familyName"] = familyName; 2294 _json["familyName"] = familyName;
2267 } 2295 }
2268 if (givenName != null) { 2296 if (givenName != null) {
(...skipping 26 matching lines...) Expand all
2295 if (phoneticHonorificSuffix != null) { 2323 if (phoneticHonorificSuffix != null) {
2296 _json["phoneticHonorificSuffix"] = phoneticHonorificSuffix; 2324 _json["phoneticHonorificSuffix"] = phoneticHonorificSuffix;
2297 } 2325 }
2298 if (phoneticMiddleName != null) { 2326 if (phoneticMiddleName != null) {
2299 _json["phoneticMiddleName"] = phoneticMiddleName; 2327 _json["phoneticMiddleName"] = phoneticMiddleName;
2300 } 2328 }
2301 return _json; 2329 return _json;
2302 } 2330 }
2303 } 2331 }
2304 2332
2305 /** A person's nickname. */ 2333 /// A person's nickname.
2306 class Nickname { 2334 class Nickname {
2307 /** Metadata about the nickname. */ 2335 /// Metadata about the nickname.
2308 FieldMetadata metadata; 2336 FieldMetadata metadata;
2309 /** 2337
2310 * The type of the nickname. 2338 /// The type of the nickname.
2311 * Possible string values are: 2339 /// Possible string values are:
2312 * - "DEFAULT" : Generic nickname. 2340 /// - "DEFAULT" : Generic nickname.
2313 * - "MAIDEN_NAME" : Maiden name or birth family name. Used when the person's 2341 /// - "MAIDEN_NAME" : Maiden name or birth family name. Used when the
2314 * family name has 2342 /// person's family name has
2315 * changed as a result of marriage. 2343 /// changed as a result of marriage.
2316 * - "INITIALS" : Initials. 2344 /// - "INITIALS" : Initials.
2317 * - "GPLUS" : Google+ profile nickname. 2345 /// - "GPLUS" : Google+ profile nickname.
2318 * - "OTHER_NAME" : A professional affiliation or other name; for example, 2346 /// - "OTHER_NAME" : A professional affiliation or other name; for example,
2319 * `Dr. Smith.` 2347 /// `Dr. Smith.`
2320 */
2321 core.String type; 2348 core.String type;
2322 /** The nickname. */ 2349
2350 /// The nickname.
2323 core.String value; 2351 core.String value;
2324 2352
2325 Nickname(); 2353 Nickname();
2326 2354
2327 Nickname.fromJson(core.Map _json) { 2355 Nickname.fromJson(core.Map _json) {
2328 if (_json.containsKey("metadata")) { 2356 if (_json.containsKey("metadata")) {
2329 metadata = new FieldMetadata.fromJson(_json["metadata"]); 2357 metadata = new FieldMetadata.fromJson(_json["metadata"]);
2330 } 2358 }
2331 if (_json.containsKey("type")) { 2359 if (_json.containsKey("type")) {
2332 type = _json["type"]; 2360 type = _json["type"];
2333 } 2361 }
2334 if (_json.containsKey("value")) { 2362 if (_json.containsKey("value")) {
2335 value = _json["value"]; 2363 value = _json["value"];
2336 } 2364 }
2337 } 2365 }
2338 2366
2339 core.Map<core.String, core.Object> toJson() { 2367 core.Map<core.String, core.Object> toJson() {
2340 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2368 final core.Map<core.String, core.Object> _json =
2369 new core.Map<core.String, core.Object>();
2341 if (metadata != null) { 2370 if (metadata != null) {
2342 _json["metadata"] = (metadata).toJson(); 2371 _json["metadata"] = (metadata).toJson();
2343 } 2372 }
2344 if (type != null) { 2373 if (type != null) {
2345 _json["type"] = type; 2374 _json["type"] = type;
2346 } 2375 }
2347 if (value != null) { 2376 if (value != null) {
2348 _json["value"] = value; 2377 _json["value"] = value;
2349 } 2378 }
2350 return _json; 2379 return _json;
2351 } 2380 }
2352 } 2381 }
2353 2382
2354 /** A person's occupation. */ 2383 /// A person's occupation.
2355 class Occupation { 2384 class Occupation {
2356 /** Metadata about the occupation. */ 2385 /// Metadata about the occupation.
2357 FieldMetadata metadata; 2386 FieldMetadata metadata;
2358 /** The occupation; for example, `carpenter`. */ 2387
2388 /// The occupation; for example, `carpenter`.
2359 core.String value; 2389 core.String value;
2360 2390
2361 Occupation(); 2391 Occupation();
2362 2392
2363 Occupation.fromJson(core.Map _json) { 2393 Occupation.fromJson(core.Map _json) {
2364 if (_json.containsKey("metadata")) { 2394 if (_json.containsKey("metadata")) {
2365 metadata = new FieldMetadata.fromJson(_json["metadata"]); 2395 metadata = new FieldMetadata.fromJson(_json["metadata"]);
2366 } 2396 }
2367 if (_json.containsKey("value")) { 2397 if (_json.containsKey("value")) {
2368 value = _json["value"]; 2398 value = _json["value"];
2369 } 2399 }
2370 } 2400 }
2371 2401
2372 core.Map<core.String, core.Object> toJson() { 2402 core.Map<core.String, core.Object> toJson() {
2373 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2403 final core.Map<core.String, core.Object> _json =
2404 new core.Map<core.String, core.Object>();
2374 if (metadata != null) { 2405 if (metadata != null) {
2375 _json["metadata"] = (metadata).toJson(); 2406 _json["metadata"] = (metadata).toJson();
2376 } 2407 }
2377 if (value != null) { 2408 if (value != null) {
2378 _json["value"] = value; 2409 _json["value"] = value;
2379 } 2410 }
2380 return _json; 2411 return _json;
2381 } 2412 }
2382 } 2413 }
2383 2414
2384 /** 2415 /// A person's past or current organization. Overlapping date ranges are
2385 * A person's past or current organization. Overlapping date ranges are 2416 /// permitted.
2386 * permitted.
2387 */
2388 class Organization { 2417 class Organization {
2389 /** 2418 /// True if the organization is the person's current organization;
2390 * True if the organization is the person's current organization; 2419 /// false if the organization is a past organization.
2391 * false if the organization is a past organization.
2392 */
2393 core.bool current; 2420 core.bool current;
2394 /** The person's department at the organization. */ 2421
2422 /// The person's department at the organization.
2395 core.String department; 2423 core.String department;
2396 /** 2424
2397 * The domain name associated with the organization; for example, 2425 /// The domain name associated with the organization; for example,
2398 * `google.com`. 2426 /// `google.com`.
2399 */
2400 core.String domain; 2427 core.String domain;
2401 /** The end date when the person left the organization. */ 2428
2429 /// The end date when the person left the organization.
2402 Date endDate; 2430 Date endDate;
2403 /** 2431
2404 * The read-only type of the organization translated and formatted in the 2432 /// The read-only type of the organization translated and formatted in the
2405 * viewer's account locale or the `Accept-Language` HTTP header locale. 2433 /// viewer's account locale or the `Accept-Language` HTTP header locale.
2406 */
2407 core.String formattedType; 2434 core.String formattedType;
2408 /** The person's job description at the organization. */ 2435
2436 /// The person's job description at the organization.
2409 core.String jobDescription; 2437 core.String jobDescription;
2410 /** The location of the organization office the person works at. */ 2438
2439 /// The location of the organization office the person works at.
2411 core.String location; 2440 core.String location;
2412 /** Metadata about the organization. */ 2441
2442 /// Metadata about the organization.
2413 FieldMetadata metadata; 2443 FieldMetadata metadata;
2414 /** The name of the organization. */ 2444
2445 /// The name of the organization.
2415 core.String name; 2446 core.String name;
2416 /** The phonetic name of the organization. */ 2447
2448 /// The phonetic name of the organization.
2417 core.String phoneticName; 2449 core.String phoneticName;
2418 /** The start date when the person joined the organization. */ 2450
2451 /// The start date when the person joined the organization.
2419 Date startDate; 2452 Date startDate;
2420 /** 2453
2421 * The symbol associated with the organization; for example, a stock ticker 2454 /// The symbol associated with the organization; for example, a stock ticker
2422 * symbol, abbreviation, or acronym. 2455 /// symbol, abbreviation, or acronym.
2423 */
2424 core.String symbol; 2456 core.String symbol;
2425 /** The person's job title at the organization. */ 2457
2458 /// The person's job title at the organization.
2426 core.String title; 2459 core.String title;
2427 /** 2460
2428 * The type of the organization. The type can be custom or predefined. 2461 /// The type of the organization. The type can be custom or predefined.
2429 * Possible values include, but are not limited to, the following: 2462 /// Possible values include, but are not limited to, the following:
2430 * 2463 ///
2431 * * `work` 2464 /// * `work`
2432 * * `school` 2465 /// * `school`
2433 */
2434 core.String type; 2466 core.String type;
2435 2467
2436 Organization(); 2468 Organization();
2437 2469
2438 Organization.fromJson(core.Map _json) { 2470 Organization.fromJson(core.Map _json) {
2439 if (_json.containsKey("current")) { 2471 if (_json.containsKey("current")) {
2440 current = _json["current"]; 2472 current = _json["current"];
2441 } 2473 }
2442 if (_json.containsKey("department")) { 2474 if (_json.containsKey("department")) {
2443 department = _json["department"]; 2475 department = _json["department"];
(...skipping 30 matching lines...) Expand all
2474 } 2506 }
2475 if (_json.containsKey("title")) { 2507 if (_json.containsKey("title")) {
2476 title = _json["title"]; 2508 title = _json["title"];
2477 } 2509 }
2478 if (_json.containsKey("type")) { 2510 if (_json.containsKey("type")) {
2479 type = _json["type"]; 2511 type = _json["type"];
2480 } 2512 }
2481 } 2513 }
2482 2514
2483 core.Map<core.String, core.Object> toJson() { 2515 core.Map<core.String, core.Object> toJson() {
2484 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2516 final core.Map<core.String, core.Object> _json =
2517 new core.Map<core.String, core.Object>();
2485 if (current != null) { 2518 if (current != null) {
2486 _json["current"] = current; 2519 _json["current"] = current;
2487 } 2520 }
2488 if (department != null) { 2521 if (department != null) {
2489 _json["department"] = department; 2522 _json["department"] = department;
2490 } 2523 }
2491 if (domain != null) { 2524 if (domain != null) {
2492 _json["domain"] = domain; 2525 _json["domain"] = domain;
2493 } 2526 }
2494 if (endDate != null) { 2527 if (endDate != null) {
(...skipping 26 matching lines...) Expand all
2521 if (title != null) { 2554 if (title != null) {
2522 _json["title"] = title; 2555 _json["title"] = title;
2523 } 2556 }
2524 if (type != null) { 2557 if (type != null) {
2525 _json["type"] = type; 2558 _json["type"] = type;
2526 } 2559 }
2527 return _json; 2560 return _json;
2528 } 2561 }
2529 } 2562 }
2530 2563
2531 /** 2564 /// Information about a person merged from various data sources such as the
2532 * Information about a person merged from various data sources such as the 2565 /// authenticated user's contacts and profile data.
2533 * authenticated user's contacts and profile data. 2566 ///
2534 * 2567 /// Most fields can have multiple items. The items in a field have no
2535 * Most fields can have multiple items. The items in a field have no guaranteed 2568 /// guaranteed
2536 * order, but each non-empty field is guaranteed to have exactly one field with 2569 /// order, but each non-empty field is guaranteed to have exactly one field
2537 * `metadata.primary` set to true. 2570 /// with
2538 */ 2571 /// `metadata.primary` set to true.
2539 class Person { 2572 class Person {
2540 /** The person's street addresses. */ 2573 /// The person's street addresses.
2541 core.List<Address> addresses; 2574 core.List<Address> addresses;
2542 /** 2575
2543 * **DEPRECATED** (Please use `person.ageRanges` instead)** 2576 /// **DEPRECATED** (Please use `person.ageRanges` instead)**
2544 * 2577 ///
2545 * The person's read-only age range. 2578 /// The person's read-only age range.
2546 * Possible string values are: 2579 /// Possible string values are:
2547 * - "AGE_RANGE_UNSPECIFIED" : Unspecified. 2580 /// - "AGE_RANGE_UNSPECIFIED" : Unspecified.
2548 * - "LESS_THAN_EIGHTEEN" : Younger than eighteen. 2581 /// - "LESS_THAN_EIGHTEEN" : Younger than eighteen.
2549 * - "EIGHTEEN_TO_TWENTY" : Between eighteen and twenty. 2582 /// - "EIGHTEEN_TO_TWENTY" : Between eighteen and twenty.
2550 * - "TWENTY_ONE_OR_OLDER" : Twenty-one and older. 2583 /// - "TWENTY_ONE_OR_OLDER" : Twenty-one and older.
2551 */
2552 core.String ageRange; 2584 core.String ageRange;
2553 /** The person's read-only age ranges. */ 2585
2586 /// The person's read-only age ranges.
2554 core.List<AgeRangeType> ageRanges; 2587 core.List<AgeRangeType> ageRanges;
2555 /** The person's biographies. */ 2588
2589 /// The person's biographies.
2556 core.List<Biography> biographies; 2590 core.List<Biography> biographies;
2557 /** The person's birthdays. */ 2591
2592 /// The person's birthdays.
2558 core.List<Birthday> birthdays; 2593 core.List<Birthday> birthdays;
2559 /** The person's bragging rights. */ 2594
2595 /// The person's bragging rights.
2560 core.List<BraggingRights> braggingRights; 2596 core.List<BraggingRights> braggingRights;
2561 /** The person's read-only cover photos. */ 2597
2598 /// The person's read-only cover photos.
2562 core.List<CoverPhoto> coverPhotos; 2599 core.List<CoverPhoto> coverPhotos;
2563 /** The person's email addresses. */ 2600
2601 /// The person's email addresses.
2564 core.List<EmailAddress> emailAddresses; 2602 core.List<EmailAddress> emailAddresses;
2565 /** 2603
2566 * The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the 2604 /// The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the
2567 * resource. Used for web cache validation. 2605 /// resource. Used for web cache validation.
2568 */
2569 core.String etag; 2606 core.String etag;
2570 /** The person's events. */ 2607
2608 /// The person's events.
2571 core.List<Event> events; 2609 core.List<Event> events;
2572 /** The person's genders. */ 2610
2611 /// The person's genders.
2573 core.List<Gender> genders; 2612 core.List<Gender> genders;
2574 /** The person's instant messaging clients. */ 2613
2614 /// The person's instant messaging clients.
2575 core.List<ImClient> imClients; 2615 core.List<ImClient> imClients;
2576 /** The person's interests. */ 2616
2617 /// The person's interests.
2577 core.List<Interest> interests; 2618 core.List<Interest> interests;
2578 /** The person's locale preferences. */ 2619
2620 /// The person's locale preferences.
2579 core.List<Locale> locales; 2621 core.List<Locale> locales;
2580 /** The person's read-only group memberships. */ 2622
2623 /// The person's read-only group memberships.
2581 core.List<Membership> memberships; 2624 core.List<Membership> memberships;
2582 /** Read-only metadata about the person. */ 2625
2626 /// Read-only metadata about the person.
2583 PersonMetadata metadata; 2627 PersonMetadata metadata;
2584 /** The person's names. */ 2628
2629 /// The person's names.
2585 core.List<Name> names; 2630 core.List<Name> names;
2586 /** The person's nicknames. */ 2631
2632 /// The person's nicknames.
2587 core.List<Nickname> nicknames; 2633 core.List<Nickname> nicknames;
2588 /** The person's occupations. */ 2634
2635 /// The person's occupations.
2589 core.List<Occupation> occupations; 2636 core.List<Occupation> occupations;
2590 /** The person's past or current organizations. */ 2637
2638 /// The person's past or current organizations.
2591 core.List<Organization> organizations; 2639 core.List<Organization> organizations;
2592 /** The person's phone numbers. */ 2640
2641 /// The person's phone numbers.
2593 core.List<PhoneNumber> phoneNumbers; 2642 core.List<PhoneNumber> phoneNumbers;
2594 /** The person's read-only photos. */ 2643
2644 /// The person's read-only photos.
2595 core.List<Photo> photos; 2645 core.List<Photo> photos;
2596 /** The person's relations. */ 2646
2647 /// The person's relations.
2597 core.List<Relation> relations; 2648 core.List<Relation> relations;
2598 /** The person's read-only relationship interests. */ 2649
2650 /// The person's read-only relationship interests.
2599 core.List<RelationshipInterest> relationshipInterests; 2651 core.List<RelationshipInterest> relationshipInterests;
2600 /** The person's read-only relationship statuses. */ 2652
2653 /// The person's read-only relationship statuses.
2601 core.List<RelationshipStatus> relationshipStatuses; 2654 core.List<RelationshipStatus> relationshipStatuses;
2602 /** The person's residences. */ 2655
2656 /// The person's residences.
2603 core.List<Residence> residences; 2657 core.List<Residence> residences;
2604 /** 2658
2605 * The resource name for the person, assigned by the server. An ASCII string 2659 /// The resource name for the person, assigned by the server. An ASCII string
2606 * with a max length of 27 characters, in the form of 2660 /// with a max length of 27 characters, in the form of
2607 * `people/`<var>person_id</var>. 2661 /// `people/`<var>person_id</var>.
2608 */
2609 core.String resourceName; 2662 core.String resourceName;
2610 /** The person's skills. */ 2663
2664 /// The person's skills.
2611 core.List<Skill> skills; 2665 core.List<Skill> skills;
2612 /** The person's read-only taglines. */ 2666
2667 /// The person's read-only taglines.
2613 core.List<Tagline> taglines; 2668 core.List<Tagline> taglines;
2614 /** The person's associated URLs. */ 2669
2670 /// The person's associated URLs.
2615 core.List<Url> urls; 2671 core.List<Url> urls;
2616 2672
2673 /// The person's user defined data.
2674 core.List<UserDefined> userDefined;
2675
2617 Person(); 2676 Person();
2618 2677
2619 Person.fromJson(core.Map _json) { 2678 Person.fromJson(core.Map _json) {
2620 if (_json.containsKey("addresses")) { 2679 if (_json.containsKey("addresses")) {
2621 addresses = _json["addresses"].map((value) => new Address.fromJson(value)) .toList(); 2680 addresses = _json["addresses"]
2681 .map((value) => new Address.fromJson(value))
2682 .toList();
2622 } 2683 }
2623 if (_json.containsKey("ageRange")) { 2684 if (_json.containsKey("ageRange")) {
2624 ageRange = _json["ageRange"]; 2685 ageRange = _json["ageRange"];
2625 } 2686 }
2626 if (_json.containsKey("ageRanges")) { 2687 if (_json.containsKey("ageRanges")) {
2627 ageRanges = _json["ageRanges"].map((value) => new AgeRangeType.fromJson(va lue)).toList(); 2688 ageRanges = _json["ageRanges"]
2689 .map((value) => new AgeRangeType.fromJson(value))
2690 .toList();
2628 } 2691 }
2629 if (_json.containsKey("biographies")) { 2692 if (_json.containsKey("biographies")) {
2630 biographies = _json["biographies"].map((value) => new Biography.fromJson(v alue)).toList(); 2693 biographies = _json["biographies"]
2694 .map((value) => new Biography.fromJson(value))
2695 .toList();
2631 } 2696 }
2632 if (_json.containsKey("birthdays")) { 2697 if (_json.containsKey("birthdays")) {
2633 birthdays = _json["birthdays"].map((value) => new Birthday.fromJson(value) ).toList(); 2698 birthdays = _json["birthdays"]
2699 .map((value) => new Birthday.fromJson(value))
2700 .toList();
2634 } 2701 }
2635 if (_json.containsKey("braggingRights")) { 2702 if (_json.containsKey("braggingRights")) {
2636 braggingRights = _json["braggingRights"].map((value) => new BraggingRights .fromJson(value)).toList(); 2703 braggingRights = _json["braggingRights"]
2704 .map((value) => new BraggingRights.fromJson(value))
2705 .toList();
2637 } 2706 }
2638 if (_json.containsKey("coverPhotos")) { 2707 if (_json.containsKey("coverPhotos")) {
2639 coverPhotos = _json["coverPhotos"].map((value) => new CoverPhoto.fromJson( value)).toList(); 2708 coverPhotos = _json["coverPhotos"]
2709 .map((value) => new CoverPhoto.fromJson(value))
2710 .toList();
2640 } 2711 }
2641 if (_json.containsKey("emailAddresses")) { 2712 if (_json.containsKey("emailAddresses")) {
2642 emailAddresses = _json["emailAddresses"].map((value) => new EmailAddress.f romJson(value)).toList(); 2713 emailAddresses = _json["emailAddresses"]
2714 .map((value) => new EmailAddress.fromJson(value))
2715 .toList();
2643 } 2716 }
2644 if (_json.containsKey("etag")) { 2717 if (_json.containsKey("etag")) {
2645 etag = _json["etag"]; 2718 etag = _json["etag"];
2646 } 2719 }
2647 if (_json.containsKey("events")) { 2720 if (_json.containsKey("events")) {
2648 events = _json["events"].map((value) => new Event.fromJson(value)).toList( ); 2721 events =
2722 _json["events"].map((value) => new Event.fromJson(value)).toList();
2649 } 2723 }
2650 if (_json.containsKey("genders")) { 2724 if (_json.containsKey("genders")) {
2651 genders = _json["genders"].map((value) => new Gender.fromJson(value)).toLi st(); 2725 genders =
2726 _json["genders"].map((value) => new Gender.fromJson(value)).toList();
2652 } 2727 }
2653 if (_json.containsKey("imClients")) { 2728 if (_json.containsKey("imClients")) {
2654 imClients = _json["imClients"].map((value) => new ImClient.fromJson(value) ).toList(); 2729 imClients = _json["imClients"]
2730 .map((value) => new ImClient.fromJson(value))
2731 .toList();
2655 } 2732 }
2656 if (_json.containsKey("interests")) { 2733 if (_json.containsKey("interests")) {
2657 interests = _json["interests"].map((value) => new Interest.fromJson(value) ).toList(); 2734 interests = _json["interests"]
2735 .map((value) => new Interest.fromJson(value))
2736 .toList();
2658 } 2737 }
2659 if (_json.containsKey("locales")) { 2738 if (_json.containsKey("locales")) {
2660 locales = _json["locales"].map((value) => new Locale.fromJson(value)).toLi st(); 2739 locales =
2740 _json["locales"].map((value) => new Locale.fromJson(value)).toList();
2661 } 2741 }
2662 if (_json.containsKey("memberships")) { 2742 if (_json.containsKey("memberships")) {
2663 memberships = _json["memberships"].map((value) => new Membership.fromJson( value)).toList(); 2743 memberships = _json["memberships"]
2744 .map((value) => new Membership.fromJson(value))
2745 .toList();
2664 } 2746 }
2665 if (_json.containsKey("metadata")) { 2747 if (_json.containsKey("metadata")) {
2666 metadata = new PersonMetadata.fromJson(_json["metadata"]); 2748 metadata = new PersonMetadata.fromJson(_json["metadata"]);
2667 } 2749 }
2668 if (_json.containsKey("names")) { 2750 if (_json.containsKey("names")) {
2669 names = _json["names"].map((value) => new Name.fromJson(value)).toList(); 2751 names = _json["names"].map((value) => new Name.fromJson(value)).toList();
2670 } 2752 }
2671 if (_json.containsKey("nicknames")) { 2753 if (_json.containsKey("nicknames")) {
2672 nicknames = _json["nicknames"].map((value) => new Nickname.fromJson(value) ).toList(); 2754 nicknames = _json["nicknames"]
2755 .map((value) => new Nickname.fromJson(value))
2756 .toList();
2673 } 2757 }
2674 if (_json.containsKey("occupations")) { 2758 if (_json.containsKey("occupations")) {
2675 occupations = _json["occupations"].map((value) => new Occupation.fromJson( value)).toList(); 2759 occupations = _json["occupations"]
2760 .map((value) => new Occupation.fromJson(value))
2761 .toList();
2676 } 2762 }
2677 if (_json.containsKey("organizations")) { 2763 if (_json.containsKey("organizations")) {
2678 organizations = _json["organizations"].map((value) => new Organization.fro mJson(value)).toList(); 2764 organizations = _json["organizations"]
2765 .map((value) => new Organization.fromJson(value))
2766 .toList();
2679 } 2767 }
2680 if (_json.containsKey("phoneNumbers")) { 2768 if (_json.containsKey("phoneNumbers")) {
2681 phoneNumbers = _json["phoneNumbers"].map((value) => new PhoneNumber.fromJs on(value)).toList(); 2769 phoneNumbers = _json["phoneNumbers"]
2770 .map((value) => new PhoneNumber.fromJson(value))
2771 .toList();
2682 } 2772 }
2683 if (_json.containsKey("photos")) { 2773 if (_json.containsKey("photos")) {
2684 photos = _json["photos"].map((value) => new Photo.fromJson(value)).toList( ); 2774 photos =
2775 _json["photos"].map((value) => new Photo.fromJson(value)).toList();
2685 } 2776 }
2686 if (_json.containsKey("relations")) { 2777 if (_json.containsKey("relations")) {
2687 relations = _json["relations"].map((value) => new Relation.fromJson(value) ).toList(); 2778 relations = _json["relations"]
2779 .map((value) => new Relation.fromJson(value))
2780 .toList();
2688 } 2781 }
2689 if (_json.containsKey("relationshipInterests")) { 2782 if (_json.containsKey("relationshipInterests")) {
2690 relationshipInterests = _json["relationshipInterests"].map((value) => new RelationshipInterest.fromJson(value)).toList(); 2783 relationshipInterests = _json["relationshipInterests"]
2784 .map((value) => new RelationshipInterest.fromJson(value))
2785 .toList();
2691 } 2786 }
2692 if (_json.containsKey("relationshipStatuses")) { 2787 if (_json.containsKey("relationshipStatuses")) {
2693 relationshipStatuses = _json["relationshipStatuses"].map((value) => new Re lationshipStatus.fromJson(value)).toList(); 2788 relationshipStatuses = _json["relationshipStatuses"]
2789 .map((value) => new RelationshipStatus.fromJson(value))
2790 .toList();
2694 } 2791 }
2695 if (_json.containsKey("residences")) { 2792 if (_json.containsKey("residences")) {
2696 residences = _json["residences"].map((value) => new Residence.fromJson(val ue)).toList(); 2793 residences = _json["residences"]
2794 .map((value) => new Residence.fromJson(value))
2795 .toList();
2697 } 2796 }
2698 if (_json.containsKey("resourceName")) { 2797 if (_json.containsKey("resourceName")) {
2699 resourceName = _json["resourceName"]; 2798 resourceName = _json["resourceName"];
2700 } 2799 }
2701 if (_json.containsKey("skills")) { 2800 if (_json.containsKey("skills")) {
2702 skills = _json["skills"].map((value) => new Skill.fromJson(value)).toList( ); 2801 skills =
2802 _json["skills"].map((value) => new Skill.fromJson(value)).toList();
2703 } 2803 }
2704 if (_json.containsKey("taglines")) { 2804 if (_json.containsKey("taglines")) {
2705 taglines = _json["taglines"].map((value) => new Tagline.fromJson(value)).t oList(); 2805 taglines = _json["taglines"]
2806 .map((value) => new Tagline.fromJson(value))
2807 .toList();
2706 } 2808 }
2707 if (_json.containsKey("urls")) { 2809 if (_json.containsKey("urls")) {
2708 urls = _json["urls"].map((value) => new Url.fromJson(value)).toList(); 2810 urls = _json["urls"].map((value) => new Url.fromJson(value)).toList();
2709 } 2811 }
2812 if (_json.containsKey("userDefined")) {
2813 userDefined = _json["userDefined"]
2814 .map((value) => new UserDefined.fromJson(value))
2815 .toList();
2816 }
2710 } 2817 }
2711 2818
2712 core.Map<core.String, core.Object> toJson() { 2819 core.Map<core.String, core.Object> toJson() {
2713 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2820 final core.Map<core.String, core.Object> _json =
2821 new core.Map<core.String, core.Object>();
2714 if (addresses != null) { 2822 if (addresses != null) {
2715 _json["addresses"] = addresses.map((value) => (value).toJson()).toList(); 2823 _json["addresses"] = addresses.map((value) => (value).toJson()).toList();
2716 } 2824 }
2717 if (ageRange != null) { 2825 if (ageRange != null) {
2718 _json["ageRange"] = ageRange; 2826 _json["ageRange"] = ageRange;
2719 } 2827 }
2720 if (ageRanges != null) { 2828 if (ageRanges != null) {
2721 _json["ageRanges"] = ageRanges.map((value) => (value).toJson()).toList(); 2829 _json["ageRanges"] = ageRanges.map((value) => (value).toJson()).toList();
2722 } 2830 }
2723 if (biographies != null) { 2831 if (biographies != null) {
2724 _json["biographies"] = biographies.map((value) => (value).toJson()).toList (); 2832 _json["biographies"] =
2833 biographies.map((value) => (value).toJson()).toList();
2725 } 2834 }
2726 if (birthdays != null) { 2835 if (birthdays != null) {
2727 _json["birthdays"] = birthdays.map((value) => (value).toJson()).toList(); 2836 _json["birthdays"] = birthdays.map((value) => (value).toJson()).toList();
2728 } 2837 }
2729 if (braggingRights != null) { 2838 if (braggingRights != null) {
2730 _json["braggingRights"] = braggingRights.map((value) => (value).toJson()). toList(); 2839 _json["braggingRights"] =
2840 braggingRights.map((value) => (value).toJson()).toList();
2731 } 2841 }
2732 if (coverPhotos != null) { 2842 if (coverPhotos != null) {
2733 _json["coverPhotos"] = coverPhotos.map((value) => (value).toJson()).toList (); 2843 _json["coverPhotos"] =
2844 coverPhotos.map((value) => (value).toJson()).toList();
2734 } 2845 }
2735 if (emailAddresses != null) { 2846 if (emailAddresses != null) {
2736 _json["emailAddresses"] = emailAddresses.map((value) => (value).toJson()). toList(); 2847 _json["emailAddresses"] =
2848 emailAddresses.map((value) => (value).toJson()).toList();
2737 } 2849 }
2738 if (etag != null) { 2850 if (etag != null) {
2739 _json["etag"] = etag; 2851 _json["etag"] = etag;
2740 } 2852 }
2741 if (events != null) { 2853 if (events != null) {
2742 _json["events"] = events.map((value) => (value).toJson()).toList(); 2854 _json["events"] = events.map((value) => (value).toJson()).toList();
2743 } 2855 }
2744 if (genders != null) { 2856 if (genders != null) {
2745 _json["genders"] = genders.map((value) => (value).toJson()).toList(); 2857 _json["genders"] = genders.map((value) => (value).toJson()).toList();
2746 } 2858 }
2747 if (imClients != null) { 2859 if (imClients != null) {
2748 _json["imClients"] = imClients.map((value) => (value).toJson()).toList(); 2860 _json["imClients"] = imClients.map((value) => (value).toJson()).toList();
2749 } 2861 }
2750 if (interests != null) { 2862 if (interests != null) {
2751 _json["interests"] = interests.map((value) => (value).toJson()).toList(); 2863 _json["interests"] = interests.map((value) => (value).toJson()).toList();
2752 } 2864 }
2753 if (locales != null) { 2865 if (locales != null) {
2754 _json["locales"] = locales.map((value) => (value).toJson()).toList(); 2866 _json["locales"] = locales.map((value) => (value).toJson()).toList();
2755 } 2867 }
2756 if (memberships != null) { 2868 if (memberships != null) {
2757 _json["memberships"] = memberships.map((value) => (value).toJson()).toList (); 2869 _json["memberships"] =
2870 memberships.map((value) => (value).toJson()).toList();
2758 } 2871 }
2759 if (metadata != null) { 2872 if (metadata != null) {
2760 _json["metadata"] = (metadata).toJson(); 2873 _json["metadata"] = (metadata).toJson();
2761 } 2874 }
2762 if (names != null) { 2875 if (names != null) {
2763 _json["names"] = names.map((value) => (value).toJson()).toList(); 2876 _json["names"] = names.map((value) => (value).toJson()).toList();
2764 } 2877 }
2765 if (nicknames != null) { 2878 if (nicknames != null) {
2766 _json["nicknames"] = nicknames.map((value) => (value).toJson()).toList(); 2879 _json["nicknames"] = nicknames.map((value) => (value).toJson()).toList();
2767 } 2880 }
2768 if (occupations != null) { 2881 if (occupations != null) {
2769 _json["occupations"] = occupations.map((value) => (value).toJson()).toList (); 2882 _json["occupations"] =
2883 occupations.map((value) => (value).toJson()).toList();
2770 } 2884 }
2771 if (organizations != null) { 2885 if (organizations != null) {
2772 _json["organizations"] = organizations.map((value) => (value).toJson()).to List(); 2886 _json["organizations"] =
2887 organizations.map((value) => (value).toJson()).toList();
2773 } 2888 }
2774 if (phoneNumbers != null) { 2889 if (phoneNumbers != null) {
2775 _json["phoneNumbers"] = phoneNumbers.map((value) => (value).toJson()).toLi st(); 2890 _json["phoneNumbers"] =
2891 phoneNumbers.map((value) => (value).toJson()).toList();
2776 } 2892 }
2777 if (photos != null) { 2893 if (photos != null) {
2778 _json["photos"] = photos.map((value) => (value).toJson()).toList(); 2894 _json["photos"] = photos.map((value) => (value).toJson()).toList();
2779 } 2895 }
2780 if (relations != null) { 2896 if (relations != null) {
2781 _json["relations"] = relations.map((value) => (value).toJson()).toList(); 2897 _json["relations"] = relations.map((value) => (value).toJson()).toList();
2782 } 2898 }
2783 if (relationshipInterests != null) { 2899 if (relationshipInterests != null) {
2784 _json["relationshipInterests"] = relationshipInterests.map((value) => (val ue).toJson()).toList(); 2900 _json["relationshipInterests"] =
2901 relationshipInterests.map((value) => (value).toJson()).toList();
2785 } 2902 }
2786 if (relationshipStatuses != null) { 2903 if (relationshipStatuses != null) {
2787 _json["relationshipStatuses"] = relationshipStatuses.map((value) => (value ).toJson()).toList(); 2904 _json["relationshipStatuses"] =
2905 relationshipStatuses.map((value) => (value).toJson()).toList();
2788 } 2906 }
2789 if (residences != null) { 2907 if (residences != null) {
2790 _json["residences"] = residences.map((value) => (value).toJson()).toList() ; 2908 _json["residences"] =
2909 residences.map((value) => (value).toJson()).toList();
2791 } 2910 }
2792 if (resourceName != null) { 2911 if (resourceName != null) {
2793 _json["resourceName"] = resourceName; 2912 _json["resourceName"] = resourceName;
2794 } 2913 }
2795 if (skills != null) { 2914 if (skills != null) {
2796 _json["skills"] = skills.map((value) => (value).toJson()).toList(); 2915 _json["skills"] = skills.map((value) => (value).toJson()).toList();
2797 } 2916 }
2798 if (taglines != null) { 2917 if (taglines != null) {
2799 _json["taglines"] = taglines.map((value) => (value).toJson()).toList(); 2918 _json["taglines"] = taglines.map((value) => (value).toJson()).toList();
2800 } 2919 }
2801 if (urls != null) { 2920 if (urls != null) {
2802 _json["urls"] = urls.map((value) => (value).toJson()).toList(); 2921 _json["urls"] = urls.map((value) => (value).toJson()).toList();
2803 } 2922 }
2923 if (userDefined != null) {
2924 _json["userDefined"] =
2925 userDefined.map((value) => (value).toJson()).toList();
2926 }
2804 return _json; 2927 return _json;
2805 } 2928 }
2806 } 2929 }
2807 2930
2808 /** The read-only metadata about a person. */ 2931 /// The read-only metadata about a person.
2809 class PersonMetadata { 2932 class PersonMetadata {
2810 /** 2933 /// True if the person resource has been deleted. Populated only for
2811 * True if the person resource has been deleted. Populated only for 2934 /// [`connections.list`](/people/api/rest/v1/people.connections/list)
2812 * [`connections.list`](/people/api/rest/v1/people.connections/list) requests 2935 /// requests
2813 * that include a sync token. 2936 /// that include a sync token.
2814 */
2815 core.bool deleted; 2937 core.bool deleted;
2816 /** Resource names of people linked to this resource. */ 2938
2939 /// Resource names of people linked to this resource.
2817 core.List<core.String> linkedPeopleResourceNames; 2940 core.List<core.String> linkedPeopleResourceNames;
2818 /** 2941
2819 * **DEPRECATED** (Please use 2942 /// **DEPRECATED** (Please use
2820 * `person.metadata.sources.profileMetadata.objectType` instead) 2943 /// `person.metadata.sources.profileMetadata.objectType` instead)
2821 * 2944 ///
2822 * The type of the person object. 2945 /// The type of the person object.
2823 * Possible string values are: 2946 /// Possible string values are:
2824 * - "OBJECT_TYPE_UNSPECIFIED" : Unspecified. 2947 /// - "OBJECT_TYPE_UNSPECIFIED" : Unspecified.
2825 * - "PERSON" : Person. 2948 /// - "PERSON" : Person.
2826 * - "PAGE" : [Google+ Page.](http://www.google.com/+/brands/) 2949 /// - "PAGE" : [Google+ Page.](http://www.google.com/+/brands/)
2827 */
2828 core.String objectType; 2950 core.String objectType;
2829 /** 2951
2830 * Any former resource names this person has had. Populated only for 2952 /// Any former resource names this person has had. Populated only for
2831 * [`connections.list`](/people/api/rest/v1/people.connections/list) requests 2953 /// [`connections.list`](/people/api/rest/v1/people.connections/list)
2832 * that include a sync token. 2954 /// requests
2833 * 2955 /// that include a sync token.
2834 * The resource name may change when adding or removing fields that link a 2956 ///
2835 * contact and profile such as a verified email, verified phone number, or 2957 /// The resource name may change when adding or removing fields that link a
2836 * profile URL. 2958 /// contact and profile such as a verified email, verified phone number, or
2837 */ 2959 /// profile URL.
2838 core.List<core.String> previousResourceNames; 2960 core.List<core.String> previousResourceNames;
2839 /** The sources of data for the person. */ 2961
2962 /// The sources of data for the person.
2840 core.List<Source> sources; 2963 core.List<Source> sources;
2841 2964
2842 PersonMetadata(); 2965 PersonMetadata();
2843 2966
2844 PersonMetadata.fromJson(core.Map _json) { 2967 PersonMetadata.fromJson(core.Map _json) {
2845 if (_json.containsKey("deleted")) { 2968 if (_json.containsKey("deleted")) {
2846 deleted = _json["deleted"]; 2969 deleted = _json["deleted"];
2847 } 2970 }
2848 if (_json.containsKey("linkedPeopleResourceNames")) { 2971 if (_json.containsKey("linkedPeopleResourceNames")) {
2849 linkedPeopleResourceNames = _json["linkedPeopleResourceNames"]; 2972 linkedPeopleResourceNames = _json["linkedPeopleResourceNames"];
2850 } 2973 }
2851 if (_json.containsKey("objectType")) { 2974 if (_json.containsKey("objectType")) {
2852 objectType = _json["objectType"]; 2975 objectType = _json["objectType"];
2853 } 2976 }
2854 if (_json.containsKey("previousResourceNames")) { 2977 if (_json.containsKey("previousResourceNames")) {
2855 previousResourceNames = _json["previousResourceNames"]; 2978 previousResourceNames = _json["previousResourceNames"];
2856 } 2979 }
2857 if (_json.containsKey("sources")) { 2980 if (_json.containsKey("sources")) {
2858 sources = _json["sources"].map((value) => new Source.fromJson(value)).toLi st(); 2981 sources =
2982 _json["sources"].map((value) => new Source.fromJson(value)).toList();
2859 } 2983 }
2860 } 2984 }
2861 2985
2862 core.Map<core.String, core.Object> toJson() { 2986 core.Map<core.String, core.Object> toJson() {
2863 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2987 final core.Map<core.String, core.Object> _json =
2988 new core.Map<core.String, core.Object>();
2864 if (deleted != null) { 2989 if (deleted != null) {
2865 _json["deleted"] = deleted; 2990 _json["deleted"] = deleted;
2866 } 2991 }
2867 if (linkedPeopleResourceNames != null) { 2992 if (linkedPeopleResourceNames != null) {
2868 _json["linkedPeopleResourceNames"] = linkedPeopleResourceNames; 2993 _json["linkedPeopleResourceNames"] = linkedPeopleResourceNames;
2869 } 2994 }
2870 if (objectType != null) { 2995 if (objectType != null) {
2871 _json["objectType"] = objectType; 2996 _json["objectType"] = objectType;
2872 } 2997 }
2873 if (previousResourceNames != null) { 2998 if (previousResourceNames != null) {
2874 _json["previousResourceNames"] = previousResourceNames; 2999 _json["previousResourceNames"] = previousResourceNames;
2875 } 3000 }
2876 if (sources != null) { 3001 if (sources != null) {
2877 _json["sources"] = sources.map((value) => (value).toJson()).toList(); 3002 _json["sources"] = sources.map((value) => (value).toJson()).toList();
2878 } 3003 }
2879 return _json; 3004 return _json;
2880 } 3005 }
2881 } 3006 }
2882 3007
2883 /** The response for a single person */ 3008 /// The response for a single person
2884 class PersonResponse { 3009 class PersonResponse {
2885 /** 3010 /// **DEPRECATED** (Please use status instead)
2886 * **DEPRECATED** (Please use status instead) 3011 ///
2887 * 3012 /// [HTTP 1.1 status code]
2888 * [HTTP 1.1 status code] 3013 /// (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).
2889 * (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).
2890 */
2891 core.int httpStatusCode; 3014 core.int httpStatusCode;
2892 /** The person. */ 3015
3016 /// The person.
2893 Person person; 3017 Person person;
2894 /** 3018
2895 * The original requested resource name. May be different than the resource 3019 /// The original requested resource name. May be different than the resource
2896 * name on the returned person. 3020 /// name on the returned person.
2897 * 3021 ///
2898 * The resource name can change when adding or removing fields that link a 3022 /// The resource name can change when adding or removing fields that link a
2899 * contact and profile such as a verified email, verified phone number, or a 3023 /// contact and profile such as a verified email, verified phone number, or a
2900 * profile URL. 3024 /// profile URL.
2901 */
2902 core.String requestedResourceName; 3025 core.String requestedResourceName;
2903 /** The status of the response. */ 3026
3027 /// The status of the response.
2904 Status status; 3028 Status status;
2905 3029
2906 PersonResponse(); 3030 PersonResponse();
2907 3031
2908 PersonResponse.fromJson(core.Map _json) { 3032 PersonResponse.fromJson(core.Map _json) {
2909 if (_json.containsKey("httpStatusCode")) { 3033 if (_json.containsKey("httpStatusCode")) {
2910 httpStatusCode = _json["httpStatusCode"]; 3034 httpStatusCode = _json["httpStatusCode"];
2911 } 3035 }
2912 if (_json.containsKey("person")) { 3036 if (_json.containsKey("person")) {
2913 person = new Person.fromJson(_json["person"]); 3037 person = new Person.fromJson(_json["person"]);
2914 } 3038 }
2915 if (_json.containsKey("requestedResourceName")) { 3039 if (_json.containsKey("requestedResourceName")) {
2916 requestedResourceName = _json["requestedResourceName"]; 3040 requestedResourceName = _json["requestedResourceName"];
2917 } 3041 }
2918 if (_json.containsKey("status")) { 3042 if (_json.containsKey("status")) {
2919 status = new Status.fromJson(_json["status"]); 3043 status = new Status.fromJson(_json["status"]);
2920 } 3044 }
2921 } 3045 }
2922 3046
2923 core.Map<core.String, core.Object> toJson() { 3047 core.Map<core.String, core.Object> toJson() {
2924 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3048 final core.Map<core.String, core.Object> _json =
3049 new core.Map<core.String, core.Object>();
2925 if (httpStatusCode != null) { 3050 if (httpStatusCode != null) {
2926 _json["httpStatusCode"] = httpStatusCode; 3051 _json["httpStatusCode"] = httpStatusCode;
2927 } 3052 }
2928 if (person != null) { 3053 if (person != null) {
2929 _json["person"] = (person).toJson(); 3054 _json["person"] = (person).toJson();
2930 } 3055 }
2931 if (requestedResourceName != null) { 3056 if (requestedResourceName != null) {
2932 _json["requestedResourceName"] = requestedResourceName; 3057 _json["requestedResourceName"] = requestedResourceName;
2933 } 3058 }
2934 if (status != null) { 3059 if (status != null) {
2935 _json["status"] = (status).toJson(); 3060 _json["status"] = (status).toJson();
2936 } 3061 }
2937 return _json; 3062 return _json;
2938 } 3063 }
2939 } 3064 }
2940 3065
2941 /** A person's phone number. */ 3066 /// A person's phone number.
2942 class PhoneNumber { 3067 class PhoneNumber {
2943 /** 3068 /// The read-only canonicalized [ITU-T
2944 * The read-only canonicalized [ITU-T 3069 /// E.164](https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.1.2008.pdf)
2945 * E.164](https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.1.2008.pdf) 3070 /// form of the phone number.
2946 * form of the phone number.
2947 */
2948 core.String canonicalForm; 3071 core.String canonicalForm;
2949 /** 3072
2950 * The read-only type of the phone number translated and formatted in the 3073 /// The read-only type of the phone number translated and formatted in the
2951 * viewer's account locale or the `Accept-Language` HTTP header locale. 3074 /// viewer's account locale or the `Accept-Language` HTTP header locale.
2952 */
2953 core.String formattedType; 3075 core.String formattedType;
2954 /** Metadata about the phone number. */ 3076
3077 /// Metadata about the phone number.
2955 FieldMetadata metadata; 3078 FieldMetadata metadata;
2956 /** 3079
2957 * The type of the phone number. The type can be custom or predefined. 3080 /// The type of the phone number. The type can be custom or predefined.
2958 * Possible values include, but are not limited to, the following: 3081 /// Possible values include, but are not limited to, the following:
2959 * 3082 ///
2960 * * `home` 3083 /// * `home`
2961 * * `work` 3084 /// * `work`
2962 * * `mobile` 3085 /// * `mobile`
2963 * * `homeFax` 3086 /// * `homeFax`
2964 * * `workFax` 3087 /// * `workFax`
2965 * * `otherFax` 3088 /// * `otherFax`
2966 * * `pager` 3089 /// * `pager`
2967 * * `workMobile` 3090 /// * `workMobile`
2968 * * `workPager` 3091 /// * `workPager`
2969 * * `main` 3092 /// * `main`
2970 * * `googleVoice` 3093 /// * `googleVoice`
2971 * * `other` 3094 /// * `other`
2972 */
2973 core.String type; 3095 core.String type;
2974 /** The phone number. */ 3096
3097 /// The phone number.
2975 core.String value; 3098 core.String value;
2976 3099
2977 PhoneNumber(); 3100 PhoneNumber();
2978 3101
2979 PhoneNumber.fromJson(core.Map _json) { 3102 PhoneNumber.fromJson(core.Map _json) {
2980 if (_json.containsKey("canonicalForm")) { 3103 if (_json.containsKey("canonicalForm")) {
2981 canonicalForm = _json["canonicalForm"]; 3104 canonicalForm = _json["canonicalForm"];
2982 } 3105 }
2983 if (_json.containsKey("formattedType")) { 3106 if (_json.containsKey("formattedType")) {
2984 formattedType = _json["formattedType"]; 3107 formattedType = _json["formattedType"];
2985 } 3108 }
2986 if (_json.containsKey("metadata")) { 3109 if (_json.containsKey("metadata")) {
2987 metadata = new FieldMetadata.fromJson(_json["metadata"]); 3110 metadata = new FieldMetadata.fromJson(_json["metadata"]);
2988 } 3111 }
2989 if (_json.containsKey("type")) { 3112 if (_json.containsKey("type")) {
2990 type = _json["type"]; 3113 type = _json["type"];
2991 } 3114 }
2992 if (_json.containsKey("value")) { 3115 if (_json.containsKey("value")) {
2993 value = _json["value"]; 3116 value = _json["value"];
2994 } 3117 }
2995 } 3118 }
2996 3119
2997 core.Map<core.String, core.Object> toJson() { 3120 core.Map<core.String, core.Object> toJson() {
2998 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3121 final core.Map<core.String, core.Object> _json =
3122 new core.Map<core.String, core.Object>();
2999 if (canonicalForm != null) { 3123 if (canonicalForm != null) {
3000 _json["canonicalForm"] = canonicalForm; 3124 _json["canonicalForm"] = canonicalForm;
3001 } 3125 }
3002 if (formattedType != null) { 3126 if (formattedType != null) {
3003 _json["formattedType"] = formattedType; 3127 _json["formattedType"] = formattedType;
3004 } 3128 }
3005 if (metadata != null) { 3129 if (metadata != null) {
3006 _json["metadata"] = (metadata).toJson(); 3130 _json["metadata"] = (metadata).toJson();
3007 } 3131 }
3008 if (type != null) { 3132 if (type != null) {
3009 _json["type"] = type; 3133 _json["type"] = type;
3010 } 3134 }
3011 if (value != null) { 3135 if (value != null) {
3012 _json["value"] = value; 3136 _json["value"] = value;
3013 } 3137 }
3014 return _json; 3138 return _json;
3015 } 3139 }
3016 } 3140 }
3017 3141
3018 /** 3142 /// A person's read-only photo. A picture shown next to the person's name to
3019 * A person's read-only photo. A picture shown next to the person's name to 3143 /// help others recognize the person.
3020 * help others recognize the person.
3021 */
3022 class Photo { 3144 class Photo {
3023 /** Metadata about the photo. */ 3145 /// Metadata about the photo.
3024 FieldMetadata metadata; 3146 FieldMetadata metadata;
3025 /** 3147
3026 * The URL of the photo. You can change the desired size by appending a query 3148 /// The URL of the photo. You can change the desired size by appending a
3027 * parameter `sz=`<var>size</var> at the end of the url. Example: 3149 /// query
3028 * `https://lh3.googleusercontent.com/-T_wVWLlmg7w/AAAAAAAAAAI/AAAAAAAABa8/00g zXvDBYqw/s100/photo.jpg?sz=50` 3150 /// parameter `sz=`<var>size</var> at the end of the url. Example:
3029 */ 3151 /// `https://lh3.googleusercontent.com/-T_wVWLlmg7w/AAAAAAAAAAI/AAAAAAAABa8/00 gzXvDBYqw/s100/photo.jpg?sz=50`
3030 core.String url; 3152 core.String url;
3031 3153
3032 Photo(); 3154 Photo();
3033 3155
3034 Photo.fromJson(core.Map _json) { 3156 Photo.fromJson(core.Map _json) {
3035 if (_json.containsKey("metadata")) { 3157 if (_json.containsKey("metadata")) {
3036 metadata = new FieldMetadata.fromJson(_json["metadata"]); 3158 metadata = new FieldMetadata.fromJson(_json["metadata"]);
3037 } 3159 }
3038 if (_json.containsKey("url")) { 3160 if (_json.containsKey("url")) {
3039 url = _json["url"]; 3161 url = _json["url"];
3040 } 3162 }
3041 } 3163 }
3042 3164
3043 core.Map<core.String, core.Object> toJson() { 3165 core.Map<core.String, core.Object> toJson() {
3044 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3166 final core.Map<core.String, core.Object> _json =
3167 new core.Map<core.String, core.Object>();
3045 if (metadata != null) { 3168 if (metadata != null) {
3046 _json["metadata"] = (metadata).toJson(); 3169 _json["metadata"] = (metadata).toJson();
3047 } 3170 }
3048 if (url != null) { 3171 if (url != null) {
3049 _json["url"] = url; 3172 _json["url"] = url;
3050 } 3173 }
3051 return _json; 3174 return _json;
3052 } 3175 }
3053 } 3176 }
3054 3177
3055 /** The read-only metadata about a profile. */ 3178 /// The read-only metadata about a profile.
3056 class ProfileMetadata { 3179 class ProfileMetadata {
3057 /** 3180 /// The profile object type.
3058 * The profile object type. 3181 /// Possible string values are:
3059 * Possible string values are: 3182 /// - "OBJECT_TYPE_UNSPECIFIED" : Unspecified.
3060 * - "OBJECT_TYPE_UNSPECIFIED" : Unspecified. 3183 /// - "PERSON" : Person.
3061 * - "PERSON" : Person. 3184 /// - "PAGE" : [Google+ Page.](http://www.google.com/+/brands/)
3062 * - "PAGE" : [Google+ Page.](http://www.google.com/+/brands/)
3063 */
3064 core.String objectType; 3185 core.String objectType;
3065 /** The user types. */ 3186
3187 /// The user types.
3066 core.List<core.String> userTypes; 3188 core.List<core.String> userTypes;
3067 3189
3068 ProfileMetadata(); 3190 ProfileMetadata();
3069 3191
3070 ProfileMetadata.fromJson(core.Map _json) { 3192 ProfileMetadata.fromJson(core.Map _json) {
3071 if (_json.containsKey("objectType")) { 3193 if (_json.containsKey("objectType")) {
3072 objectType = _json["objectType"]; 3194 objectType = _json["objectType"];
3073 } 3195 }
3074 if (_json.containsKey("userTypes")) { 3196 if (_json.containsKey("userTypes")) {
3075 userTypes = _json["userTypes"]; 3197 userTypes = _json["userTypes"];
3076 } 3198 }
3077 } 3199 }
3078 3200
3079 core.Map<core.String, core.Object> toJson() { 3201 core.Map<core.String, core.Object> toJson() {
3080 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3202 final core.Map<core.String, core.Object> _json =
3203 new core.Map<core.String, core.Object>();
3081 if (objectType != null) { 3204 if (objectType != null) {
3082 _json["objectType"] = objectType; 3205 _json["objectType"] = objectType;
3083 } 3206 }
3084 if (userTypes != null) { 3207 if (userTypes != null) {
3085 _json["userTypes"] = userTypes; 3208 _json["userTypes"] = userTypes;
3086 } 3209 }
3087 return _json; 3210 return _json;
3088 } 3211 }
3089 } 3212 }
3090 3213
3091 /** A person's relation to another person. */ 3214 /// A person's relation to another person.
3092 class Relation { 3215 class Relation {
3093 /** 3216 /// The type of the relation translated and formatted in the viewer's account
3094 * The type of the relation translated and formatted in the viewer's account 3217 /// locale or the locale specified in the Accept-Language HTTP header.
3095 * locale or the locale specified in the Accept-Language HTTP header.
3096 */
3097 core.String formattedType; 3218 core.String formattedType;
3098 /** Metadata about the relation. */ 3219
3220 /// Metadata about the relation.
3099 FieldMetadata metadata; 3221 FieldMetadata metadata;
3100 /** The name of the other person this relation refers to. */ 3222
3223 /// The name of the other person this relation refers to.
3101 core.String person; 3224 core.String person;
3102 /** 3225
3103 * The person's relation to the other person. The type can be custom or 3226 /// The person's relation to the other person. The type can be custom or
3104 * predefined. 3227 /// predefined.
3105 * Possible values include, but are not limited to, the following values: 3228 /// Possible values include, but are not limited to, the following values:
3106 * 3229 ///
3107 * * `spouse` 3230 /// * `spouse`
3108 * * `child` 3231 /// * `child`
3109 * * `mother` 3232 /// * `mother`
3110 * * `father` 3233 /// * `father`
3111 * * `parent` 3234 /// * `parent`
3112 * * `brother` 3235 /// * `brother`
3113 * * `sister` 3236 /// * `sister`
3114 * * `friend` 3237 /// * `friend`
3115 * * `relative` 3238 /// * `relative`
3116 * * `domesticPartner` 3239 /// * `domesticPartner`
3117 * * `manager` 3240 /// * `manager`
3118 * * `assistant` 3241 /// * `assistant`
3119 * * `referredBy` 3242 /// * `referredBy`
3120 * * `partner` 3243 /// * `partner`
3121 */
3122 core.String type; 3244 core.String type;
3123 3245
3124 Relation(); 3246 Relation();
3125 3247
3126 Relation.fromJson(core.Map _json) { 3248 Relation.fromJson(core.Map _json) {
3127 if (_json.containsKey("formattedType")) { 3249 if (_json.containsKey("formattedType")) {
3128 formattedType = _json["formattedType"]; 3250 formattedType = _json["formattedType"];
3129 } 3251 }
3130 if (_json.containsKey("metadata")) { 3252 if (_json.containsKey("metadata")) {
3131 metadata = new FieldMetadata.fromJson(_json["metadata"]); 3253 metadata = new FieldMetadata.fromJson(_json["metadata"]);
3132 } 3254 }
3133 if (_json.containsKey("person")) { 3255 if (_json.containsKey("person")) {
3134 person = _json["person"]; 3256 person = _json["person"];
3135 } 3257 }
3136 if (_json.containsKey("type")) { 3258 if (_json.containsKey("type")) {
3137 type = _json["type"]; 3259 type = _json["type"];
3138 } 3260 }
3139 } 3261 }
3140 3262
3141 core.Map<core.String, core.Object> toJson() { 3263 core.Map<core.String, core.Object> toJson() {
3142 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3264 final core.Map<core.String, core.Object> _json =
3265 new core.Map<core.String, core.Object>();
3143 if (formattedType != null) { 3266 if (formattedType != null) {
3144 _json["formattedType"] = formattedType; 3267 _json["formattedType"] = formattedType;
3145 } 3268 }
3146 if (metadata != null) { 3269 if (metadata != null) {
3147 _json["metadata"] = (metadata).toJson(); 3270 _json["metadata"] = (metadata).toJson();
3148 } 3271 }
3149 if (person != null) { 3272 if (person != null) {
3150 _json["person"] = person; 3273 _json["person"] = person;
3151 } 3274 }
3152 if (type != null) { 3275 if (type != null) {
3153 _json["type"] = type; 3276 _json["type"] = type;
3154 } 3277 }
3155 return _json; 3278 return _json;
3156 } 3279 }
3157 } 3280 }
3158 3281
3159 /** A person's read-only relationship interest . */ 3282 /// A person's read-only relationship interest .
3160 class RelationshipInterest { 3283 class RelationshipInterest {
3161 /** 3284 /// The value of the relationship interest translated and formatted in the
3162 * The value of the relationship interest translated and formatted in the 3285 /// viewer's account locale or the locale specified in the Accept-Language
3163 * viewer's account locale or the locale specified in the Accept-Language 3286 /// HTTP header.
3164 * HTTP header.
3165 */
3166 core.String formattedValue; 3287 core.String formattedValue;
3167 /** Metadata about the relationship interest. */ 3288
3289 /// Metadata about the relationship interest.
3168 FieldMetadata metadata; 3290 FieldMetadata metadata;
3169 /** 3291
3170 * The kind of relationship the person is looking for. The value can be custom 3292 /// The kind of relationship the person is looking for. The value can be
3171 * or predefined. Possible values include, but are not limited to, the 3293 /// custom
3172 * following values: 3294 /// or predefined. Possible values include, but are not limited to, the
3173 * 3295 /// following values:
3174 * * `friend` 3296 ///
3175 * * `date` 3297 /// * `friend`
3176 * * `relationship` 3298 /// * `date`
3177 * * `networking` 3299 /// * `relationship`
3178 */ 3300 /// * `networking`
3179 core.String value; 3301 core.String value;
3180 3302
3181 RelationshipInterest(); 3303 RelationshipInterest();
3182 3304
3183 RelationshipInterest.fromJson(core.Map _json) { 3305 RelationshipInterest.fromJson(core.Map _json) {
3184 if (_json.containsKey("formattedValue")) { 3306 if (_json.containsKey("formattedValue")) {
3185 formattedValue = _json["formattedValue"]; 3307 formattedValue = _json["formattedValue"];
3186 } 3308 }
3187 if (_json.containsKey("metadata")) { 3309 if (_json.containsKey("metadata")) {
3188 metadata = new FieldMetadata.fromJson(_json["metadata"]); 3310 metadata = new FieldMetadata.fromJson(_json["metadata"]);
3189 } 3311 }
3190 if (_json.containsKey("value")) { 3312 if (_json.containsKey("value")) {
3191 value = _json["value"]; 3313 value = _json["value"];
3192 } 3314 }
3193 } 3315 }
3194 3316
3195 core.Map<core.String, core.Object> toJson() { 3317 core.Map<core.String, core.Object> toJson() {
3196 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3318 final core.Map<core.String, core.Object> _json =
3319 new core.Map<core.String, core.Object>();
3197 if (formattedValue != null) { 3320 if (formattedValue != null) {
3198 _json["formattedValue"] = formattedValue; 3321 _json["formattedValue"] = formattedValue;
3199 } 3322 }
3200 if (metadata != null) { 3323 if (metadata != null) {
3201 _json["metadata"] = (metadata).toJson(); 3324 _json["metadata"] = (metadata).toJson();
3202 } 3325 }
3203 if (value != null) { 3326 if (value != null) {
3204 _json["value"] = value; 3327 _json["value"] = value;
3205 } 3328 }
3206 return _json; 3329 return _json;
3207 } 3330 }
3208 } 3331 }
3209 3332
3210 /** A person's read-only relationship status. */ 3333 /// A person's read-only relationship status.
3211 class RelationshipStatus { 3334 class RelationshipStatus {
3212 /** 3335 /// The read-only value of the relationship status translated and formatted
3213 * The read-only value of the relationship status translated and formatted in 3336 /// in
3214 * the viewer's account locale or the `Accept-Language` HTTP header locale. 3337 /// the viewer's account locale or the `Accept-Language` HTTP header locale.
3215 */
3216 core.String formattedValue; 3338 core.String formattedValue;
3217 /** Metadata about the relationship status. */ 3339
3340 /// Metadata about the relationship status.
3218 FieldMetadata metadata; 3341 FieldMetadata metadata;
3219 /** 3342
3220 * The relationship status. The value can be custom or predefined. 3343 /// The relationship status. The value can be custom or predefined.
3221 * Possible values include, but are not limited to, the following: 3344 /// Possible values include, but are not limited to, the following:
3222 * 3345 ///
3223 * * `single` 3346 /// * `single`
3224 * * `inARelationship` 3347 /// * `inARelationship`
3225 * * `engaged` 3348 /// * `engaged`
3226 * * `married` 3349 /// * `married`
3227 * * `itsComplicated` 3350 /// * `itsComplicated`
3228 * * `openRelationship` 3351 /// * `openRelationship`
3229 * * `widowed` 3352 /// * `widowed`
3230 * * `inDomesticPartnership` 3353 /// * `inDomesticPartnership`
3231 * * `inCivilUnion` 3354 /// * `inCivilUnion`
3232 */
3233 core.String value; 3355 core.String value;
3234 3356
3235 RelationshipStatus(); 3357 RelationshipStatus();
3236 3358
3237 RelationshipStatus.fromJson(core.Map _json) { 3359 RelationshipStatus.fromJson(core.Map _json) {
3238 if (_json.containsKey("formattedValue")) { 3360 if (_json.containsKey("formattedValue")) {
3239 formattedValue = _json["formattedValue"]; 3361 formattedValue = _json["formattedValue"];
3240 } 3362 }
3241 if (_json.containsKey("metadata")) { 3363 if (_json.containsKey("metadata")) {
3242 metadata = new FieldMetadata.fromJson(_json["metadata"]); 3364 metadata = new FieldMetadata.fromJson(_json["metadata"]);
3243 } 3365 }
3244 if (_json.containsKey("value")) { 3366 if (_json.containsKey("value")) {
3245 value = _json["value"]; 3367 value = _json["value"];
3246 } 3368 }
3247 } 3369 }
3248 3370
3249 core.Map<core.String, core.Object> toJson() { 3371 core.Map<core.String, core.Object> toJson() {
3250 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3372 final core.Map<core.String, core.Object> _json =
3373 new core.Map<core.String, core.Object>();
3251 if (formattedValue != null) { 3374 if (formattedValue != null) {
3252 _json["formattedValue"] = formattedValue; 3375 _json["formattedValue"] = formattedValue;
3253 } 3376 }
3254 if (metadata != null) { 3377 if (metadata != null) {
3255 _json["metadata"] = (metadata).toJson(); 3378 _json["metadata"] = (metadata).toJson();
3256 } 3379 }
3257 if (value != null) { 3380 if (value != null) {
3258 _json["value"] = value; 3381 _json["value"] = value;
3259 } 3382 }
3260 return _json; 3383 return _json;
3261 } 3384 }
3262 } 3385 }
3263 3386
3264 /** A person's past or current residence. */ 3387 /// A person's past or current residence.
3265 class Residence { 3388 class Residence {
3266 /** 3389 /// True if the residence is the person's current residence;
3267 * True if the residence is the person's current residence; 3390 /// false if the residence is a past residence.
3268 * false if the residence is a past residence.
3269 */
3270 core.bool current; 3391 core.bool current;
3271 /** Metadata about the residence. */ 3392
3393 /// Metadata about the residence.
3272 FieldMetadata metadata; 3394 FieldMetadata metadata;
3273 /** The address of the residence. */ 3395
3396 /// The address of the residence.
3274 core.String value; 3397 core.String value;
3275 3398
3276 Residence(); 3399 Residence();
3277 3400
3278 Residence.fromJson(core.Map _json) { 3401 Residence.fromJson(core.Map _json) {
3279 if (_json.containsKey("current")) { 3402 if (_json.containsKey("current")) {
3280 current = _json["current"]; 3403 current = _json["current"];
3281 } 3404 }
3282 if (_json.containsKey("metadata")) { 3405 if (_json.containsKey("metadata")) {
3283 metadata = new FieldMetadata.fromJson(_json["metadata"]); 3406 metadata = new FieldMetadata.fromJson(_json["metadata"]);
3284 } 3407 }
3285 if (_json.containsKey("value")) { 3408 if (_json.containsKey("value")) {
3286 value = _json["value"]; 3409 value = _json["value"];
3287 } 3410 }
3288 } 3411 }
3289 3412
3290 core.Map<core.String, core.Object> toJson() { 3413 core.Map<core.String, core.Object> toJson() {
3291 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3414 final core.Map<core.String, core.Object> _json =
3415 new core.Map<core.String, core.Object>();
3292 if (current != null) { 3416 if (current != null) {
3293 _json["current"] = current; 3417 _json["current"] = current;
3294 } 3418 }
3295 if (metadata != null) { 3419 if (metadata != null) {
3296 _json["metadata"] = (metadata).toJson(); 3420 _json["metadata"] = (metadata).toJson();
3297 } 3421 }
3298 if (value != null) { 3422 if (value != null) {
3299 _json["value"] = value; 3423 _json["value"] = value;
3300 } 3424 }
3301 return _json; 3425 return _json;
3302 } 3426 }
3303 } 3427 }
3304 3428
3305 /** A skill that the person has. */ 3429 /// A skill that the person has.
3306 class Skill { 3430 class Skill {
3307 /** Metadata about the skill. */ 3431 /// Metadata about the skill.
3308 FieldMetadata metadata; 3432 FieldMetadata metadata;
3309 /** The skill; for example, `underwater basket weaving`. */ 3433
3434 /// The skill; for example, `underwater basket weaving`.
3310 core.String value; 3435 core.String value;
3311 3436
3312 Skill(); 3437 Skill();
3313 3438
3314 Skill.fromJson(core.Map _json) { 3439 Skill.fromJson(core.Map _json) {
3315 if (_json.containsKey("metadata")) { 3440 if (_json.containsKey("metadata")) {
3316 metadata = new FieldMetadata.fromJson(_json["metadata"]); 3441 metadata = new FieldMetadata.fromJson(_json["metadata"]);
3317 } 3442 }
3318 if (_json.containsKey("value")) { 3443 if (_json.containsKey("value")) {
3319 value = _json["value"]; 3444 value = _json["value"];
3320 } 3445 }
3321 } 3446 }
3322 3447
3323 core.Map<core.String, core.Object> toJson() { 3448 core.Map<core.String, core.Object> toJson() {
3324 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3449 final core.Map<core.String, core.Object> _json =
3450 new core.Map<core.String, core.Object>();
3325 if (metadata != null) { 3451 if (metadata != null) {
3326 _json["metadata"] = (metadata).toJson(); 3452 _json["metadata"] = (metadata).toJson();
3327 } 3453 }
3328 if (value != null) { 3454 if (value != null) {
3329 _json["value"] = value; 3455 _json["value"] = value;
3330 } 3456 }
3331 return _json; 3457 return _json;
3332 } 3458 }
3333 } 3459 }
3334 3460
3335 /** The source of a field. */ 3461 /// The source of a field.
3336 class Source { 3462 class Source {
3337 /** 3463 /// **Only populated in `person.metadata.sources`.**
3338 * **Only populated in `person.metadata.sources`.** 3464 ///
3339 * 3465 /// The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the
3340 * The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the 3466 /// source. Used for web cache validation.
3341 * source. Used for web cache validation.
3342 */
3343 core.String etag; 3467 core.String etag;
3344 /** The unique identifier within the source type generated by the server. */ 3468
3469 /// The unique identifier within the source type generated by the server.
3345 core.String id; 3470 core.String id;
3346 /** 3471
3347 * **Only populated in `person.metadata.sources`.** 3472 /// **Only populated in `person.metadata.sources`.**
3348 * 3473 ///
3349 * Metadata about a source of type PROFILE. 3474 /// Metadata about a source of type PROFILE.
3350 */
3351 ProfileMetadata profileMetadata; 3475 ProfileMetadata profileMetadata;
3352 /** 3476
3353 * The source type. 3477 /// The source type.
3354 * Possible string values are: 3478 /// Possible string values are:
3355 * - "SOURCE_TYPE_UNSPECIFIED" : Unspecified. 3479 /// - "SOURCE_TYPE_UNSPECIFIED" : Unspecified.
3356 * - "ACCOUNT" : [Google Account](https://accounts.google.com). 3480 /// - "ACCOUNT" : [Google Account](https://accounts.google.com).
3357 * - "PROFILE" : [Google profile](https://profiles.google.com). You can view 3481 /// - "PROFILE" : [Google profile](https://profiles.google.com). You can view
3358 * the 3482 /// the
3359 * profile at https://profiles.google.com/<var>id</var> where 3483 /// profile at https://profiles.google.com/<var>id</var> where
3360 * <var>id</var> is the source id. 3484 /// <var>id</var> is the source id.
3361 * - "DOMAIN_PROFILE" : [Google Apps domain 3485 /// - "DOMAIN_PROFILE" : [Google Apps domain
3362 * profile](https://admin.google.com). 3486 /// profile](https://admin.google.com).
3363 * - "CONTACT" : [Google contact](https://contacts.google.com). You can view 3487 /// - "CONTACT" : [Google contact](https://contacts.google.com). You can view
3364 * the 3488 /// the
3365 * contact at https://contact.google.com/<var>id</var> where <var>id</var> 3489 /// contact at https://contact.google.com/<var>id</var> where <var>id</var>
3366 * is the source id. 3490 /// is the source id.
3367 */
3368 core.String type; 3491 core.String type;
3369 /** 3492
3370 * **Only populated in `person.metadata.sources`.** 3493 /// **Only populated in `person.metadata.sources`.**
3371 * 3494 ///
3372 * Last update timestamp of this source. 3495 /// Last update timestamp of this source.
3373 */
3374 core.String updateTime; 3496 core.String updateTime;
3375 3497
3376 Source(); 3498 Source();
3377 3499
3378 Source.fromJson(core.Map _json) { 3500 Source.fromJson(core.Map _json) {
3379 if (_json.containsKey("etag")) { 3501 if (_json.containsKey("etag")) {
3380 etag = _json["etag"]; 3502 etag = _json["etag"];
3381 } 3503 }
3382 if (_json.containsKey("id")) { 3504 if (_json.containsKey("id")) {
3383 id = _json["id"]; 3505 id = _json["id"];
3384 } 3506 }
3385 if (_json.containsKey("profileMetadata")) { 3507 if (_json.containsKey("profileMetadata")) {
3386 profileMetadata = new ProfileMetadata.fromJson(_json["profileMetadata"]); 3508 profileMetadata = new ProfileMetadata.fromJson(_json["profileMetadata"]);
3387 } 3509 }
3388 if (_json.containsKey("type")) { 3510 if (_json.containsKey("type")) {
3389 type = _json["type"]; 3511 type = _json["type"];
3390 } 3512 }
3391 if (_json.containsKey("updateTime")) { 3513 if (_json.containsKey("updateTime")) {
3392 updateTime = _json["updateTime"]; 3514 updateTime = _json["updateTime"];
3393 } 3515 }
3394 } 3516 }
3395 3517
3396 core.Map<core.String, core.Object> toJson() { 3518 core.Map<core.String, core.Object> toJson() {
3397 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3519 final core.Map<core.String, core.Object> _json =
3520 new core.Map<core.String, core.Object>();
3398 if (etag != null) { 3521 if (etag != null) {
3399 _json["etag"] = etag; 3522 _json["etag"] = etag;
3400 } 3523 }
3401 if (id != null) { 3524 if (id != null) {
3402 _json["id"] = id; 3525 _json["id"] = id;
3403 } 3526 }
3404 if (profileMetadata != null) { 3527 if (profileMetadata != null) {
3405 _json["profileMetadata"] = (profileMetadata).toJson(); 3528 _json["profileMetadata"] = (profileMetadata).toJson();
3406 } 3529 }
3407 if (type != null) { 3530 if (type != null) {
3408 _json["type"] = type; 3531 _json["type"] = type;
3409 } 3532 }
3410 if (updateTime != null) { 3533 if (updateTime != null) {
3411 _json["updateTime"] = updateTime; 3534 _json["updateTime"] = updateTime;
3412 } 3535 }
3413 return _json; 3536 return _json;
3414 } 3537 }
3415 } 3538 }
3416 3539
3417 /** 3540 /// The `Status` type defines a logical error model that is suitable for
3418 * The `Status` type defines a logical error model that is suitable for 3541 /// different
3419 * different 3542 /// programming environments, including REST APIs and RPC APIs. It is used by
3420 * programming environments, including REST APIs and RPC APIs. It is used by 3543 /// [gRPC](https://github.com/grpc). The error model is designed to be:
3421 * [gRPC](https://github.com/grpc). The error model is designed to be: 3544 ///
3422 * 3545 /// - Simple to use and understand for most users
3423 * - Simple to use and understand for most users 3546 /// - Flexible enough to meet unexpected needs
3424 * - Flexible enough to meet unexpected needs 3547 ///
3425 * 3548 /// # Overview
3426 * # Overview 3549 ///
3427 * 3550 /// The `Status` message contains three pieces of data: error code, error
3428 * The `Status` message contains three pieces of data: error code, error 3551 /// message,
3429 * message, 3552 /// and error details. The error code should be an enum value of
3430 * and error details. The error code should be an enum value of 3553 /// google.rpc.Code, but it may accept additional error codes if needed. The
3431 * google.rpc.Code, but it may accept additional error codes if needed. The 3554 /// error message should be a developer-facing English message that helps
3432 * error message should be a developer-facing English message that helps 3555 /// developers *understand* and *resolve* the error. If a localized user-facing
3433 * developers *understand* and *resolve* the error. If a localized user-facing 3556 /// error message is needed, put the localized message in the error details or
3434 * error message is needed, put the localized message in the error details or 3557 /// localize it in the client. The optional error details may contain arbitrary
3435 * localize it in the client. The optional error details may contain arbitrary 3558 /// information about the error. There is a predefined set of error detail
3436 * information about the error. There is a predefined set of error detail types 3559 /// types
3437 * in the package `google.rpc` that can be used for common error conditions. 3560 /// in the package `google.rpc` that can be used for common error conditions.
3438 * 3561 ///
3439 * # Language mapping 3562 /// # Language mapping
3440 * 3563 ///
3441 * The `Status` message is the logical representation of the error model, but it 3564 /// The `Status` message is the logical representation of the error model, but
3442 * is not necessarily the actual wire format. When the `Status` message is 3565 /// it
3443 * exposed in different client libraries and different wire protocols, it can be 3566 /// is not necessarily the actual wire format. When the `Status` message is
3444 * mapped differently. For example, it will likely be mapped to some exceptions 3567 /// exposed in different client libraries and different wire protocols, it can
3445 * in Java, but more likely mapped to some error codes in C. 3568 /// be
3446 * 3569 /// mapped differently. For example, it will likely be mapped to some
3447 * # Other uses 3570 /// exceptions
3448 * 3571 /// in Java, but more likely mapped to some error codes in C.
3449 * The error model and the `Status` message can be used in a variety of 3572 ///
3450 * environments, either with or without APIs, to provide a 3573 /// # Other uses
3451 * consistent developer experience across different environments. 3574 ///
3452 * 3575 /// The error model and the `Status` message can be used in a variety of
3453 * Example uses of this error model include: 3576 /// environments, either with or without APIs, to provide a
3454 * 3577 /// consistent developer experience across different environments.
3455 * - Partial errors. If a service needs to return partial errors to the client, 3578 ///
3456 * it may embed the `Status` in the normal response to indicate the partial 3579 /// Example uses of this error model include:
3457 * errors. 3580 ///
3458 * 3581 /// - Partial errors. If a service needs to return partial errors to the
3459 * - Workflow errors. A typical workflow has multiple steps. Each step may 3582 /// client,
3460 * have a `Status` message for error reporting. 3583 /// it may embed the `Status` in the normal response to indicate the partial
3461 * 3584 /// errors.
3462 * - Batch operations. If a client uses batch request and batch response, the 3585 ///
3463 * `Status` message should be used directly inside batch response, one for 3586 /// - Workflow errors. A typical workflow has multiple steps. Each step may
3464 * each error sub-response. 3587 /// have a `Status` message for error reporting.
3465 * 3588 ///
3466 * - Asynchronous operations. If an API call embeds asynchronous operation 3589 /// - Batch operations. If a client uses batch request and batch response, the
3467 * results in its response, the status of those operations should be 3590 /// `Status` message should be used directly inside batch response, one for
3468 * represented directly using the `Status` message. 3591 /// each error sub-response.
3469 * 3592 ///
3470 * - Logging. If some API errors are stored in logs, the message `Status` could 3593 /// - Asynchronous operations. If an API call embeds asynchronous operation
3471 * be used directly after any stripping needed for security/privacy reasons. 3594 /// results in its response, the status of those operations should be
3472 */ 3595 /// represented directly using the `Status` message.
3596 ///
3597 /// - Logging. If some API errors are stored in logs, the message `Status`
3598 /// could
3599 /// be used directly after any stripping needed for security/privacy reasons.
3473 class Status { 3600 class Status {
3474 /** The status code, which should be an enum value of google.rpc.Code. */ 3601 /// The status code, which should be an enum value of google.rpc.Code.
3475 core.int code; 3602 core.int code;
3476 /** 3603
3477 * A list of messages that carry the error details. There is a common set of 3604 /// A list of messages that carry the error details. There is a common set
3478 * message types for APIs to use. 3605 /// of
3479 * 3606 /// message types for APIs to use.
3480 * The values for Object must be JSON objects. It can consist of `num`, 3607 ///
3481 * `String`, `bool` and `null` as well as `Map` and `List` values. 3608 /// The values for Object must be JSON objects. It can consist of `num`,
3482 */ 3609 /// `String`, `bool` and `null` as well as `Map` and `List` values.
3483 core.List<core.Map<core.String, core.Object>> details; 3610 core.List<core.Map<core.String, core.Object>> details;
3484 /** 3611
3485 * A developer-facing error message, which should be in English. Any 3612 /// A developer-facing error message, which should be in English. Any
3486 * user-facing error message should be localized and sent in the 3613 /// user-facing error message should be localized and sent in the
3487 * google.rpc.Status.details field, or localized by the client. 3614 /// google.rpc.Status.details field, or localized by the client.
3488 */
3489 core.String message; 3615 core.String message;
3490 3616
3491 Status(); 3617 Status();
3492 3618
3493 Status.fromJson(core.Map _json) { 3619 Status.fromJson(core.Map _json) {
3494 if (_json.containsKey("code")) { 3620 if (_json.containsKey("code")) {
3495 code = _json["code"]; 3621 code = _json["code"];
3496 } 3622 }
3497 if (_json.containsKey("details")) { 3623 if (_json.containsKey("details")) {
3498 details = _json["details"]; 3624 details = _json["details"];
3499 } 3625 }
3500 if (_json.containsKey("message")) { 3626 if (_json.containsKey("message")) {
3501 message = _json["message"]; 3627 message = _json["message"];
3502 } 3628 }
3503 } 3629 }
3504 3630
3505 core.Map<core.String, core.Object> toJson() { 3631 core.Map<core.String, core.Object> toJson() {
3506 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3632 final core.Map<core.String, core.Object> _json =
3633 new core.Map<core.String, core.Object>();
3507 if (code != null) { 3634 if (code != null) {
3508 _json["code"] = code; 3635 _json["code"] = code;
3509 } 3636 }
3510 if (details != null) { 3637 if (details != null) {
3511 _json["details"] = details; 3638 _json["details"] = details;
3512 } 3639 }
3513 if (message != null) { 3640 if (message != null) {
3514 _json["message"] = message; 3641 _json["message"] = message;
3515 } 3642 }
3516 return _json; 3643 return _json;
3517 } 3644 }
3518 } 3645 }
3519 3646
3520 /** A read-only brief one-line description of the person. */ 3647 /// A read-only brief one-line description of the person.
3521 class Tagline { 3648 class Tagline {
3522 /** Metadata about the tagline. */ 3649 /// Metadata about the tagline.
3523 FieldMetadata metadata; 3650 FieldMetadata metadata;
3524 /** The tagline. */ 3651
3652 /// The tagline.
3525 core.String value; 3653 core.String value;
3526 3654
3527 Tagline(); 3655 Tagline();
3528 3656
3529 Tagline.fromJson(core.Map _json) { 3657 Tagline.fromJson(core.Map _json) {
3530 if (_json.containsKey("metadata")) { 3658 if (_json.containsKey("metadata")) {
3531 metadata = new FieldMetadata.fromJson(_json["metadata"]); 3659 metadata = new FieldMetadata.fromJson(_json["metadata"]);
3532 } 3660 }
3533 if (_json.containsKey("value")) { 3661 if (_json.containsKey("value")) {
3534 value = _json["value"]; 3662 value = _json["value"];
3535 } 3663 }
3536 } 3664 }
3537 3665
3538 core.Map<core.String, core.Object> toJson() { 3666 core.Map<core.String, core.Object> toJson() {
3539 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3667 final core.Map<core.String, core.Object> _json =
3668 new core.Map<core.String, core.Object>();
3540 if (metadata != null) { 3669 if (metadata != null) {
3541 _json["metadata"] = (metadata).toJson(); 3670 _json["metadata"] = (metadata).toJson();
3542 } 3671 }
3543 if (value != null) { 3672 if (value != null) {
3544 _json["value"] = value; 3673 _json["value"] = value;
3545 } 3674 }
3546 return _json; 3675 return _json;
3547 } 3676 }
3548 } 3677 }
3549 3678
3550 /** 3679 /// A request to update an existing contact group. Only the name can be
3551 * A request to update an existing contact group. Only the name can be updated. 3680 /// updated.
3552 */
3553 class UpdateContactGroupRequest { 3681 class UpdateContactGroupRequest {
3554 /** The contact group to update. */ 3682 /// The contact group to update.
3555 ContactGroup contactGroup; 3683 ContactGroup contactGroup;
3556 3684
3557 UpdateContactGroupRequest(); 3685 UpdateContactGroupRequest();
3558 3686
3559 UpdateContactGroupRequest.fromJson(core.Map _json) { 3687 UpdateContactGroupRequest.fromJson(core.Map _json) {
3560 if (_json.containsKey("contactGroup")) { 3688 if (_json.containsKey("contactGroup")) {
3561 contactGroup = new ContactGroup.fromJson(_json["contactGroup"]); 3689 contactGroup = new ContactGroup.fromJson(_json["contactGroup"]);
3562 } 3690 }
3563 } 3691 }
3564 3692
3565 core.Map<core.String, core.Object> toJson() { 3693 core.Map<core.String, core.Object> toJson() {
3566 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3694 final core.Map<core.String, core.Object> _json =
3695 new core.Map<core.String, core.Object>();
3567 if (contactGroup != null) { 3696 if (contactGroup != null) {
3568 _json["contactGroup"] = (contactGroup).toJson(); 3697 _json["contactGroup"] = (contactGroup).toJson();
3569 } 3698 }
3570 return _json; 3699 return _json;
3571 } 3700 }
3572 } 3701 }
3573 3702
3574 /** A person's associated URLs. */ 3703 /// A person's associated URLs.
3575 class Url { 3704 class Url {
3576 /** 3705 /// The read-only type of the URL translated and formatted in the viewer's
3577 * The read-only type of the URL translated and formatted in the viewer's 3706 /// account locale or the `Accept-Language` HTTP header locale.
3578 * account locale or the `Accept-Language` HTTP header locale.
3579 */
3580 core.String formattedType; 3707 core.String formattedType;
3581 /** Metadata about the URL. */ 3708
3709 /// Metadata about the URL.
3582 FieldMetadata metadata; 3710 FieldMetadata metadata;
3583 /** 3711
3584 * The type of the URL. The type can be custom or predefined. 3712 /// The type of the URL. The type can be custom or predefined.
3585 * Possible values include, but are not limited to, the following: 3713 /// Possible values include, but are not limited to, the following:
3586 * 3714 ///
3587 * * `home` 3715 /// * `home`
3588 * * `work` 3716 /// * `work`
3589 * * `blog` 3717 /// * `blog`
3590 * * `profile` 3718 /// * `profile`
3591 * * `homePage` 3719 /// * `homePage`
3592 * * `ftp` 3720 /// * `ftp`
3593 * * `reservations` 3721 /// * `reservations`
3594 * * `appInstallPage`: website for a Google+ application. 3722 /// * `appInstallPage`: website for a Google+ application.
3595 * * `other` 3723 /// * `other`
3596 */
3597 core.String type; 3724 core.String type;
3598 /** The URL. */ 3725
3726 /// The URL.
3599 core.String value; 3727 core.String value;
3600 3728
3601 Url(); 3729 Url();
3602 3730
3603 Url.fromJson(core.Map _json) { 3731 Url.fromJson(core.Map _json) {
3604 if (_json.containsKey("formattedType")) { 3732 if (_json.containsKey("formattedType")) {
3605 formattedType = _json["formattedType"]; 3733 formattedType = _json["formattedType"];
3606 } 3734 }
3607 if (_json.containsKey("metadata")) { 3735 if (_json.containsKey("metadata")) {
3608 metadata = new FieldMetadata.fromJson(_json["metadata"]); 3736 metadata = new FieldMetadata.fromJson(_json["metadata"]);
3609 } 3737 }
3610 if (_json.containsKey("type")) { 3738 if (_json.containsKey("type")) {
3611 type = _json["type"]; 3739 type = _json["type"];
3612 } 3740 }
3613 if (_json.containsKey("value")) { 3741 if (_json.containsKey("value")) {
3614 value = _json["value"]; 3742 value = _json["value"];
3615 } 3743 }
3616 } 3744 }
3617 3745
3618 core.Map<core.String, core.Object> toJson() { 3746 core.Map<core.String, core.Object> toJson() {
3619 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3747 final core.Map<core.String, core.Object> _json =
3748 new core.Map<core.String, core.Object>();
3620 if (formattedType != null) { 3749 if (formattedType != null) {
3621 _json["formattedType"] = formattedType; 3750 _json["formattedType"] = formattedType;
3622 } 3751 }
3623 if (metadata != null) { 3752 if (metadata != null) {
3624 _json["metadata"] = (metadata).toJson(); 3753 _json["metadata"] = (metadata).toJson();
3625 } 3754 }
3626 if (type != null) { 3755 if (type != null) {
3627 _json["type"] = type; 3756 _json["type"] = type;
3628 } 3757 }
3629 if (value != null) { 3758 if (value != null) {
3630 _json["value"] = value; 3759 _json["value"] = value;
3631 } 3760 }
3632 return _json; 3761 return _json;
3633 } 3762 }
3634 } 3763 }
3764
3765 /// Arbitrary user data that is populated by the end users.
3766 class UserDefined {
3767 /// The end user specified key of the user defined data.
3768 core.String key;
3769
3770 /// Metadata about the user defined data.
3771 FieldMetadata metadata;
3772
3773 /// The end user specified value of the user defined data.
3774 core.String value;
3775
3776 UserDefined();
3777
3778 UserDefined.fromJson(core.Map _json) {
3779 if (_json.containsKey("key")) {
3780 key = _json["key"];
3781 }
3782 if (_json.containsKey("metadata")) {
3783 metadata = new FieldMetadata.fromJson(_json["metadata"]);
3784 }
3785 if (_json.containsKey("value")) {
3786 value = _json["value"];
3787 }
3788 }
3789
3790 core.Map<core.String, core.Object> toJson() {
3791 final core.Map<core.String, core.Object> _json =
3792 new core.Map<core.String, core.Object>();
3793 if (key != null) {
3794 _json["key"] = key;
3795 }
3796 if (metadata != null) {
3797 _json["metadata"] = (metadata).toJson();
3798 }
3799 if (value != null) {
3800 _json["value"] = value;
3801 }
3802 return _json;
3803 }
3804 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/partners/v2.dart ('k') | generated/googleapis/lib/playcustomapp/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698