list method

Future<ListUserProcessesResponse> list({
  1. int? pageSize,
  2. String? pageToken,
  3. String? userProcessFilter_deploymentId,
  4. String? userProcessFilter_endTime,
  5. String? userProcessFilter_functionName,
  6. String? userProcessFilter_projectName,
  7. String? userProcessFilter_scriptId,
  8. String? userProcessFilter_startTime,
  9. List<String>? userProcessFilter_statuses,
  10. List<String>? userProcessFilter_types,
  11. List<String>? userProcessFilter_userAccessLevels,
  12. String? $fields,
})

List information about processes made by or on behalf of a user, such as process type and current status.

Request parameters:

pageSize - The maximum number of returned processes per page of results. Defaults to 50.

pageToken - The token for continuing a previous list request on the next page. This should be set to the value of nextPageToken from a previous response.

userProcessFilter_deploymentId - Optional field used to limit returned processes to those originating from projects with a specific deployment ID.

userProcessFilter_endTime - Optional field used to limit returned processes to those that completed on or before the given timestamp.

userProcessFilter_functionName - Optional field used to limit returned processes to those originating from a script function with the given function name.

userProcessFilter_projectName - Optional field used to limit returned processes to those originating from projects with project names containing a specific string.

userProcessFilter_scriptId - Optional field used to limit returned processes to those originating from projects with a specific script ID.

userProcessFilter_startTime - Optional field used to limit returned processes to those that were started on or after the given timestamp.

userProcessFilter_statuses - Optional field used to limit returned processes to those having one of the specified process statuses.

userProcessFilter_types - Optional field used to limit returned processes to those having one of the specified process types.

userProcessFilter_userAccessLevels - Optional field used to limit returned processes to those having one of the specified user access levels.

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

Completes with a ListUserProcessesResponse.

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<ListUserProcessesResponse> list({
  core.int? pageSize,
  core.String? pageToken,
  core.String? userProcessFilter_deploymentId,
  core.String? userProcessFilter_endTime,
  core.String? userProcessFilter_functionName,
  core.String? userProcessFilter_projectName,
  core.String? userProcessFilter_scriptId,
  core.String? userProcessFilter_startTime,
  core.List<core.String>? userProcessFilter_statuses,
  core.List<core.String>? userProcessFilter_types,
  core.List<core.String>? userProcessFilter_userAccessLevels,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (userProcessFilter_deploymentId != null)
      'userProcessFilter.deploymentId': [userProcessFilter_deploymentId],
    if (userProcessFilter_endTime != null)
      'userProcessFilter.endTime': [userProcessFilter_endTime],
    if (userProcessFilter_functionName != null)
      'userProcessFilter.functionName': [userProcessFilter_functionName],
    if (userProcessFilter_projectName != null)
      'userProcessFilter.projectName': [userProcessFilter_projectName],
    if (userProcessFilter_scriptId != null)
      'userProcessFilter.scriptId': [userProcessFilter_scriptId],
    if (userProcessFilter_startTime != null)
      'userProcessFilter.startTime': [userProcessFilter_startTime],
    if (userProcessFilter_statuses != null)
      'userProcessFilter.statuses': userProcessFilter_statuses,
    if (userProcessFilter_types != null)
      'userProcessFilter.types': userProcessFilter_types,
    if (userProcessFilter_userAccessLevels != null)
      'userProcessFilter.userAccessLevels':
          userProcessFilter_userAccessLevels,
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'v1/processes';

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