Class QueryResponse.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<QueryResponse.Builder>
co.elastic.clients.elasticsearch.sql.QueryResponse.Builder
- 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 Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description QueryResponse
build()
Builds aQueryResponse
.QueryResponse.Builder
columns(Column value, Column... values)
Column headings for the search results.QueryResponse.Builder
columns(java.util.function.Function<Column.Builder,ObjectBuilder<Column>> fn)
Column headings for the search results.QueryResponse.Builder
columns(java.util.List<Column> list)
Column headings for the search results.QueryResponse.Builder
cursor(java.lang.String value)
Cursor for the next set of paginated results.QueryResponse.Builder
id(java.lang.String value)
Identifier for the search.QueryResponse.Builder
isPartial(java.lang.Boolean value)
Iftrue
, the response does not contain complete search results.QueryResponse.Builder
isRunning(java.lang.Boolean value)
Iftrue
, the search is still running.QueryResponse.Builder
rows(java.util.List<JsonData> value, java.util.List<JsonData>... values)
Required - Values for the search results.QueryResponse.Builder
rows(java.util.List<java.util.List<JsonData>> list)
Required - Values for the search results.protected QueryResponse.Builder
self()
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
id
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 theAsync-ID
HTTP header.API name:
id
-
isRunning
Iftrue
, 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 theAsync-partial
HTTP header.API name:
is_running
-
isPartial
Iftrue
, the response does not contain complete search results. Ifis_partial
istrue
andis_running
istrue
, the search is still running. Ifis_partial
istrue
butis_running
isfalse
, 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 theAsync-partial
HTTP header.API name:
is_partial
-
columns
Column headings for the search results. Each object is a column.API name:
columns
Adds all elements of
list
tocolumns
. -
columns
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
Cursor for the next set of paginated results. For CSV, TSV, and TXT responses, this value is returned in theCursor
HTTP header.API name:
cursor
-
rows
Required - Values for the search results.API name:
rows
Adds all elements of
list
torows
. -
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
- Specified by:
self
in classWithJsonObjectBuilderBase<QueryResponse.Builder>
-
build
Builds aQueryResponse
.- Specified by:
build
in interfaceObjectBuilder<QueryResponse>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-