patch method
- GoogleCloudRunV2Job request,
- String name, {
- bool? allowMissing,
- bool? validateOnly,
- String? $fields,
Updates a Job.
request
- The metadata request object.
Request parameters:
name
- The fully qualified name of this Job. Format:
projects/{project}/locations/{location}/jobs/{job}
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/jobs/\[^/\]+$
.
allowMissing
- Optional. If set to true, and if the Job does not exist,
it will create a new one. Caller must have both create and update
permissions for this call if this is set to true.
validateOnly
- Indicates that the request should be validated and
default values populated, without persisting the request or updating any
resources.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleLongrunningOperation.
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<GoogleLongrunningOperation> patch(
GoogleCloudRunV2Job request,
core.String name, {
core.bool? allowMissing,
core.bool? validateOnly,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (allowMissing != null) 'allowMissing': ['${allowMissing}'],
if (validateOnly != null) 'validateOnly': ['${validateOnly}'],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v2/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'PATCH',
body: body_,
queryParams: queryParams_,
);
return GoogleLongrunningOperation.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}