patch method
Updates a Service.
request - The metadata request object.
Request parameters:
name - Identifier. The fully qualified name of this Service. In
CreateServiceRequest, this field is ignored, and instead composed from
CreateServiceRequest.parent and CreateServiceRequest.service_id. Format:
projects/{project}/locations/{location}/services/{service_id}
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/services/\[^/\]+$.
allowMissing - Optional. If set to true, and if the Service does not
exist, it will create a new one. The caller must have
'run.services.create' permissions if this is set to true and the Service
does not exist.
forceNewRevision - Optional. If set to true, a new revision will be
created from the template even if the system doesn't detect any changes
from the previously deployed revision. This may be useful for cases where
the underlying resources need to be recreated or reinitialized. For
example if the image is specified by label, but the underlying image
digest has changed) or if the container performs deployment initialization
work that needs to be performed again.
updateMask - Optional. The list of fields to be updated.
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(
GoogleCloudRunV2Service request,
core.String name, {
core.bool? allowMissing,
core.bool? forceNewRevision,
core.String? updateMask,
core.bool? validateOnly,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'allowMissing': ?allowMissing == null ? null : ['${allowMissing}'],
'forceNewRevision': ?forceNewRevision == null
? null
: ['${forceNewRevision}'],
'updateMask': ?updateMask == null ? null : [updateMask],
'validateOnly': ?validateOnly == null ? null : ['${validateOnly}'],
'fields': ?$fields == null ? null : [$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>,
);
}