listScriptProcesses method

Future<ListScriptProcessesResponse> listScriptProcesses({
  1. int? pageSize,
  2. String? pageToken,
  3. String? scriptId,
  4. String? scriptProcessFilter_deploymentId,
  5. String? scriptProcessFilter_endTime,
  6. String? scriptProcessFilter_functionName,
  7. String? scriptProcessFilter_startTime,
  8. List<String>? scriptProcessFilter_statuses,
  9. List<String>? scriptProcessFilter_types,
  10. List<String>? scriptProcessFilter_userAccessLevels,
  11. String? $fields,
})

List information about a script's executed processes, 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.

scriptId - The script ID of the project whose processes are listed.

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

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

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

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

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

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

scriptProcessFilter_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 ListScriptProcessesResponse.

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<ListScriptProcessesResponse> listScriptProcesses({
  core.int? pageSize,
  core.String? pageToken,
  core.String? scriptId,
  core.String? scriptProcessFilter_deploymentId,
  core.String? scriptProcessFilter_endTime,
  core.String? scriptProcessFilter_functionName,
  core.String? scriptProcessFilter_startTime,
  core.List<core.String>? scriptProcessFilter_statuses,
  core.List<core.String>? scriptProcessFilter_types,
  core.List<core.String>? scriptProcessFilter_userAccessLevels,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (scriptId != null) 'scriptId': [scriptId],
    if (scriptProcessFilter_deploymentId != null)
      'scriptProcessFilter.deploymentId': [scriptProcessFilter_deploymentId],
    if (scriptProcessFilter_endTime != null)
      'scriptProcessFilter.endTime': [scriptProcessFilter_endTime],
    if (scriptProcessFilter_functionName != null)
      'scriptProcessFilter.functionName': [scriptProcessFilter_functionName],
    if (scriptProcessFilter_startTime != null)
      'scriptProcessFilter.startTime': [scriptProcessFilter_startTime],
    if (scriptProcessFilter_statuses != null)
      'scriptProcessFilter.statuses': scriptProcessFilter_statuses,
    if (scriptProcessFilter_types != null)
      'scriptProcessFilter.types': scriptProcessFilter_types,
    if (scriptProcessFilter_userAccessLevels != null)
      'scriptProcessFilter.userAccessLevels':
          scriptProcessFilter_userAccessLevels,
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'v1/processes:listScriptProcesses';

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