Class BulkOperation
java.lang.Object
org.opensearch.client.opensearch.core.bulk.BulkOperation
- All Implemented Interfaces:
JsonpSerializable,NdJsonpSerializable,TaggedUnion<BulkOperation.Kind,Object>
public class BulkOperation
extends Object
implements TaggedUnion<BulkOperation.Kind,Object>, NdJsonpSerializable, JsonpSerializable
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Object_get()final BulkOperation.Kind_kind()Get the of the kind of variant held by this object.Iterator<?> <TDocument>
CreateOperation<TDocument> create()Get thecreatevariant value.delete()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 BulkOperationvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) <TDocument>
UpdateOperation<TDocument> update()Get theupdatevariant value.
-
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,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<BulkOperation.Kind,Object>
-
of
-
_serializables
- Specified by:
_serializablesin interfaceNdJsonpSerializable
-
isIndex
public boolean isIndex()Is this variant instance of kindindex? -
index
Get theindexvariant value.- Throws:
IllegalStateException- if the current variant is not of theindexkind.
-
isCreate
public boolean isCreate()Is this variant instance of kindcreate? -
create
Get thecreatevariant value.- Throws:
IllegalStateException- if the current variant is not of thecreatekind.
-
isUpdate
public boolean isUpdate()Is this variant instance of kindupdate? -
update
Get theupdatevariant value.- Throws:
IllegalStateException- if the current variant is not of theupdatekind.
-
isDelete
public boolean isDelete()Is this variant instance of kinddelete? -
delete
Get thedeletevariant value.- Throws:
IllegalStateException- if the current variant is not of thedeletekind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-