list method
List Tasks associated with a job.
Request parameters:
parent - Required. Name of a TaskGroup from which Tasks are being
requested. Pattern:
"projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}"
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/jobs/\[^/\]+/taskGroups/\[^/\]+$.
filter - Task filter, null filter matches all Tasks. Filter string
should be of the format State=TaskStatus.State e.g. State=RUNNING
pageSize - Page size.
pageToken - Page token.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ListTasksResponse.
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<ListTasksResponse> list(
core.String parent, {
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('$parent') + '/tasks';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListTasksResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}