updateView method
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 StatusException if the API failed with a
Status message. Throws a ServiceException for any other failure.
Implementation
Future<LogView> updateView(UpdateViewRequest request) async {
final url = Uri.https(_host, '/v2/${request.name}', {
if (request.updateMask case final $1?) 'updateMask': $1.toJson(),
});
final response = await _client.patch(url, body: request.view);
return LogView.fromJson(response);
}