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_beta.adexchangebuyer2.v2beta1; | 3 library googleapis_beta.adexchangebuyer2.v2beta1; |
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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 * (required) | 378 * (required) |
379 * | 379 * |
380 * [clientAccountId] - Numerical account ID of the client buyer to list | 380 * [clientAccountId] - Numerical account ID of the client buyer to list |
381 * invitations for. | 381 * invitations for. |
382 * (required) | 382 * (required) |
383 * You must either specify a string representation of a | 383 * You must either specify a string representation of a |
384 * numerical account identifier or the `-` character | 384 * numerical account identifier or the `-` character |
385 * to list all the invitations for all the clients | 385 * to list all the invitations for all the clients |
386 * of a given sponsor buyer. | 386 * of a given sponsor buyer. |
387 * | 387 * |
| 388 * [pageSize] - Requested page size. Server may return fewer clients than |
| 389 * requested. |
| 390 * If unspecified, server will pick an appropriate default. |
| 391 * |
388 * [pageToken] - A token identifying a page of results the server should | 392 * [pageToken] - A token identifying a page of results the server should |
389 * return. | 393 * return. |
390 * Typically, this is the value of | 394 * Typically, this is the value of |
391 * ListClientUserInvitationsResponse.nextPageToken | 395 * ListClientUserInvitationsResponse.nextPageToken |
392 * returned from the previous call to the | 396 * returned from the previous call to the |
393 * clients.invitations.list | 397 * clients.invitations.list |
394 * method. | 398 * method. |
395 * | 399 * |
396 * [pageSize] - Requested page size. Server may return fewer clients than | |
397 * requested. | |
398 * If unspecified, server will pick an appropriate default. | |
399 * | |
400 * Completes with a [ListClientUserInvitationsResponse]. | 400 * Completes with a [ListClientUserInvitationsResponse]. |
401 * | 401 * |
402 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 402 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
403 * error. | 403 * error. |
404 * | 404 * |
405 * If the used [http.Client] completes with an error when making a REST call, | 405 * If the used [http.Client] completes with an error when making a REST call, |
406 * this method will complete with the same error. | 406 * this method will complete with the same error. |
407 */ | 407 */ |
408 async.Future<ListClientUserInvitationsResponse> list(core.String accountId, co
re.String clientAccountId, {core.String pageToken, core.int pageSize}) { | 408 async.Future<ListClientUserInvitationsResponse> list(core.String accountId, co
re.String clientAccountId, {core.int pageSize, core.String pageToken}) { |
409 var _url = null; | 409 var _url = null; |
410 var _queryParams = new core.Map(); | 410 var _queryParams = new core.Map(); |
411 var _uploadMedia = null; | 411 var _uploadMedia = null; |
412 var _uploadOptions = null; | 412 var _uploadOptions = null; |
413 var _downloadOptions = commons.DownloadOptions.Metadata; | 413 var _downloadOptions = commons.DownloadOptions.Metadata; |
414 var _body = null; | 414 var _body = null; |
415 | 415 |
416 if (accountId == null) { | 416 if (accountId == null) { |
417 throw new core.ArgumentError("Parameter accountId is required."); | 417 throw new core.ArgumentError("Parameter accountId is required."); |
418 } | 418 } |
419 if (clientAccountId == null) { | 419 if (clientAccountId == null) { |
420 throw new core.ArgumentError("Parameter clientAccountId is required."); | 420 throw new core.ArgumentError("Parameter clientAccountId is required."); |
421 } | 421 } |
| 422 if (pageSize != null) { |
| 423 _queryParams["pageSize"] = ["${pageSize}"]; |
| 424 } |
422 if (pageToken != null) { | 425 if (pageToken != null) { |
423 _queryParams["pageToken"] = [pageToken]; | 426 _queryParams["pageToken"] = [pageToken]; |
424 } | 427 } |
425 if (pageSize != null) { | |
426 _queryParams["pageSize"] = ["${pageSize}"]; | |
427 } | |
428 | 428 |
429 _url = 'v2beta1/accounts/' + commons.Escaper.ecapeVariable('$accountId') + '
/clients/' + commons.Escaper.ecapeVariable('$clientAccountId') + '/invitations'; | 429 _url = 'v2beta1/accounts/' + commons.Escaper.ecapeVariable('$accountId') + '
/clients/' + commons.Escaper.ecapeVariable('$clientAccountId') + '/invitations'; |
430 | 430 |
431 var _response = _requester.request(_url, | 431 var _response = _requester.request(_url, |
432 "GET", | 432 "GET", |
433 body: _body, | 433 body: _body, |
434 queryParams: _queryParams, | 434 queryParams: _queryParams, |
435 uploadOptions: _uploadOptions, | 435 uploadOptions: _uploadOptions, |
436 uploadMedia: _uploadMedia, | 436 uploadMedia: _uploadMedia, |
437 downloadOptions: _downloadOptions); | 437 downloadOptions: _downloadOptions); |
(...skipping 2462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2900 } | 2900 } |
2901 | 2901 |
2902 core.Map toJson() { | 2902 core.Map toJson() { |
2903 var _json = new core.Map(); | 2903 var _json = new core.Map(); |
2904 if (topic != null) { | 2904 if (topic != null) { |
2905 _json["topic"] = topic; | 2905 _json["topic"] = topic; |
2906 } | 2906 } |
2907 return _json; | 2907 return _json; |
2908 } | 2908 } |
2909 } | 2909 } |
OLD | NEW |