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 class
BulkOperation.Builder
static class
BulkOperation.Kind
BulkOperation
variant 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 thecreate
variant value.DeleteOperation
delete()
Get thedelete
variant value.<TDocument>
IndexOperation<TDocument>index()
Get theindex
variant value.boolean
isCreate()
Is this variant instance of kindcreate
?boolean
isDelete()
Is this variant instance of kinddelete
?boolean
isIndex()
Is this variant instance of kindindex
?boolean
isUpdate()
Is this variant instance of kindupdate
?static BulkOperation
of(java.util.function.Function<BulkOperation.Builder,ObjectBuilder<BulkOperation>> fn)
void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
<TDocument>
UpdateOperation<TDocument>update()
Get theupdate
variant value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
BulkOperation
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<BulkOperation.Kind,java.lang.Object>
- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_get
in 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:
_serializables
in interfaceNdJsonpSerializable
-
isIndex
public boolean isIndex()Is this variant instance of kindindex
? -
index
Get theindex
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theindex
kind.
-
isCreate
public boolean isCreate()Is this variant instance of kindcreate
? -
create
Get thecreate
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thecreate
kind.
-
isUpdate
public boolean isUpdate()Is this variant instance of kindupdate
? -
update
Get theupdate
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theupdate
kind.
-
isDelete
public boolean isDelete()Is this variant instance of kinddelete
? -
delete
Get thedelete
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thedelete
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-