list method

Future<ListRulesetsResponse> list(
  1. String name, {
  2. String? filter,
  3. int? pageSize,
  4. String? pageToken,
  5. String? $fields,
})

List Ruleset metadata only and optionally filter the results by Ruleset name.

The full Source contents of a Ruleset may be retrieved with GetRuleset.

Request parameters:

name - Required. Resource name for the project. Format: projects/{project_id} Value must have pattern ^projects/\[^/\]+$.

filter - Optional. Ruleset filter. The list method supports filters with restrictions on Ruleset.name. Filters on Ruleset.create_time should use the date function which parses strings that conform to the RFC 3339 date/time specifications. Example: create_time > date("2017-01-01T00:00:00Z") AND name=UUID-*

pageSize - Optional. Page size to load. Maximum of 100. Defaults to 10. Note: page_size is just a hint and the service may choose to load less than page_size due to the size of the output. To traverse all of the releases, caller should iterate until the page_token is empty.

pageToken - Optional. Next page token for loading the next batch of Ruleset instances.

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

Completes with a ListRulesetsResponse.

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<ListRulesetsResponse> list(
  core.String name, {
  core.String? filter,
  core.int? pageSize,
  core.String? pageToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'filter': ?filter == null ? null : [filter],
    'pageSize': ?pageSize == null ? null : ['${pageSize}'],
    'pageToken': ?pageToken == null ? null : [pageToken],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name') + '/rulesets';

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