/**
  * Starts a search job and receives a job ID for subsequent polling of the search status.
  *
  * @param query The query.
  * @param fromExpression The from expression.
  * @param toExpression The toExpression.
  * @param timeZone The time zone.
  * @return The search job ID.
  */
 @Override
 public String createSearchJob(
     String query, String fromExpression, String toExpression, String timeZone) {
   CreateSearchJobRequest createSearchJobRequest =
       new CreateSearchJobRequest(query, fromExpression, toExpression, timeZone);
   return searchJobClient.createSearchJob(getConnectionConfig(), createSearchJobRequest);
 }
 /**
  * Returns records for the specified search job.
  *
  * @param searchJobId The search job ID.
  * @param offset The offset.
  * @param limit The length.
  * @return The records.
  */
 @Override
 public GetRecordsForSearchJobResponse getRecordsForSearchJob(
     String searchJobId, int offset, int limit) {
   GetRecordsForSearchJobRequest getRecordsForSearchJobRequest =
       new GetRecordsForSearchJobRequest(searchJobId, offset, limit);
   return searchJobClient.getRecordsForSearchJob(
       getConnectionConfig(), getRecordsForSearchJobRequest);
 }
 /**
  * Cancels a search job.
  *
  * @param searchJobId The search job ID.
  * @return The response.
  */
 @Override
 public CancelSearchJobResponse cancelSearchJob(String searchJobId) {
   CancelSearchJobRequest cancelSearchJobRequest = new CancelSearchJobRequest(searchJobId);
   return searchJobClient.deleteSearchJob(getConnectionConfig(), cancelSearchJobRequest);
 }
 /**
  * Returns the current status of a search job.
  *
  * @param searchJobId The search job ID.
  * @return The status.
  */
 @Override
 public GetSearchJobStatusResponse getSearchJobStatus(String searchJobId) {
   GetSearchJobStatusRequest getSearchJobStatusRequest =
       new GetSearchJobStatusRequest(searchJobId);
   return searchJobClient.getSearchJobStatus(getConnectionConfig(), getSearchJobStatusRequest);
 }