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);
  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>);
}