Class BulkOperation
java.lang.Object
co.elastic.clients.elasticsearch.core.bulk.BulkOperation
- All Implemented Interfaces:
JsonpSerializable,NdJsonpSerializable,TaggedUnion<BulkOperation.Kind,java.lang.Object>
public class BulkOperation extends java.lang.Object implements TaggedUnion<BulkOperation.Kind,java.lang.Object>, NdJsonpSerializable, JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBulkOperation.Builderstatic classBulkOperation.KindBulkOperationvariant kinds. -
Constructor Summary
Constructors Constructor Description BulkOperation(BulkOperationVariant value) -
Method Summary
Modifier and Type Method Description java.lang.Object_get()BulkOperation.Kind_kind()Get the of the kind of variant held by this object.java.util.Iterator<?>_serializables()<TDocument>
CreateOperation<TDocument>create()Get thecreatevariant value.DeleteOperationdelete()Get thedeletevariant value.<TDocument>
IndexOperation<TDocument>index()Get theindexvariant value.booleanisCreate()Is this variant instance of kindcreate?booleanisDelete()Is this variant instance of kinddelete?booleanisIndex()Is this variant instance of kindindex?booleanisUpdate()Is this variant instance of kindupdate?static BulkOperationof(java.util.function.Function<BulkOperation.Builder,ObjectBuilder<BulkOperation>> fn)voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)java.lang.StringtoString()<TDocument, TPartialDocument>
UpdateOperation<TDocument,TPartialDocument>update()Get theupdatevariant value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
BulkOperation
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<BulkOperation.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin interfaceTaggedUnion<BulkOperation.Kind,java.lang.Object>
-
of
public static BulkOperation of(java.util.function.Function<BulkOperation.Builder,ObjectBuilder<BulkOperation>> fn) -
_serializables
public java.util.Iterator<?> _serializables()- Specified by:
_serializablesin interfaceNdJsonpSerializable
-
isIndex
public boolean isIndex()Is this variant instance of kindindex? -
index
Get theindexvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theindexkind.
-
isCreate
public boolean isCreate()Is this variant instance of kindcreate? -
create
Get thecreatevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thecreatekind.
-
isUpdate
public boolean isUpdate()Is this variant instance of kindupdate? -
update
Get theupdatevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theupdatekind.
-
isDelete
public boolean isDelete()Is this variant instance of kinddelete? -
delete
Get thedeletevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thedeletekind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-