patch method

Future<GoogleCloudDataplexV1Entry> patch(
  1. GoogleCloudDataplexV1Entry request,
  2. String name, {
  3. bool? allowMissing,
  4. List<String>? aspectKeys,
  5. bool? deleteMissingAspects,
  6. String? updateMask,
  7. String? $fields,
})

Updates an Entry.

request - The metadata request object.

Request parameters:

name - Identifier. The relative resource name of the Entry, of the form: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/entryGroups/\[^/\]+/entries/.*$.

allowMissing - Optional. If set to true and the entry does not exist, it will be created.

aspectKeys - Optional. The map keys of the Aspects which should be modified. Supports the following syntaxes: * - matches aspect on given type and empty path * @path - matches aspect on given type and specified path * * - matches aspects on given type for all paths * *@path - matches aspects of all types on the given pathExisting aspects matching the syntax will not be removed unless delete_missing_aspects is set to true.If this field is left empty, it will be treated as specifying exactly those Aspects present in the request.

deleteMissingAspects - Optional. If set to true and the aspect_keys specify aspect ranges, any existing aspects from that range not provided in the request will be deleted.

updateMask - Optional. Mask of fields to update. To update Aspects, the update_mask must contain the value "aspects".If the update_mask is empty, all modifiable fields present in the request will be updated.

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

Completes with a GoogleCloudDataplexV1Entry.

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<GoogleCloudDataplexV1Entry> patch(
  GoogleCloudDataplexV1Entry request,
  core.String name, {
  core.bool? allowMissing,
  core.List<core.String>? aspectKeys,
  core.bool? deleteMissingAspects,
  core.String? updateMask,
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if (allowMissing != null) 'allowMissing': ['${allowMissing}'],
    if (aspectKeys != null) 'aspectKeys': aspectKeys,
    if (deleteMissingAspects != null)
      'deleteMissingAspects': ['${deleteMissingAspects}'],
    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 GoogleCloudDataplexV1Entry.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}