Class DeleteRequest.Builder

All Implemented Interfaces:
WithJson<DeleteRequest.Builder>, ObjectBuilder<DeleteRequest>
Enclosing class:
DeleteRequest

public static class DeleteRequest.Builder
extends RequestBase.AbstractBuilder<DeleteRequest.Builder>
implements ObjectBuilder<DeleteRequest>
Builder for DeleteRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • id

      public final DeleteRequest.Builder id​(java.lang.String value)
      Required - The document ID

      API 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 term

      API 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 number

      API name: if_seq_no

    • index

      public final DeleteRequest.Builder index​(java.lang.String value)
      Required - The name of the index

      API name: index

    • refresh

      public final DeleteRequest.Builder refresh​(@Nullable Refresh value)
      If true then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false (the default) then do nothing with refreshes.

      API name: refresh

    • routing

      public final DeleteRequest.Builder routing​(@Nullable java.lang.String value)
      Specific routing value

      API name: routing

    • timeout

      public final DeleteRequest.Builder timeout​(@Nullable Time value)
      Explicit operation timeout

      API name: timeout

    • timeout

      public final DeleteRequest.Builder timeout​(java.util.function.Function<Time.Builder,​ObjectBuilder<Time>> fn)
      Explicit operation timeout

      API name: timeout

    • version

      public final DeleteRequest.Builder version​(@Nullable java.lang.Long value)
      Explicit version number for concurrency control

      API name: version

    • versionType

      public final DeleteRequest.Builder versionType​(@Nullable VersionType value)
      Specific version type

      API 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 to all for 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 to all for 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

    • self

      protected DeleteRequest.Builder self()
      Specified by:
      self in class RequestBase.AbstractBuilder<DeleteRequest.Builder>
    • build

      public DeleteRequest build()
      Builds a DeleteRequest.
      Specified by:
      build in interface ObjectBuilder<DeleteRequest>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.