cancelDataLabelingJob method

  1. @override
Future<void> cancelDataLabelingJob(
  1. CancelDataLabelingJobRequest request
)
override

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

@override
Future<void> cancelDataLabelingJob(
  CancelDataLabelingJobRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_cancelDataLabelingJob case final cancelDataLabelingJob?) {
    return cancelDataLabelingJob(request);
  }
  throw UnsupportedError('cancelDataLabelingJob');
}