list method

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

Lists previously requested builds.

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

Request parameters:

parent - The parent of the collection of Builds. Format: projects/{project}/locations/{location} Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$.

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.

projectId - Required. ID of the project.

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

  final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/builds';

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