OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.people.v1; | 3 library googleapis.people.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 /** | 186 /** |
187 * Provides a list of the authenticated user's contacts merged with any | 187 * Provides a list of the authenticated user's contacts merged with any |
188 * linked profiles. | 188 * linked profiles. |
189 * | 189 * |
190 * Request parameters: | 190 * Request parameters: |
191 * | 191 * |
192 * [resourceName] - The resource name to return connections for. Only | 192 * [resourceName] - The resource name to return connections for. Only |
193 * `people/me` is valid. | 193 * `people/me` is valid. |
194 * Value must have pattern "^people/[^/]+$". | 194 * Value must have pattern "^people/[^/]+$". |
195 * | 195 * |
| 196 * [requestSyncToken] - Whether the response should include a sync token, |
| 197 * which can be used to get |
| 198 * all changes since the last request. |
| 199 * |
196 * [pageToken] - The token of the page to be returned. | 200 * [pageToken] - The token of the page to be returned. |
197 * | 201 * |
| 202 * [pageSize] - The number of connections to include in the response. Valid |
| 203 * values are |
| 204 * between 1 and 500, inclusive. Defaults to 100. |
| 205 * |
198 * [requestMask_includeField] - Comma-separated list of fields to be included | 206 * [requestMask_includeField] - Comma-separated list of fields to be included |
199 * in the response. Omitting | 207 * in the response. Omitting |
200 * this field will include all fields except for connections.list requests, | 208 * this field will include all fields except for connections.list requests, |
201 * which have a default mask that includes common fields like metadata, name, | 209 * which have a default mask that includes common fields like metadata, name, |
202 * photo, and profile url. | 210 * photo, and profile url. |
203 * Each path should start with `person.`: for example, `person.names` or | 211 * Each path should start with `person.`: for example, `person.names` or |
204 * `person.photos`. | 212 * `person.photos`. |
205 * | 213 * |
206 * [pageSize] - The number of connections to include in the response. Valid | |
207 * values are | |
208 * between 1 and 500, inclusive. Defaults to 100. | |
209 * | |
210 * [syncToken] - A sync token, returned by a previous call to | 214 * [syncToken] - A sync token, returned by a previous call to |
211 * `people.connections.list`. | 215 * `people.connections.list`. |
212 * Only resources changed since the sync token was created will be returned. | 216 * Only resources changed since the sync token was created will be returned. |
213 * | 217 * |
214 * [sortOrder] - The order in which the connections should be sorted. Defaults | 218 * [sortOrder] - The order in which the connections should be sorted. Defaults |
215 * to | 219 * to |
216 * `LAST_MODIFIED_ASCENDING`. | 220 * `LAST_MODIFIED_ASCENDING`. |
217 * Possible string values are: | 221 * Possible string values are: |
218 * - "LAST_MODIFIED_ASCENDING" : A LAST_MODIFIED_ASCENDING. | 222 * - "LAST_MODIFIED_ASCENDING" : A LAST_MODIFIED_ASCENDING. |
219 * - "FIRST_NAME_ASCENDING" : A FIRST_NAME_ASCENDING. | 223 * - "FIRST_NAME_ASCENDING" : A FIRST_NAME_ASCENDING. |
220 * - "LAST_NAME_ASCENDING" : A LAST_NAME_ASCENDING. | 224 * - "LAST_NAME_ASCENDING" : A LAST_NAME_ASCENDING. |
221 * | 225 * |
222 * [requestSyncToken] - Whether the response should include a sync token, | |
223 * which can be used to get | |
224 * all changes since the last request. | |
225 * | |
226 * Completes with a [ListConnectionsResponse]. | 226 * Completes with a [ListConnectionsResponse]. |
227 * | 227 * |
228 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 228 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
229 * error. | 229 * error. |
230 * | 230 * |
231 * If the used [http.Client] completes with an error when making a REST call, | 231 * If the used [http.Client] completes with an error when making a REST call, |
232 * this method will complete with the same error. | 232 * this method will complete with the same error. |
233 */ | 233 */ |
234 async.Future<ListConnectionsResponse> list(core.String resourceName, {core.Str
ing pageToken, core.String requestMask_includeField, core.int pageSize, core.Str
ing syncToken, core.String sortOrder, core.bool requestSyncToken}) { | 234 async.Future<ListConnectionsResponse> list(core.String resourceName, {core.boo
l requestSyncToken, core.String pageToken, core.int pageSize, core.String reques
tMask_includeField, core.String syncToken, core.String sortOrder}) { |
235 var _url = null; | 235 var _url = null; |
236 var _queryParams = new core.Map(); | 236 var _queryParams = new core.Map(); |
237 var _uploadMedia = null; | 237 var _uploadMedia = null; |
238 var _uploadOptions = null; | 238 var _uploadOptions = null; |
239 var _downloadOptions = commons.DownloadOptions.Metadata; | 239 var _downloadOptions = commons.DownloadOptions.Metadata; |
240 var _body = null; | 240 var _body = null; |
241 | 241 |
242 if (resourceName == null) { | 242 if (resourceName == null) { |
243 throw new core.ArgumentError("Parameter resourceName is required."); | 243 throw new core.ArgumentError("Parameter resourceName is required."); |
244 } | 244 } |
| 245 if (requestSyncToken != null) { |
| 246 _queryParams["requestSyncToken"] = ["${requestSyncToken}"]; |
| 247 } |
245 if (pageToken != null) { | 248 if (pageToken != null) { |
246 _queryParams["pageToken"] = [pageToken]; | 249 _queryParams["pageToken"] = [pageToken]; |
247 } | 250 } |
| 251 if (pageSize != null) { |
| 252 _queryParams["pageSize"] = ["${pageSize}"]; |
| 253 } |
248 if (requestMask_includeField != null) { | 254 if (requestMask_includeField != null) { |
249 _queryParams["requestMask.includeField"] = [requestMask_includeField]; | 255 _queryParams["requestMask.includeField"] = [requestMask_includeField]; |
250 } | 256 } |
251 if (pageSize != null) { | |
252 _queryParams["pageSize"] = ["${pageSize}"]; | |
253 } | |
254 if (syncToken != null) { | 257 if (syncToken != null) { |
255 _queryParams["syncToken"] = [syncToken]; | 258 _queryParams["syncToken"] = [syncToken]; |
256 } | 259 } |
257 if (sortOrder != null) { | 260 if (sortOrder != null) { |
258 _queryParams["sortOrder"] = [sortOrder]; | 261 _queryParams["sortOrder"] = [sortOrder]; |
259 } | 262 } |
260 if (requestSyncToken != null) { | |
261 _queryParams["requestSyncToken"] = ["${requestSyncToken}"]; | |
262 } | |
263 | 263 |
264 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName') + '/co
nnections'; | 264 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resourceName') + '/co
nnections'; |
265 | 265 |
266 var _response = _requester.request(_url, | 266 var _response = _requester.request(_url, |
267 "GET", | 267 "GET", |
268 body: _body, | 268 body: _body, |
269 queryParams: _queryParams, | 269 queryParams: _queryParams, |
270 uploadOptions: _uploadOptions, | 270 uploadOptions: _uploadOptions, |
271 uploadMedia: _uploadMedia, | 271 uploadMedia: _uploadMedia, |
272 downloadOptions: _downloadOptions); | 272 downloadOptions: _downloadOptions); |
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1533 } | 1533 } |
1534 if (type != null) { | 1534 if (type != null) { |
1535 _json["type"] = type; | 1535 _json["type"] = type; |
1536 } | 1536 } |
1537 return _json; | 1537 return _json; |
1538 } | 1538 } |
1539 } | 1539 } |
1540 | 1540 |
1541 /** | 1541 /** |
1542 * Information about a person merged from various data sources such as the | 1542 * Information about a person merged from various data sources such as the |
1543 * authenticated user's contacts and profile data. Fields other than IDs, | 1543 * authenticated user's contacts and profile data. |
1544 * metadata, and group memberships are user-edited. | |
1545 * | 1544 * |
1546 * Most fields can have multiple items. The items in a field have no guaranteed | 1545 * Most fields can have multiple items. The items in a field have no guaranteed |
1547 * order, but each non-empty field is guaranteed to have exactly one field with | 1546 * order, but each non-empty field is guaranteed to have exactly one field with |
1548 * `metadata.primary` set to true. | 1547 * `metadata.primary` set to true. |
1549 * NEXT_ID: 31 | |
1550 */ | 1548 */ |
1551 class Person { | 1549 class Person { |
1552 /** The person's street addresses. */ | 1550 /** The person's street addresses. */ |
1553 core.List<Address> addresses; | 1551 core.List<Address> addresses; |
1554 /** | 1552 /** |
1555 * DEPRECATED(Please read person.age_ranges instead). The person's age range. | 1553 * DEPRECATED(Please read person.age_ranges instead). The person's age range. |
1556 * Possible string values are: | 1554 * Possible string values are: |
1557 * - "AGE_RANGE_UNSPECIFIED" : Unspecified. | 1555 * - "AGE_RANGE_UNSPECIFIED" : Unspecified. |
1558 * - "LESS_THAN_EIGHTEEN" : Younger than eighteen. | 1556 * - "LESS_THAN_EIGHTEEN" : Younger than eighteen. |
1559 * - "EIGHTEEN_TO_TWENTY" : Between eighteen and twenty. | 1557 * - "EIGHTEEN_TO_TWENTY" : Between eighteen and twenty. |
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2466 } | 2464 } |
2467 if (type != null) { | 2465 if (type != null) { |
2468 _json["type"] = type; | 2466 _json["type"] = type; |
2469 } | 2467 } |
2470 if (value != null) { | 2468 if (value != null) { |
2471 _json["value"] = value; | 2469 _json["value"] = value; |
2472 } | 2470 } |
2473 return _json; | 2471 return _json; |
2474 } | 2472 } |
2475 } | 2473 } |
OLD | NEW |