patch method

Future<GoogleLongrunningOperation> patch(
  1. OutboundEndpoint request,
  2. String name, {
  3. String? clientOperationId,
  4. String? requestId,
  5. String? updateMask,
  6. String? $fields,
})

Updates an existing Outbound Endpoint.

request - The metadata request object.

Request parameters:

name - Identifier. The resource name of the OutboundEndpoint. Format: projects/{project}/locations/{location}/outboundEndpoints/{outboundEndpoint} Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/outboundEndpoints/\[^/\]+$.

clientOperationId - For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.

requestId - Optional. An optional request ID to identify requests.

updateMask - Required. The list of fields to be updated.

$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(
  OutboundEndpoint request,
  core.String name, {
  core.String? clientOperationId,
  core.String? requestId,
  core.String? updateMask,
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    'clientOperationId': ?clientOperationId == null
        ? null
        : [clientOperationId],
    'requestId': ?requestId == null ? null : [requestId],
    'updateMask': ?updateMask == null ? null : [updateMask],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ = 'dns/v1/' + 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>,
  );
}