update method
Updates the state of an existing Cloud Dataflow job.
To update the state of an existing job, we recommend using
projects.locations.jobs.update with a
regional endpoint.
Using projects.jobs.update is not recommended, as you can only update
the state of jobs that are running in us-central1.
request - The metadata request object.
Request parameters:
projectId - The ID of the Cloud Platform project that the job belongs
to.
location - The
regional endpoint
that contains this job.
jobId - The job ID.
updateMask - The list of fields to update relative to Job. If empty,
only RequestedJobState will be considered for update. If the FieldMask is
not empty and RequestedJobState is none/empty, The fields specified in the
update mask will be the only ones considered for update. If both
RequestedJobState and update_mask are specified, an error will be returned
as we cannot update both state and mask.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a Job.
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<Job> update(
  Job request,
  core.String projectId,
  core.String location,
  core.String jobId, {
  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_ = 'v1b3/projects/' +
      commons.escapeVariable('$projectId') +
      '/locations/' +
      commons.escapeVariable('$location') +
      '/jobs/' +
      commons.escapeVariable('$jobId');
  final response_ = await _requester.request(
    url_,
    'PUT',
    body: body_,
    queryParams: queryParams_,
  );
  return Job.fromJson(response_ as core.Map<core.String, core.dynamic>);
}