Class WriteResponseBase

java.lang.Object
co.elastic.clients.elasticsearch._types.WriteResponseBase
All Implemented Interfaces:
JsonpSerializable
Direct Known Subclasses:
CreateResponse, DeleteResponse, IndexResponse, UpdateWriteResponseBase

public abstract class WriteResponseBase extends Object implements JsonpSerializable
See Also:
  • Constructor Details

  • Method Details

    • id

      public final String id()
      Required - The unique identifier for the added document.

      API name: _id

    • index

      public final String index()
      Required - The name of the index the document was added to.

      API name: _index

    • primaryTerm

      @Nullable public final Long primaryTerm()
      The primary term assigned to the document for the indexing operation.

      API name: _primary_term

    • result

      public final Result result()
      Required - The result of the indexing operation: created or updated.

      API name: result

    • seqNo

      @Nullable public final Long seqNo()
      The sequence number assigned to the document for the indexing operation. Sequence numbers are used to ensure an older version of a document doesn't overwrite a newer version.

      API name: _seq_no

    • shards

      public final ShardStatistics shards()
      Required - Information about the replication process of the operation.

      API name: _shards

    • version

      public final long version()
      Required - The document version, which is incremented each time the document is updated.

      API name: _version

    • forcedRefresh

      @Nullable public final Boolean forcedRefresh()
      API name: forced_refresh
    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setupWriteResponseBaseDeserializer

      protected static <BuilderT extends WriteResponseBase.AbstractBuilder<BuilderT>> void setupWriteResponseBaseDeserializer(ObjectDeserializer<BuilderT> op)