patch method

Updates an evaluation job.

You can only update certain fields of the job's EvaluationJobConfig: humanAnnotationConfig.instruction, exampleCount, and exampleSamplePercentage. If you want to change any other aspect of the evaluation job, you must delete the job and create a new one.

request - The metadata request object.

Request parameters:

name - Output only. After you create a job, Data Labeling Service assigns a name to the job with the following format: "projects/{project_id}/evaluationJobs/ {evaluation_job_id}" Value must have pattern ^projects/\[^/\]+/evaluationJobs/\[^/\]+$.

updateMask - Optional. Mask for which fields to update. You can only provide the following fields: * evaluationJobConfig.humanAnnotationConfig.instruction * evaluationJobConfig.exampleCount * evaluationJobConfig.exampleSamplePercentage You can provide more than one of these fields by separating them with commas.

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

Completes with a GoogleCloudDatalabelingV1beta1EvaluationJob.

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<GoogleCloudDatalabelingV1beta1EvaluationJob> patch(
  GoogleCloudDatalabelingV1beta1EvaluationJob request,
  core.String name, {
  core.String? updateMask,
  core.String? $fields,
}) async {
  final _body = convert.json.encode(request);
  final _queryParams = <core.String, core.List<core.String>>{
    if (updateMask != null) 'updateMask': [updateMask],
    if ($fields != null) 'fields': [$fields],
  };

  final _url = 'v1beta1/' + core.Uri.encodeFull('$name');

  final _response = await _requester.request(
    _url,
    'PATCH',
    body: _body,
    queryParams: _queryParams,
  );
  return GoogleCloudDatalabelingV1beta1EvaluationJob.fromJson(
      _response as core.Map<core.String, core.dynamic>);
}