Class HitsEvent.Builder<TEvent>
java.lang.Object
co.elastic.clients.elasticsearch.eql.HitsEvent.Builder<TEvent>
- All Implemented Interfaces:
ObjectBuilder<HitsEvent<TEvent>>
public static class HitsEvent.Builder<TEvent> extends java.lang.Object 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.util.Map<java.lang.String,java.util.List<JsonData>> value)
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>
putFields(java.lang.String key, java.util.List<JsonData> value)
Add a key/value tofields(Map)
, creating the map if needed.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 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 HitsEvent.Builder<TEvent> fields(@Nullable java.util.Map<java.lang.String,java.util.List<JsonData>> value)API name:fields
-
putFields
Add a key/value tofields(Map)
, creating the map if needed. -
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.
-