Class HitsEvent.Builder<TEvent>
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.elasticsearch.eql.HitsEvent.Builder<TEvent>
- All Implemented Interfaces:
ObjectBuilder<HitsEvent<TEvent>>
public static class HitsEvent.Builder<TEvent> extends ObjectBuilderBase implements ObjectBuilder<HitsEvent<TEvent>>
Builder for
HitsEvent
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description HitsEvent<TEvent>
build()
Builds aHitsEvent
.HitsEvent.Builder<TEvent>
fields(java.lang.String key, java.util.List<JsonData> value)
API name:fields
HitsEvent.Builder<TEvent>
fields(java.util.Map<java.lang.String,java.util.List<JsonData>> map)
API name:fields
HitsEvent.Builder<TEvent>
id(java.lang.String value)
Required - Unique identifier for the event.HitsEvent.Builder<TEvent>
index(java.lang.String value)
Required - Name of the index containing the event.HitsEvent.Builder<TEvent>
source(TEvent value)
Required - Original JSON body passed for the event at index time.HitsEvent.Builder<TEvent>
tEventSerializer(JsonpSerializer<TEvent> value)
Serializer for TEvent.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
-
index
Required - Name of the index containing the event.API name:
_index
-
id
Required - Unique identifier for the event. This ID is only unique within the index.API name:
_id
-
source
Required - Original JSON body passed for the event at index time.API name:
_source
-
fields
public final HitsEvent.Builder<TEvent> fields(java.util.Map<java.lang.String,java.util.List<JsonData>> map)API name:fields
Adds all entries of
map
tofields
. -
fields
public final HitsEvent.Builder<TEvent> fields(java.lang.String key, java.util.List<JsonData> value)API name:fields
Adds an entry to
fields
. -
tEventSerializer
Serializer for TEvent. If not set, an attempt will be made to find a serializer from the JSON context. -
build
Builds aHitsEvent
.- Specified by:
build
in interfaceObjectBuilder<TEvent>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-