patch method

Future<Operation> patch(
  1. Connection request,
  2. String name, {
  3. bool? force,
  4. String? updateMask,
  5. String? $fields,
})

Updates the allocated ranges that are assigned to a connection.

request - The metadata request object.

Request parameters:

name - The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of services/{peering_service_name}/connections/{vpc_peering_name}. For Google services that support this functionality, this is services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com. Value must have pattern ^services/\[^/\]+/connections/\[^/\]+$.

force - If a previously defined allocated range is removed, force flag must be set to true.

updateMask - The update mask. If this is omitted, it defaults to "*". You can only update the listed peering ranges.

$fields - Selector specifying which fields to include in a partial response.

Completes with a Operation.

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<Operation> patch(
  Connection request,
  core.String name, {
  core.bool? force,
  core.String? updateMask,
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if (force != null) 'force': ['${force}'],
    if (updateMask != null) 'updateMask': [updateMask],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name');

  final response_ = await _requester.request(
    url_,
    'PATCH',
    body: body_,
    queryParams: queryParams_,
  );
  return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}