updateView method

Future<LogView> updateView(
  1. UpdateViewRequest request
)

Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

Future<LogView> updateView(UpdateViewRequest request) async {
  final url = _endPoint.replace(
    path: '/v2/${request.name}',
    queryParameters: {
      if (request.updateMask case final $1?) 'updateMask': $1.toJson(),
    },
  );
  final response = await _client.patch(url, body: request.view);
  return LogView.fromJson(response);
}