Class QueryResponse.Builder

java.lang.Object
All Implemented Interfaces:
WithJson<QueryResponse.Builder>, ObjectBuilder<QueryResponse>
Enclosing class:
QueryResponse

public static class QueryResponse.Builder
extends WithJsonObjectBuilderBase<QueryResponse.Builder>
implements ObjectBuilder<QueryResponse>
Builder for QueryResponse.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • id

      public final QueryResponse.Builder id​(@Nullable java.lang.String value)
      Identifier for the search. This value is only returned for async and saved synchronous searches. For CSV, TSV, and TXT responses, this value is returned in the Async-ID HTTP header.

      API name: id

    • isRunning

      public final QueryResponse.Builder isRunning​(@Nullable java.lang.Boolean value)
      If true, the search is still running. If false, the search has finished. This value is only returned for async and saved synchronous searches. For CSV, TSV, and TXT responses, this value is returned in the Async-partial HTTP header.

      API name: is_running

    • isPartial

      public final QueryResponse.Builder isPartial​(@Nullable java.lang.Boolean value)
      If true, the response does not contain complete search results. If is_partial is true and is_running is true, the search is still running. If is_partial is true but is_running is false, the results are partial due to a failure or timeout. This value is only returned for async and saved synchronous searches. For CSV, TSV, and TXT responses, this value is returned in the Async-partial HTTP header.

      API name: is_partial

    • columns

      public final QueryResponse.Builder columns​(java.util.List<Column> list)
      Column headings for the search results. Each object is a column.

      API name: columns

      Adds all elements of list to columns.

    • columns

      public final QueryResponse.Builder columns​(Column value, Column... values)
      Column headings for the search results. Each object is a column.

      API name: columns

      Adds one or more values to columns.

    • columns

      public final QueryResponse.Builder columns​(java.util.function.Function<Column.Builder,​ObjectBuilder<Column>> fn)
      Column headings for the search results. Each object is a column.

      API name: columns

      Adds a value to columns using a builder lambda.

    • cursor

      public final QueryResponse.Builder cursor​(@Nullable java.lang.String value)
      Cursor for the next set of paginated results. For CSV, TSV, and TXT responses, this value is returned in the Cursor HTTP header.

      API name: cursor

    • rows

      public final QueryResponse.Builder rows​(java.util.List<java.util.List<JsonData>> list)
      Required - Values for the search results.

      API name: rows

      Adds all elements of list to rows.

    • rows

      public final QueryResponse.Builder rows​(java.util.List<JsonData> value, java.util.List<JsonData>... values)
      Required - Values for the search results.

      API name: rows

      Adds one or more values to rows.

    • self

      protected QueryResponse.Builder self()
      Specified by:
      self in class WithJsonObjectBuilderBase<QueryResponse.Builder>
    • build

      public QueryResponse build()
      Builds a QueryResponse.
      Specified by:
      build in interface ObjectBuilder<QueryResponse>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.