queryCorpus method

  1. @override
Future<QueryCorpusResponse> queryCorpus(
  1. QueryCorpusRequest request
)
override

Performs semantic search over a Corpus.

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

@override
Future<QueryCorpusResponse> queryCorpus(QueryCorpusRequest request) async {
  if (isClosed) throw StateError('Service is closed');

  if (_queryCorpus case final queryCorpus?) {
    return queryCorpus(request);
  }
  throw UnsupportedError('queryCorpus');
}