patch method

Future<GoogleLongrunningOperation> patch(
  1. GoogleCloudRunV2Service request,
  2. String name, {
  3. bool? allowMissing,
  4. String? updateMask,
  5. bool? validateOnly,
  6. String? $fields,
})

Updates a Service.

request - The metadata request object.

Request parameters:

name - 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.

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.String? updateMask,
  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 (updateMask != null) 'updateMask': [updateMask],
    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>);
}