createView method
Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views.
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> createView(CreateViewRequest request) async {
final url = Uri.https(_host, '/v2/${request.parent}/views', {
if (request.viewId.isNotDefault) 'viewId': request.viewId,
});
final response = await _client.post(url, body: request.view);
return LogView.fromJson(response);
}