Class UpdateAction.Builder<TDocument,TPartialDocument>
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<UpdateAction.Builder<TDocument,TPartialDocument>>
co.elastic.clients.elasticsearch.core.bulk.UpdateAction.Builder<TDocument,TPartialDocument>
- All Implemented Interfaces:
WithJson<UpdateAction.Builder<TDocument,TPartialDocument>>
,ObjectBuilder<UpdateAction<TDocument,TPartialDocument>>
- Enclosing class:
- UpdateAction<TDocument,TPartialDocument>
public static class UpdateAction.Builder<TDocument,TPartialDocument> extends WithJsonObjectBuilderBase<UpdateAction.Builder<TDocument,TPartialDocument>> implements ObjectBuilder<UpdateAction<TDocument,TPartialDocument>>
Builder for
UpdateAction
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description UpdateAction<TDocument,TPartialDocument>
build()
Builds aUpdateAction
.UpdateAction.Builder<TDocument,TPartialDocument>
detectNoop(java.lang.Boolean value)
Set to false to disable setting 'result' in the response to 'noop' if no change to the document occurred.UpdateAction.Builder<TDocument,TPartialDocument>
doc(TPartialDocument value)
A partial update to an existing document.UpdateAction.Builder<TDocument,TPartialDocument>
docAsUpsert(java.lang.Boolean value)
Set to true to use the contents of 'doc' as the value of 'upsert'UpdateAction.Builder<TDocument,TPartialDocument>
script(Script value)
Script to execute to update the document.UpdateAction.Builder<TDocument,TPartialDocument>
script(java.util.function.Function<Script.Builder,ObjectBuilder<Script>> fn)
Script to execute to update the document.UpdateAction.Builder<TDocument,TPartialDocument>
scriptedUpsert(java.lang.Boolean value)
Set to true to execute the script whether or not the document exists.protected UpdateAction.Builder<TDocument,TPartialDocument>
self()
UpdateAction.Builder<TDocument,TPartialDocument>
source(SourceConfig value)
Set to false to disable source retrieval.UpdateAction.Builder<TDocument,TPartialDocument>
source(java.util.function.Function<SourceConfig.Builder,ObjectBuilder<SourceConfig>> fn)
Set to false to disable source retrieval.UpdateAction.Builder<TDocument,TPartialDocument>
tDocumentSerializer(JsonpSerializer<TDocument> value)
Serializer for TDocument.UpdateAction.Builder<TDocument,TPartialDocument>
tPartialDocumentSerializer(JsonpSerializer<TPartialDocument> value)
Serializer for TPartialDocument.UpdateAction.Builder<TDocument,TPartialDocument>
upsert(TDocument value)
If the document does not already exist, the contents of 'upsert' are inserted as a new document.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
-
detectNoop
public final UpdateAction.Builder<TDocument,TPartialDocument> detectNoop(@Nullable java.lang.Boolean value)Set to false to disable setting 'result' in the response to 'noop' if no change to the document occurred.API name:
detect_noop
-
doc
public final UpdateAction.Builder<TDocument,TPartialDocument> doc(@Nullable TPartialDocument value)A partial update to an existing document.API name:
doc
-
docAsUpsert
public final UpdateAction.Builder<TDocument,TPartialDocument> docAsUpsert(@Nullable java.lang.Boolean value)Set to true to use the contents of 'doc' as the value of 'upsert'API name:
doc_as_upsert
-
script
Script to execute to update the document.API name:
script
-
script
public final UpdateAction.Builder<TDocument,TPartialDocument> script(java.util.function.Function<Script.Builder,ObjectBuilder<Script>> fn)Script to execute to update the document.API name:
script
-
scriptedUpsert
public final UpdateAction.Builder<TDocument,TPartialDocument> scriptedUpsert(@Nullable java.lang.Boolean value)Set to true to execute the script whether or not the document exists.API name:
scripted_upsert
-
source
public final UpdateAction.Builder<TDocument,TPartialDocument> source(@Nullable SourceConfig value)Set to false to disable source retrieval. You can also specify a comma-separated list of the fields you want to retrieve.API name:
_source
-
source
public final UpdateAction.Builder<TDocument,TPartialDocument> source(java.util.function.Function<SourceConfig.Builder,ObjectBuilder<SourceConfig>> fn)Set to false to disable source retrieval. You can also specify a comma-separated list of the fields you want to retrieve.API name:
_source
-
upsert
If the document does not already exist, the contents of 'upsert' are inserted as a new document. If the document exists, the 'script' is executed.API name:
upsert
-
tDocumentSerializer
public final UpdateAction.Builder<TDocument,TPartialDocument> tDocumentSerializer(@Nullable JsonpSerializer<TDocument> value)Serializer for TDocument. If not set, an attempt will be made to find a serializer from the JSON context. -
tPartialDocumentSerializer
public final UpdateAction.Builder<TDocument,TPartialDocument> tPartialDocumentSerializer(@Nullable JsonpSerializer<TPartialDocument> value)Serializer for TPartialDocument. If not set, an attempt will be made to find a serializer from the JSON context. -
self
- Specified by:
self
in classWithJsonObjectBuilderBase<UpdateAction.Builder<TDocument,TPartialDocument>>
-
build
Builds aUpdateAction
.- Specified by:
build
in interfaceObjectBuilder<TDocument>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-