list method

Future<ListBuildsResponse> list(
  1. String projectId, {
  2. String? filter,
  3. int? pageSize,
  4. String? pageToken,
  5. String? parent,
  6. String? $fields,
})

Lists previously requested builds.

Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.

Request parameters:

projectId - Required. ID of the project.

filter - The raw filter text to constrain the results.

pageSize - Number of results to return in the list.

pageToken - The page token for the next page of Builds. If unspecified, the first page of results is returned. If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. In this case, the token should be discarded, and pagination should be restarted from the first page of results. See https://google.aip.dev/158 for more.

parent - The parent of the collection of Builds. Format: projects/{project}/locations/{location}

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

Completes with a ListBuildsResponse.

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<ListBuildsResponse> list(
  core.String projectId, {
  core.String? filter,
  core.int? pageSize,
  core.String? pageToken,
  core.String? parent,
  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 (parent != null) 'parent': [parent],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ =
      'v1/projects/' + commons.escapeVariable('$projectId') + '/builds';

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