Class HitsEvent.Builder<TEvent>
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<HitsEvent.Builder<TEvent>>
co.elastic.clients.elasticsearch.eql.HitsEvent.Builder<TEvent>
- All Implemented Interfaces:
WithJson<HitsEvent.Builder<TEvent>>,ObjectBuilder<HitsEvent<TEvent>>
public static class HitsEvent.Builder<TEvent> extends WithJsonObjectBuilderBase<HitsEvent.Builder<TEvent>> 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:fieldsHitsEvent.Builder<TEvent>fields(java.util.Map<java.lang.String,java.util.List<JsonData>> map)API name:fieldsHitsEvent.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.protected HitsEvent.Builder<TEvent>self()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.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAllMethods 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:fieldsAdds all entries of
maptofields. -
fields
public final HitsEvent.Builder<TEvent> fields(java.lang.String key, java.util.List<JsonData> value)API name:fieldsAdds an entry to
fields. -
tEventSerializer
Serializer for TEvent. If not set, an attempt will be made to find a serializer from the JSON context. -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<HitsEvent.Builder<TEvent>>
-
build
Builds aHitsEvent.- Specified by:
buildin interfaceObjectBuilder<TEvent>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-