patch method

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

Updates a specified table.

request - The metadata request object.

Request parameters:

name - The unique name of the table. Values are of the form projects/{project}/instances/{instance}/tables/_a-zA-Z0-9*. Views: NAME_ONLY, SCHEMA_VIEW, REPLICATION_VIEW, STATS_VIEW, FULL Value must have pattern ^projects/\[^/\]+/instances/\[^/\]+/tables/\[^/\]+$.

updateMask - Required. The list of fields to update. A mask specifying which fields (e.g. change_stream_config) in the table field should be updated. This mask is relative to the table field, not to the request message. The wildcard (*) path is currently not supported. Currently UpdateTable is only supported for the following fields: * change_stream_config * change_stream_config.retention_period * deletion_protection If column_families is set in update_mask, it will return an UNIMPLEMENTED error.

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

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