list method

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

Lists service operations that match the specified filter in the request.

Request parameters:

filter - A string for filtering Operations. The following filter fields are supported: * serviceName: Required. Only = operator is allowed. * startTime: The time this job was started, in ISO 8601 format. Allowed operators are >=, >, <=, and <. * status: Can be done, in_progress, or failed. Allowed operators are =, and !=. Filter expression supports conjunction (AND) and disjunction (OR) logical operators. However, the serviceName restriction must be at the top-level and can only be combined with other restrictions via the AND logical operator. Examples: * serviceName={some-service}.googleapis.com * serviceName={some-service}.googleapis.com AND startTime>="2017-02-01" * serviceName={some-service}.googleapis.com AND status=done * serviceName={some-service}.googleapis.com AND (status=done OR startTime>="2017-02-01")

name - Not used.

pageSize - The maximum number of operations to return. If unspecified, defaults to 50. The maximum value is 100.

pageToken - The standard list page token.

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

Completes with a ListOperationsResponse.

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

  const url_ = 'v1/operations';

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