list method

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

List the Release values for a project.

This list may optionally be filtered by Release name, Ruleset name, TestSuite name, or any combination thereof.

Request parameters:

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

filter - Release filter. The list method supports filters with restrictions on the Release.name, and Release.ruleset_name. Example 1: A filter of 'name=prod*' might return Releases with names within 'projects/foo' prefixed with 'prod': Name -> Ruleset Name: * projects/foo/releases/prod -> projects/foo/rulesets/uuid1234 * projects/foo/releases/prod/v1 -> projects/foo/rulesets/uuid1234 * projects/foo/releases/prod/v2 -> projects/foo/rulesets/uuid8888 Example 2: A filter of name=prod* ruleset_name=uuid1234 would return only Release instances for 'projects/foo' with names prefixed with 'prod' referring to the same Ruleset name of 'uuid1234': Name -> Ruleset Name:

  • projects/foo/releases/prod -> projects/foo/rulesets/1234 * projects/foo/releases/prod/v1 -> projects/foo/rulesets/1234 In the examples, the filter parameters refer to the search filters are relative to the project. Fully qualified prefixed may also be used.

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

pageToken - Next page token for the next batch of Release instances.

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

Completes with a ListReleasesResponse.

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<ListReleasesResponse> 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>>{
    if (filter != null) 'filter': [filter],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if ($fields != null) 'fields': [$fields],
  };

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

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