Class DeleteRequest.Builder
- java.lang.Object
-
- org.opensearch.client.util.ObjectBuilderBase
-
- org.opensearch.client.opensearch.core.DeleteRequest.Builder
-
- All Implemented Interfaces:
ObjectBuilder<DeleteRequest>
- Enclosing class:
- DeleteRequest
public static class DeleteRequest.Builder extends ObjectBuilderBase implements ObjectBuilder<DeleteRequest>
Builder forDeleteRequest.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeleteRequestbuild()Builds aDeleteRequest.DeleteRequest.Builderid(java.lang.String value)Required - The document IDDeleteRequest.BuilderifPrimaryTerm(java.lang.Long value)only perform the delete operation if the last operation that has changed the document has the specified primary termDeleteRequest.BuilderifSeqNo(java.lang.Long value)only perform the delete operation if the last operation that has changed the document has the specified sequence numberDeleteRequest.Builderindex(java.lang.String value)Required - The name of the indexDeleteRequest.Builderrefresh(Refresh value)Iftruethen refresh the affected shards to make this operation visible to search, ifwait_forthen wait for a refresh to make this operation visible to search, iffalse(the default) then do nothing with refreshes.DeleteRequest.Builderrouting(java.lang.String value)Specific routing valueDeleteRequest.Buildertimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Explicit operation timeoutDeleteRequest.Buildertimeout(Time value)Explicit operation timeoutDeleteRequest.Builderversion(java.lang.Long value)Explicit version number for concurrency controlDeleteRequest.BuilderversionType(VersionType value)Specific version typeDeleteRequest.BuilderwaitForActiveShards(java.util.function.Function<WaitForActiveShards.Builder,ObjectBuilder<WaitForActiveShards>> fn)Sets the number of shard copies that must be active before proceeding with the delete operation.DeleteRequest.BuilderwaitForActiveShards(WaitForActiveShards value)Sets the number of shard copies that must be active before proceeding with the delete operation.-
Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
-
-
-
Method Detail
-
id
public final DeleteRequest.Builder id(java.lang.String value)
Required - The document IDAPI name:
id
-
ifPrimaryTerm
public final DeleteRequest.Builder ifPrimaryTerm(@Nullable java.lang.Long value)
only perform the delete operation if the last operation that has changed the document has the specified primary termAPI name:
if_primary_term
-
ifSeqNo
public final DeleteRequest.Builder ifSeqNo(@Nullable java.lang.Long value)
only perform the delete operation if the last operation that has changed the document has the specified sequence numberAPI name:
if_seq_no
-
index
public final DeleteRequest.Builder index(java.lang.String value)
Required - The name of the indexAPI name:
index
-
refresh
public final DeleteRequest.Builder refresh(@Nullable Refresh value)
Iftruethen refresh the affected shards to make this operation visible to search, ifwait_forthen wait for a refresh to make this operation visible to search, iffalse(the default) then do nothing with refreshes.API name:
refresh
-
routing
public final DeleteRequest.Builder routing(@Nullable java.lang.String value)
Specific routing valueAPI name:
routing
-
timeout
public final DeleteRequest.Builder timeout(@Nullable Time value)
Explicit operation timeoutAPI name:
timeout
-
timeout
public final DeleteRequest.Builder timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Explicit operation timeoutAPI name:
timeout
-
version
public final DeleteRequest.Builder version(@Nullable java.lang.Long value)
Explicit version number for concurrency controlAPI name:
version
-
versionType
public final DeleteRequest.Builder versionType(@Nullable VersionType value)
Specific version typeAPI name:
version_type
-
waitForActiveShards
public final DeleteRequest.Builder waitForActiveShards(@Nullable WaitForActiveShards value)
Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set toallfor all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)API name:
wait_for_active_shards
-
waitForActiveShards
public final DeleteRequest.Builder waitForActiveShards(java.util.function.Function<WaitForActiveShards.Builder,ObjectBuilder<WaitForActiveShards>> fn)
Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set toallfor all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)API name:
wait_for_active_shards
-
build
public DeleteRequest build()
Builds aDeleteRequest.- Specified by:
buildin interfaceObjectBuilder<DeleteRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-
-