patch method

Updates the catalog configuration.

request - The metadata request object.

Request parameters:

name - The fully qualified resource name of the catalog. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/catalogs/\[^/\]+$.

updateMask - Optional. Indicates which fields in the provided 'catalog' to update. If not set, will only update the catalog_item_level_config field. Currently only fields that can be updated are catalog_item_level_config.

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

Completes with a GoogleCloudRecommendationengineV1beta1Catalog.

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

  final _url = 'v1beta1/' + core.Uri.encodeFull('$name');

  final _response = await _requester.request(
    _url,
    'PATCH',
    body: _body,
    queryParams: _queryParams,
  );
  return GoogleCloudRecommendationengineV1beta1Catalog.fromJson(
      _response as core.Map<core.String, core.dynamic>);
}