cancel method

Future<CancelTestMatrixResponse> cancel(
  1. String projectId,
  2. String testMatrixId, {
  3. String? $fields,
})

Cancels unfinished test executions in a test matrix.

This call returns immediately and cancellation proceeds asynchronously. If the matrix is already final, this operation will have no effect. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Test Matrix does not exist

Request parameters:

projectId - Cloud project that owns the test.

testMatrixId - Test matrix that will be canceled.

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

Completes with a CancelTestMatrixResponse.

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<CancelTestMatrixResponse> cancel(
  core.String projectId,
  core.String testMatrixId, {
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/projects/' +
      commons.escapeVariable('$projectId') +
      '/testMatrices/' +
      commons.escapeVariable('$testMatrixId') +
      ':cancel';

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