Class GetResponse.Builder<TDocument>
java.lang.Object
org.opensearch.client.opensearch._global.GetResponse.Builder<TDocument>
- All Implemented Interfaces:
ObjectBuilder<GetResponse<TDocument>>
- Enclosing class:
- GetResponse<TDocument>
public static class GetResponse.Builder<TDocument> extends java.lang.Object implements ObjectBuilder<GetResponse<TDocument>>
Builder for
GetResponse.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.client.util.ObjectBuilder
ObjectBuilder.Constant<V> -
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description GetResponse<TDocument>build()Builds aGetResponse.GetResponse.Builder<TDocument>fields(java.util.Map<java.lang.String,jakarta.json.JsonValue> value)API name:fieldsGetResponse.Builder<TDocument>found(java.lang.Boolean value)API name:foundGetResponse.Builder<TDocument>id(java.lang.String value)API name:_idGetResponse.Builder<TDocument>index(java.lang.String value)API name:_indexGetResponse.Builder<TDocument>primaryTerm(java.lang.Number value)API name:_primary_termGetResponse.Builder<TDocument>putFields(java.lang.String key, jakarta.json.JsonValue value)Add a key/value tofields(Map), creating the map if needed.GetResponse.Builder<TDocument>routing(java.lang.String value)API name:_routingGetResponse.Builder<TDocument>seqNo(java.lang.Number value)API name:_seq_noGetResponse.Builder<TDocument>source(TDocument value)API name:_sourceGetResponse.Builder<TDocument>tDocumentSerializer(JsonpSerializer<TDocument> value)Serializer for TDocument.GetResponse.Builder<TDocument>type(java.lang.String value)deprecated since 7.0.0 API name:_typeGetResponse.Builder<TDocument>version(java.lang.Number value)API name:_version
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
index
API name:_index -
fields
public GetResponse.Builder<TDocument> fields(@Nullable java.util.Map<java.lang.String,jakarta.json.JsonValue> value)API name:fields -
putFields
public GetResponse.Builder<TDocument> putFields(java.lang.String key, jakarta.json.JsonValue value)Add a key/value tofields(Map), creating the map if needed. -
found
API name:found -
id
API name:_id -
primaryTerm
API name:_primary_term -
routing
API name:_routing -
seqNo
API name:_seq_no -
source
API name:_source -
type
deprecated since 7.0.0 API name:_type -
version
API name:_version -
tDocumentSerializer
public GetResponse.Builder<TDocument> tDocumentSerializer(@Nullable JsonpSerializer<TDocument> value)Serializer for TDocument. If not set, an attempt will be made to find a serializer from the JSON context. -
build
Builds aGetResponse.- Specified by:
buildin interfaceObjectBuilder<TDocument>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-