list method

Future<ListCustomBiddingAlgorithmRulesResponse> list(
  1. String customBiddingAlgorithmId, {
  2. String? advertiserId,
  3. String? orderBy,
  4. int? pageSize,
  5. String? pageToken,
  6. String? partnerId,
  7. String? $fields,
})

Lists rules resources that belong to the given algorithm.

The order is defined by the order_by parameter.

Request parameters:

customBiddingAlgorithmId - Required. The ID of the custom bidding algorithm that owns the rules resource. Value must have pattern ^\[^/\]+$.

advertiserId - The ID of the advertiser that owns the parent custom bidding algorithm.

orderBy - Field by which to sort the list. Acceptable values are: * createTime desc (default) The default sorting order is descending. To specify ascending order for a field, the suffix "desc" should be removed. Example: createTime.

pageSize - Requested page size. Must be between 1 and 200. If unspecified will default to 100. Returns error code INVALID_ARGUMENT if an invalid value is specified.

pageToken - A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to ListCustomBiddingAlgorithmRules method. If not specified, the first page of results will be returned.

partnerId - The ID of the partner that owns the parent custom bidding algorithm.

$fields - Selector specifying which fields to include in a partial response.

Completes with a ListCustomBiddingAlgorithmRulesResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<ListCustomBiddingAlgorithmRulesResponse> list(
  core.String customBiddingAlgorithmId, {
  core.String? advertiserId,
  core.String? orderBy,
  core.int? pageSize,
  core.String? pageToken,
  core.String? partnerId,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (advertiserId != null) 'advertiserId': [advertiserId],
    if (orderBy != null) 'orderBy': [orderBy],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (partnerId != null) 'partnerId': [partnerId],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v3/customBiddingAlgorithms/' +
      core.Uri.encodeFull('$customBiddingAlgorithmId') +
      '/rules';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return ListCustomBiddingAlgorithmRulesResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}