patch method

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

Updates a search application.

Note: This API requires an admin account to execute.

request - The metadata request object.

Request parameters:

name - The name of the Search Application. Format: searchapplications/{application_id}. Value must have pattern ^searchapplications/\[^/\]+$.

updateMask - Only applies to [settings.searchapplications.patch](https://developers.google.com/cloud-search/docs/reference/rest/v1/settings.searchapplications/patch). Update mask to control which fields to update. Example field paths: search_application.name, search_application.displayName. * If update_mask is non-empty, then only the fields specified in the update_mask are updated. * If you specify a field in the update_mask, but don't specify its value in the search_application, then that field is cleared. * If the update_mask is not present or empty or has the value *, then all fields are updated.

$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(
  SearchApplication 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_ = 'v1/settings/' + 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>);
}