TransparencyLogEntry.java

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: sigstore_rekor.proto
// Protobuf Java Version: 4.30.2

package dev.sigstore.proto.rekor.v1;

/**
 * <pre>
 * TransparencyLogEntry captures all the details required from Rekor to
 * reconstruct an entry, given that the payload is provided via other means.
 * This type can easily be created from the existing response from Rekor.
 * Future iterations could rely on Rekor returning the minimal set of
 * attributes (excluding the payload) that are required for verifying the
 * inclusion promise. The inclusion promise (called SignedEntryTimestamp in
 * the response from Rekor) is similar to a Signed Certificate Timestamp
 * as described here https://www.rfc-editor.org/rfc/rfc6962.html#section-3.2.
 * </pre>
 *
 * Protobuf type {@code dev.sigstore.rekor.v1.TransparencyLogEntry}
 */
@javax.annotation.Generated(value="protoc", comments="annotations:TransparencyLogEntry.java.pb.meta")
public final class TransparencyLogEntry extends
    com.google.protobuf.GeneratedMessage implements
    // @@protoc_insertion_point(message_implements:dev.sigstore.rekor.v1.TransparencyLogEntry)
    TransparencyLogEntryOrBuilder {
private static final long serialVersionUID = 0L;
  static {
    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
      /* major= */ 4,
      /* minor= */ 30,
      /* patch= */ 2,
      /* suffix= */ "",
      TransparencyLogEntry.class.getName());
  }
  // Use TransparencyLogEntry.newBuilder() to construct.
  private TransparencyLogEntry(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
    super(builder);
  }
  private TransparencyLogEntry() {
    canonicalizedBody_ = com.google.protobuf.ByteString.EMPTY;
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return dev.sigstore.proto.rekor.v1.RekorProto.internal_static_dev_sigstore_rekor_v1_TransparencyLogEntry_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return dev.sigstore.proto.rekor.v1.RekorProto.internal_static_dev_sigstore_rekor_v1_TransparencyLogEntry_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            dev.sigstore.proto.rekor.v1.TransparencyLogEntry.class, dev.sigstore.proto.rekor.v1.TransparencyLogEntry.Builder.class);
  }

  private int bitField0_;
  public static final int LOG_INDEX_FIELD_NUMBER = 1;
  private long logIndex_ = 0L;
  /**
   * <pre>
   * The global index of the entry, used when querying the log by index.
   * </pre>
   *
   * <code>int64 log_index = 1 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return The logIndex.
   */
  @java.lang.Override
  public long getLogIndex() {
    return logIndex_;
  }

  public static final int LOG_ID_FIELD_NUMBER = 2;
  private dev.sigstore.proto.common.v1.LogId logId_;
  /**
   * <pre>
   * The unique identifier of the log.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return Whether the logId field is set.
   */
  @java.lang.Override
  public boolean hasLogId() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * <pre>
   * The unique identifier of the log.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return The logId.
   */
  @java.lang.Override
  public dev.sigstore.proto.common.v1.LogId getLogId() {
    return logId_ == null ? dev.sigstore.proto.common.v1.LogId.getDefaultInstance() : logId_;
  }
  /**
   * <pre>
   * The unique identifier of the log.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
   */
  @java.lang.Override
  public dev.sigstore.proto.common.v1.LogIdOrBuilder getLogIdOrBuilder() {
    return logId_ == null ? dev.sigstore.proto.common.v1.LogId.getDefaultInstance() : logId_;
  }

  public static final int KIND_VERSION_FIELD_NUMBER = 3;
  private dev.sigstore.proto.rekor.v1.KindVersion kindVersion_;
  /**
   * <pre>
   * The kind (type) and version of the object associated with this
   * entry. These values are required to construct the entry during
   * verification.
   * </pre>
   *
   * <code>.dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return Whether the kindVersion field is set.
   */
  @java.lang.Override
  public boolean hasKindVersion() {
    return ((bitField0_ & 0x00000002) != 0);
  }
  /**
   * <pre>
   * The kind (type) and version of the object associated with this
   * entry. These values are required to construct the entry during
   * verification.
   * </pre>
   *
   * <code>.dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return The kindVersion.
   */
  @java.lang.Override
  public dev.sigstore.proto.rekor.v1.KindVersion getKindVersion() {
    return kindVersion_ == null ? dev.sigstore.proto.rekor.v1.KindVersion.getDefaultInstance() : kindVersion_;
  }
  /**
   * <pre>
   * The kind (type) and version of the object associated with this
   * entry. These values are required to construct the entry during
   * verification.
   * </pre>
   *
   * <code>.dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
   */
  @java.lang.Override
  public dev.sigstore.proto.rekor.v1.KindVersionOrBuilder getKindVersionOrBuilder() {
    return kindVersion_ == null ? dev.sigstore.proto.rekor.v1.KindVersion.getDefaultInstance() : kindVersion_;
  }

  public static final int INTEGRATED_TIME_FIELD_NUMBER = 4;
  private long integratedTime_ = 0L;
  /**
   * <pre>
   * The UNIX timestamp from the log when the entry was persisted.
   * The integration time MUST NOT be trusted if inclusion_promise
   * is omitted.
   * </pre>
   *
   * <code>int64 integrated_time = 4 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return The integratedTime.
   */
  @java.lang.Override
  public long getIntegratedTime() {
    return integratedTime_;
  }

  public static final int INCLUSION_PROMISE_FIELD_NUMBER = 5;
  private dev.sigstore.proto.rekor.v1.InclusionPromise inclusionPromise_;
  /**
   * <pre>
   * The inclusion promise/signed entry timestamp from the log.
   * Required for v0.1 bundles, and MUST be verified.
   * Optional for &gt;= v0.2 bundles if another suitable source of
   * time is present (such as another source of signed time,
   * or the current system time for long-lived certificates).
   * MUST be verified if no other suitable source of time is present,
   * and SHOULD be verified otherwise.
   * </pre>
   *
   * <code>.dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;</code>
   * @return Whether the inclusionPromise field is set.
   */
  @java.lang.Override
  public boolean hasInclusionPromise() {
    return ((bitField0_ & 0x00000004) != 0);
  }
  /**
   * <pre>
   * The inclusion promise/signed entry timestamp from the log.
   * Required for v0.1 bundles, and MUST be verified.
   * Optional for &gt;= v0.2 bundles if another suitable source of
   * time is present (such as another source of signed time,
   * or the current system time for long-lived certificates).
   * MUST be verified if no other suitable source of time is present,
   * and SHOULD be verified otherwise.
   * </pre>
   *
   * <code>.dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;</code>
   * @return The inclusionPromise.
   */
  @java.lang.Override
  public dev.sigstore.proto.rekor.v1.InclusionPromise getInclusionPromise() {
    return inclusionPromise_ == null ? dev.sigstore.proto.rekor.v1.InclusionPromise.getDefaultInstance() : inclusionPromise_;
  }
  /**
   * <pre>
   * The inclusion promise/signed entry timestamp from the log.
   * Required for v0.1 bundles, and MUST be verified.
   * Optional for &gt;= v0.2 bundles if another suitable source of
   * time is present (such as another source of signed time,
   * or the current system time for long-lived certificates).
   * MUST be verified if no other suitable source of time is present,
   * and SHOULD be verified otherwise.
   * </pre>
   *
   * <code>.dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;</code>
   */
  @java.lang.Override
  public dev.sigstore.proto.rekor.v1.InclusionPromiseOrBuilder getInclusionPromiseOrBuilder() {
    return inclusionPromise_ == null ? dev.sigstore.proto.rekor.v1.InclusionPromise.getDefaultInstance() : inclusionPromise_;
  }

  public static final int INCLUSION_PROOF_FIELD_NUMBER = 6;
  private dev.sigstore.proto.rekor.v1.InclusionProof inclusionProof_;
  /**
   * <pre>
   * The inclusion proof can be used for offline or online verification
   * that the entry was appended to the log, and that the log has not been
   * altered.
   * </pre>
   *
   * <code>.dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return Whether the inclusionProof field is set.
   */
  @java.lang.Override
  public boolean hasInclusionProof() {
    return ((bitField0_ & 0x00000008) != 0);
  }
  /**
   * <pre>
   * The inclusion proof can be used for offline or online verification
   * that the entry was appended to the log, and that the log has not been
   * altered.
   * </pre>
   *
   * <code>.dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return The inclusionProof.
   */
  @java.lang.Override
  public dev.sigstore.proto.rekor.v1.InclusionProof getInclusionProof() {
    return inclusionProof_ == null ? dev.sigstore.proto.rekor.v1.InclusionProof.getDefaultInstance() : inclusionProof_;
  }
  /**
   * <pre>
   * The inclusion proof can be used for offline or online verification
   * that the entry was appended to the log, and that the log has not been
   * altered.
   * </pre>
   *
   * <code>.dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];</code>
   */
  @java.lang.Override
  public dev.sigstore.proto.rekor.v1.InclusionProofOrBuilder getInclusionProofOrBuilder() {
    return inclusionProof_ == null ? dev.sigstore.proto.rekor.v1.InclusionProof.getDefaultInstance() : inclusionProof_;
  }

  public static final int CANONICALIZED_BODY_FIELD_NUMBER = 7;
  private com.google.protobuf.ByteString canonicalizedBody_ = com.google.protobuf.ByteString.EMPTY;
  /**
   * <pre>
   * Optional. The canonicalized transparency log entry, used to
   * reconstruct the Signed Entry Timestamp (SET) during verification.
   * The contents of this field are the same as the `body` field in
   * a Rekor response, meaning that it does **not** include the "full"
   * canonicalized form (of log index, ID, etc.) which are
   * exposed as separate fields. The verifier is responsible for
   * combining the `canonicalized_body`, `log_index`, `log_id`,
   * and `integrated_time` into the payload that the SET's signature
   * is generated over.
   * This field is intended to be used in cases where the SET cannot be
   * produced determinisitically (e.g. inconsistent JSON field ordering,
   * differing whitespace, etc).
   *
   * If set, clients MUST verify that the signature referenced in the
   * `canonicalized_body` matches the signature provided in the
   * `Bundle.content`.
   * If not set, clients are responsible for constructing an equivalent
   * payload from other sources to verify the signature.
   * </pre>
   *
   * <code>bytes canonicalized_body = 7;</code>
   * @return The canonicalizedBody.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getCanonicalizedBody() {
    return canonicalizedBody_;
  }

  private byte memoizedIsInitialized = -1;
  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (logIndex_ != 0L) {
      output.writeInt64(1, logIndex_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(2, getLogId());
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      output.writeMessage(3, getKindVersion());
    }
    if (integratedTime_ != 0L) {
      output.writeInt64(4, integratedTime_);
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      output.writeMessage(5, getInclusionPromise());
    }
    if (((bitField0_ & 0x00000008) != 0)) {
      output.writeMessage(6, getInclusionProof());
    }
    if (!canonicalizedBody_.isEmpty()) {
      output.writeBytes(7, canonicalizedBody_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (logIndex_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(1, logIndex_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getLogId());
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getKindVersion());
    }
    if (integratedTime_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(4, integratedTime_);
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, getInclusionPromise());
    }
    if (((bitField0_ & 0x00000008) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(6, getInclusionProof());
    }
    if (!canonicalizedBody_.isEmpty()) {
      size += com.google.protobuf.CodedOutputStream
        .computeBytesSize(7, canonicalizedBody_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof dev.sigstore.proto.rekor.v1.TransparencyLogEntry)) {
      return super.equals(obj);
    }
    dev.sigstore.proto.rekor.v1.TransparencyLogEntry other = (dev.sigstore.proto.rekor.v1.TransparencyLogEntry) obj;

    if (getLogIndex()
        != other.getLogIndex()) return false;
    if (hasLogId() != other.hasLogId()) return false;
    if (hasLogId()) {
      if (!getLogId()
          .equals(other.getLogId())) return false;
    }
    if (hasKindVersion() != other.hasKindVersion()) return false;
    if (hasKindVersion()) {
      if (!getKindVersion()
          .equals(other.getKindVersion())) return false;
    }
    if (getIntegratedTime()
        != other.getIntegratedTime()) return false;
    if (hasInclusionPromise() != other.hasInclusionPromise()) return false;
    if (hasInclusionPromise()) {
      if (!getInclusionPromise()
          .equals(other.getInclusionPromise())) return false;
    }
    if (hasInclusionProof() != other.hasInclusionProof()) return false;
    if (hasInclusionProof()) {
      if (!getInclusionProof()
          .equals(other.getInclusionProof())) return false;
    }
    if (!getCanonicalizedBody()
        .equals(other.getCanonicalizedBody())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + LOG_INDEX_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getLogIndex());
    if (hasLogId()) {
      hash = (37 * hash) + LOG_ID_FIELD_NUMBER;
      hash = (53 * hash) + getLogId().hashCode();
    }
    if (hasKindVersion()) {
      hash = (37 * hash) + KIND_VERSION_FIELD_NUMBER;
      hash = (53 * hash) + getKindVersion().hashCode();
    }
    hash = (37 * hash) + INTEGRATED_TIME_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getIntegratedTime());
    if (hasInclusionPromise()) {
      hash = (37 * hash) + INCLUSION_PROMISE_FIELD_NUMBER;
      hash = (53 * hash) + getInclusionPromise().hashCode();
    }
    if (hasInclusionProof()) {
      hash = (37 * hash) + INCLUSION_PROOF_FIELD_NUMBER;
      hash = (53 * hash) + getInclusionProof().hashCode();
    }
    hash = (37 * hash) + CANONICALIZED_BODY_FIELD_NUMBER;
    hash = (53 * hash) + getCanonicalizedBody().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static dev.sigstore.proto.rekor.v1.TransparencyLogEntry parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static dev.sigstore.proto.rekor.v1.TransparencyLogEntry parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static dev.sigstore.proto.rekor.v1.TransparencyLogEntry parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static dev.sigstore.proto.rekor.v1.TransparencyLogEntry parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static dev.sigstore.proto.rekor.v1.TransparencyLogEntry parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static dev.sigstore.proto.rekor.v1.TransparencyLogEntry parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static dev.sigstore.proto.rekor.v1.TransparencyLogEntry parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static dev.sigstore.proto.rekor.v1.TransparencyLogEntry parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static dev.sigstore.proto.rekor.v1.TransparencyLogEntry parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static dev.sigstore.proto.rekor.v1.TransparencyLogEntry parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static dev.sigstore.proto.rekor.v1.TransparencyLogEntry parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static dev.sigstore.proto.rekor.v1.TransparencyLogEntry parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(dev.sigstore.proto.rekor.v1.TransparencyLogEntry prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   * TransparencyLogEntry captures all the details required from Rekor to
   * reconstruct an entry, given that the payload is provided via other means.
   * This type can easily be created from the existing response from Rekor.
   * Future iterations could rely on Rekor returning the minimal set of
   * attributes (excluding the payload) that are required for verifying the
   * inclusion promise. The inclusion promise (called SignedEntryTimestamp in
   * the response from Rekor) is similar to a Signed Certificate Timestamp
   * as described here https://www.rfc-editor.org/rfc/rfc6962.html#section-3.2.
   * </pre>
   *
   * Protobuf type {@code dev.sigstore.rekor.v1.TransparencyLogEntry}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessage.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:dev.sigstore.rekor.v1.TransparencyLogEntry)
      dev.sigstore.proto.rekor.v1.TransparencyLogEntryOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return dev.sigstore.proto.rekor.v1.RekorProto.internal_static_dev_sigstore_rekor_v1_TransparencyLogEntry_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return dev.sigstore.proto.rekor.v1.RekorProto.internal_static_dev_sigstore_rekor_v1_TransparencyLogEntry_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              dev.sigstore.proto.rekor.v1.TransparencyLogEntry.class, dev.sigstore.proto.rekor.v1.TransparencyLogEntry.Builder.class);
    }

    // Construct using dev.sigstore.proto.rekor.v1.TransparencyLogEntry.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessage
              .alwaysUseFieldBuilders) {
        internalGetLogIdFieldBuilder();
        internalGetKindVersionFieldBuilder();
        internalGetInclusionPromiseFieldBuilder();
        internalGetInclusionProofFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      logIndex_ = 0L;
      logId_ = null;
      if (logIdBuilder_ != null) {
        logIdBuilder_.dispose();
        logIdBuilder_ = null;
      }
      kindVersion_ = null;
      if (kindVersionBuilder_ != null) {
        kindVersionBuilder_.dispose();
        kindVersionBuilder_ = null;
      }
      integratedTime_ = 0L;
      inclusionPromise_ = null;
      if (inclusionPromiseBuilder_ != null) {
        inclusionPromiseBuilder_.dispose();
        inclusionPromiseBuilder_ = null;
      }
      inclusionProof_ = null;
      if (inclusionProofBuilder_ != null) {
        inclusionProofBuilder_.dispose();
        inclusionProofBuilder_ = null;
      }
      canonicalizedBody_ = com.google.protobuf.ByteString.EMPTY;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return dev.sigstore.proto.rekor.v1.RekorProto.internal_static_dev_sigstore_rekor_v1_TransparencyLogEntry_descriptor;
    }

    @java.lang.Override
    public dev.sigstore.proto.rekor.v1.TransparencyLogEntry getDefaultInstanceForType() {
      return dev.sigstore.proto.rekor.v1.TransparencyLogEntry.getDefaultInstance();
    }

    @java.lang.Override
    public dev.sigstore.proto.rekor.v1.TransparencyLogEntry build() {
      dev.sigstore.proto.rekor.v1.TransparencyLogEntry result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public dev.sigstore.proto.rekor.v1.TransparencyLogEntry buildPartial() {
      dev.sigstore.proto.rekor.v1.TransparencyLogEntry result = new dev.sigstore.proto.rekor.v1.TransparencyLogEntry(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(dev.sigstore.proto.rekor.v1.TransparencyLogEntry result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.logIndex_ = logIndex_;
      }
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.logId_ = logIdBuilder_ == null
            ? logId_
            : logIdBuilder_.build();
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.kindVersion_ = kindVersionBuilder_ == null
            ? kindVersion_
            : kindVersionBuilder_.build();
        to_bitField0_ |= 0x00000002;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.integratedTime_ = integratedTime_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.inclusionPromise_ = inclusionPromiseBuilder_ == null
            ? inclusionPromise_
            : inclusionPromiseBuilder_.build();
        to_bitField0_ |= 0x00000004;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.inclusionProof_ = inclusionProofBuilder_ == null
            ? inclusionProof_
            : inclusionProofBuilder_.build();
        to_bitField0_ |= 0x00000008;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.canonicalizedBody_ = canonicalizedBody_;
      }
      result.bitField0_ |= to_bitField0_;
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof dev.sigstore.proto.rekor.v1.TransparencyLogEntry) {
        return mergeFrom((dev.sigstore.proto.rekor.v1.TransparencyLogEntry)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(dev.sigstore.proto.rekor.v1.TransparencyLogEntry other) {
      if (other == dev.sigstore.proto.rekor.v1.TransparencyLogEntry.getDefaultInstance()) return this;
      if (other.getLogIndex() != 0L) {
        setLogIndex(other.getLogIndex());
      }
      if (other.hasLogId()) {
        mergeLogId(other.getLogId());
      }
      if (other.hasKindVersion()) {
        mergeKindVersion(other.getKindVersion());
      }
      if (other.getIntegratedTime() != 0L) {
        setIntegratedTime(other.getIntegratedTime());
      }
      if (other.hasInclusionPromise()) {
        mergeInclusionPromise(other.getInclusionPromise());
      }
      if (other.hasInclusionProof()) {
        mergeInclusionProof(other.getInclusionProof());
      }
      if (!other.getCanonicalizedBody().isEmpty()) {
        setCanonicalizedBody(other.getCanonicalizedBody());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              logIndex_ = input.readInt64();
              bitField0_ |= 0x00000001;
              break;
            } // case 8
            case 18: {
              input.readMessage(
                  internalGetLogIdFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000002;
              break;
            } // case 18
            case 26: {
              input.readMessage(
                  internalGetKindVersionFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000004;
              break;
            } // case 26
            case 32: {
              integratedTime_ = input.readInt64();
              bitField0_ |= 0x00000008;
              break;
            } // case 32
            case 42: {
              input.readMessage(
                  internalGetInclusionPromiseFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000010;
              break;
            } // case 42
            case 50: {
              input.readMessage(
                  internalGetInclusionProofFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000020;
              break;
            } // case 50
            case 58: {
              canonicalizedBody_ = input.readBytes();
              bitField0_ |= 0x00000040;
              break;
            } // case 58
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private long logIndex_ ;
    /**
     * <pre>
     * The global index of the entry, used when querying the log by index.
     * </pre>
     *
     * <code>int64 log_index = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return The logIndex.
     */
    @java.lang.Override
    public long getLogIndex() {
      return logIndex_;
    }
    /**
     * <pre>
     * The global index of the entry, used when querying the log by index.
     * </pre>
     *
     * <code>int64 log_index = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param value The logIndex to set.
     * @return This builder for chaining.
     */
    public Builder setLogIndex(long value) {

      logIndex_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The global index of the entry, used when querying the log by index.
     * </pre>
     *
     * <code>int64 log_index = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return This builder for chaining.
     */
    public Builder clearLogIndex() {
      bitField0_ = (bitField0_ & ~0x00000001);
      logIndex_ = 0L;
      onChanged();
      return this;
    }

    private dev.sigstore.proto.common.v1.LogId logId_;
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.common.v1.LogId, dev.sigstore.proto.common.v1.LogId.Builder, dev.sigstore.proto.common.v1.LogIdOrBuilder> logIdBuilder_;
    /**
     * <pre>
     * The unique identifier of the log.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return Whether the logId field is set.
     */
    public boolean hasLogId() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <pre>
     * The unique identifier of the log.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return The logId.
     */
    public dev.sigstore.proto.common.v1.LogId getLogId() {
      if (logIdBuilder_ == null) {
        return logId_ == null ? dev.sigstore.proto.common.v1.LogId.getDefaultInstance() : logId_;
      } else {
        return logIdBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The unique identifier of the log.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder setLogId(dev.sigstore.proto.common.v1.LogId value) {
      if (logIdBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        logId_ = value;
      } else {
        logIdBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The unique identifier of the log.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder setLogId(
        dev.sigstore.proto.common.v1.LogId.Builder builderForValue) {
      if (logIdBuilder_ == null) {
        logId_ = builderForValue.build();
      } else {
        logIdBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The unique identifier of the log.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder mergeLogId(dev.sigstore.proto.common.v1.LogId value) {
      if (logIdBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0) &&
          logId_ != null &&
          logId_ != dev.sigstore.proto.common.v1.LogId.getDefaultInstance()) {
          getLogIdBuilder().mergeFrom(value);
        } else {
          logId_ = value;
        }
      } else {
        logIdBuilder_.mergeFrom(value);
      }
      if (logId_ != null) {
        bitField0_ |= 0x00000002;
        onChanged();
      }
      return this;
    }
    /**
     * <pre>
     * The unique identifier of the log.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder clearLogId() {
      bitField0_ = (bitField0_ & ~0x00000002);
      logId_ = null;
      if (logIdBuilder_ != null) {
        logIdBuilder_.dispose();
        logIdBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The unique identifier of the log.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public dev.sigstore.proto.common.v1.LogId.Builder getLogIdBuilder() {
      bitField0_ |= 0x00000002;
      onChanged();
      return internalGetLogIdFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The unique identifier of the log.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public dev.sigstore.proto.common.v1.LogIdOrBuilder getLogIdOrBuilder() {
      if (logIdBuilder_ != null) {
        return logIdBuilder_.getMessageOrBuilder();
      } else {
        return logId_ == null ?
            dev.sigstore.proto.common.v1.LogId.getDefaultInstance() : logId_;
      }
    }
    /**
     * <pre>
     * The unique identifier of the log.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.LogId log_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.common.v1.LogId, dev.sigstore.proto.common.v1.LogId.Builder, dev.sigstore.proto.common.v1.LogIdOrBuilder> 
        internalGetLogIdFieldBuilder() {
      if (logIdBuilder_ == null) {
        logIdBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            dev.sigstore.proto.common.v1.LogId, dev.sigstore.proto.common.v1.LogId.Builder, dev.sigstore.proto.common.v1.LogIdOrBuilder>(
                getLogId(),
                getParentForChildren(),
                isClean());
        logId_ = null;
      }
      return logIdBuilder_;
    }

    private dev.sigstore.proto.rekor.v1.KindVersion kindVersion_;
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.rekor.v1.KindVersion, dev.sigstore.proto.rekor.v1.KindVersion.Builder, dev.sigstore.proto.rekor.v1.KindVersionOrBuilder> kindVersionBuilder_;
    /**
     * <pre>
     * The kind (type) and version of the object associated with this
     * entry. These values are required to construct the entry during
     * verification.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return Whether the kindVersion field is set.
     */
    public boolean hasKindVersion() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     * <pre>
     * The kind (type) and version of the object associated with this
     * entry. These values are required to construct the entry during
     * verification.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return The kindVersion.
     */
    public dev.sigstore.proto.rekor.v1.KindVersion getKindVersion() {
      if (kindVersionBuilder_ == null) {
        return kindVersion_ == null ? dev.sigstore.proto.rekor.v1.KindVersion.getDefaultInstance() : kindVersion_;
      } else {
        return kindVersionBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The kind (type) and version of the object associated with this
     * entry. These values are required to construct the entry during
     * verification.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder setKindVersion(dev.sigstore.proto.rekor.v1.KindVersion value) {
      if (kindVersionBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        kindVersion_ = value;
      } else {
        kindVersionBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The kind (type) and version of the object associated with this
     * entry. These values are required to construct the entry during
     * verification.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder setKindVersion(
        dev.sigstore.proto.rekor.v1.KindVersion.Builder builderForValue) {
      if (kindVersionBuilder_ == null) {
        kindVersion_ = builderForValue.build();
      } else {
        kindVersionBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The kind (type) and version of the object associated with this
     * entry. These values are required to construct the entry during
     * verification.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder mergeKindVersion(dev.sigstore.proto.rekor.v1.KindVersion value) {
      if (kindVersionBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0) &&
          kindVersion_ != null &&
          kindVersion_ != dev.sigstore.proto.rekor.v1.KindVersion.getDefaultInstance()) {
          getKindVersionBuilder().mergeFrom(value);
        } else {
          kindVersion_ = value;
        }
      } else {
        kindVersionBuilder_.mergeFrom(value);
      }
      if (kindVersion_ != null) {
        bitField0_ |= 0x00000004;
        onChanged();
      }
      return this;
    }
    /**
     * <pre>
     * The kind (type) and version of the object associated with this
     * entry. These values are required to construct the entry during
     * verification.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder clearKindVersion() {
      bitField0_ = (bitField0_ & ~0x00000004);
      kindVersion_ = null;
      if (kindVersionBuilder_ != null) {
        kindVersionBuilder_.dispose();
        kindVersionBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The kind (type) and version of the object associated with this
     * entry. These values are required to construct the entry during
     * verification.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public dev.sigstore.proto.rekor.v1.KindVersion.Builder getKindVersionBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return internalGetKindVersionFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The kind (type) and version of the object associated with this
     * entry. These values are required to construct the entry during
     * verification.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public dev.sigstore.proto.rekor.v1.KindVersionOrBuilder getKindVersionOrBuilder() {
      if (kindVersionBuilder_ != null) {
        return kindVersionBuilder_.getMessageOrBuilder();
      } else {
        return kindVersion_ == null ?
            dev.sigstore.proto.rekor.v1.KindVersion.getDefaultInstance() : kindVersion_;
      }
    }
    /**
     * <pre>
     * The kind (type) and version of the object associated with this
     * entry. These values are required to construct the entry during
     * verification.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.KindVersion kind_version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.rekor.v1.KindVersion, dev.sigstore.proto.rekor.v1.KindVersion.Builder, dev.sigstore.proto.rekor.v1.KindVersionOrBuilder> 
        internalGetKindVersionFieldBuilder() {
      if (kindVersionBuilder_ == null) {
        kindVersionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            dev.sigstore.proto.rekor.v1.KindVersion, dev.sigstore.proto.rekor.v1.KindVersion.Builder, dev.sigstore.proto.rekor.v1.KindVersionOrBuilder>(
                getKindVersion(),
                getParentForChildren(),
                isClean());
        kindVersion_ = null;
      }
      return kindVersionBuilder_;
    }

    private long integratedTime_ ;
    /**
     * <pre>
     * The UNIX timestamp from the log when the entry was persisted.
     * The integration time MUST NOT be trusted if inclusion_promise
     * is omitted.
     * </pre>
     *
     * <code>int64 integrated_time = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return The integratedTime.
     */
    @java.lang.Override
    public long getIntegratedTime() {
      return integratedTime_;
    }
    /**
     * <pre>
     * The UNIX timestamp from the log when the entry was persisted.
     * The integration time MUST NOT be trusted if inclusion_promise
     * is omitted.
     * </pre>
     *
     * <code>int64 integrated_time = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param value The integratedTime to set.
     * @return This builder for chaining.
     */
    public Builder setIntegratedTime(long value) {

      integratedTime_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The UNIX timestamp from the log when the entry was persisted.
     * The integration time MUST NOT be trusted if inclusion_promise
     * is omitted.
     * </pre>
     *
     * <code>int64 integrated_time = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return This builder for chaining.
     */
    public Builder clearIntegratedTime() {
      bitField0_ = (bitField0_ & ~0x00000008);
      integratedTime_ = 0L;
      onChanged();
      return this;
    }

    private dev.sigstore.proto.rekor.v1.InclusionPromise inclusionPromise_;
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.rekor.v1.InclusionPromise, dev.sigstore.proto.rekor.v1.InclusionPromise.Builder, dev.sigstore.proto.rekor.v1.InclusionPromiseOrBuilder> inclusionPromiseBuilder_;
    /**
     * <pre>
     * The inclusion promise/signed entry timestamp from the log.
     * Required for v0.1 bundles, and MUST be verified.
     * Optional for &gt;= v0.2 bundles if another suitable source of
     * time is present (such as another source of signed time,
     * or the current system time for long-lived certificates).
     * MUST be verified if no other suitable source of time is present,
     * and SHOULD be verified otherwise.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;</code>
     * @return Whether the inclusionPromise field is set.
     */
    public boolean hasInclusionPromise() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     * <pre>
     * The inclusion promise/signed entry timestamp from the log.
     * Required for v0.1 bundles, and MUST be verified.
     * Optional for &gt;= v0.2 bundles if another suitable source of
     * time is present (such as another source of signed time,
     * or the current system time for long-lived certificates).
     * MUST be verified if no other suitable source of time is present,
     * and SHOULD be verified otherwise.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;</code>
     * @return The inclusionPromise.
     */
    public dev.sigstore.proto.rekor.v1.InclusionPromise getInclusionPromise() {
      if (inclusionPromiseBuilder_ == null) {
        return inclusionPromise_ == null ? dev.sigstore.proto.rekor.v1.InclusionPromise.getDefaultInstance() : inclusionPromise_;
      } else {
        return inclusionPromiseBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The inclusion promise/signed entry timestamp from the log.
     * Required for v0.1 bundles, and MUST be verified.
     * Optional for &gt;= v0.2 bundles if another suitable source of
     * time is present (such as another source of signed time,
     * or the current system time for long-lived certificates).
     * MUST be verified if no other suitable source of time is present,
     * and SHOULD be verified otherwise.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;</code>
     */
    public Builder setInclusionPromise(dev.sigstore.proto.rekor.v1.InclusionPromise value) {
      if (inclusionPromiseBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        inclusionPromise_ = value;
      } else {
        inclusionPromiseBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The inclusion promise/signed entry timestamp from the log.
     * Required for v0.1 bundles, and MUST be verified.
     * Optional for &gt;= v0.2 bundles if another suitable source of
     * time is present (such as another source of signed time,
     * or the current system time for long-lived certificates).
     * MUST be verified if no other suitable source of time is present,
     * and SHOULD be verified otherwise.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;</code>
     */
    public Builder setInclusionPromise(
        dev.sigstore.proto.rekor.v1.InclusionPromise.Builder builderForValue) {
      if (inclusionPromiseBuilder_ == null) {
        inclusionPromise_ = builderForValue.build();
      } else {
        inclusionPromiseBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The inclusion promise/signed entry timestamp from the log.
     * Required for v0.1 bundles, and MUST be verified.
     * Optional for &gt;= v0.2 bundles if another suitable source of
     * time is present (such as another source of signed time,
     * or the current system time for long-lived certificates).
     * MUST be verified if no other suitable source of time is present,
     * and SHOULD be verified otherwise.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;</code>
     */
    public Builder mergeInclusionPromise(dev.sigstore.proto.rekor.v1.InclusionPromise value) {
      if (inclusionPromiseBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0) &&
          inclusionPromise_ != null &&
          inclusionPromise_ != dev.sigstore.proto.rekor.v1.InclusionPromise.getDefaultInstance()) {
          getInclusionPromiseBuilder().mergeFrom(value);
        } else {
          inclusionPromise_ = value;
        }
      } else {
        inclusionPromiseBuilder_.mergeFrom(value);
      }
      if (inclusionPromise_ != null) {
        bitField0_ |= 0x00000010;
        onChanged();
      }
      return this;
    }
    /**
     * <pre>
     * The inclusion promise/signed entry timestamp from the log.
     * Required for v0.1 bundles, and MUST be verified.
     * Optional for &gt;= v0.2 bundles if another suitable source of
     * time is present (such as another source of signed time,
     * or the current system time for long-lived certificates).
     * MUST be verified if no other suitable source of time is present,
     * and SHOULD be verified otherwise.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;</code>
     */
    public Builder clearInclusionPromise() {
      bitField0_ = (bitField0_ & ~0x00000010);
      inclusionPromise_ = null;
      if (inclusionPromiseBuilder_ != null) {
        inclusionPromiseBuilder_.dispose();
        inclusionPromiseBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The inclusion promise/signed entry timestamp from the log.
     * Required for v0.1 bundles, and MUST be verified.
     * Optional for &gt;= v0.2 bundles if another suitable source of
     * time is present (such as another source of signed time,
     * or the current system time for long-lived certificates).
     * MUST be verified if no other suitable source of time is present,
     * and SHOULD be verified otherwise.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;</code>
     */
    public dev.sigstore.proto.rekor.v1.InclusionPromise.Builder getInclusionPromiseBuilder() {
      bitField0_ |= 0x00000010;
      onChanged();
      return internalGetInclusionPromiseFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The inclusion promise/signed entry timestamp from the log.
     * Required for v0.1 bundles, and MUST be verified.
     * Optional for &gt;= v0.2 bundles if another suitable source of
     * time is present (such as another source of signed time,
     * or the current system time for long-lived certificates).
     * MUST be verified if no other suitable source of time is present,
     * and SHOULD be verified otherwise.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;</code>
     */
    public dev.sigstore.proto.rekor.v1.InclusionPromiseOrBuilder getInclusionPromiseOrBuilder() {
      if (inclusionPromiseBuilder_ != null) {
        return inclusionPromiseBuilder_.getMessageOrBuilder();
      } else {
        return inclusionPromise_ == null ?
            dev.sigstore.proto.rekor.v1.InclusionPromise.getDefaultInstance() : inclusionPromise_;
      }
    }
    /**
     * <pre>
     * The inclusion promise/signed entry timestamp from the log.
     * Required for v0.1 bundles, and MUST be verified.
     * Optional for &gt;= v0.2 bundles if another suitable source of
     * time is present (such as another source of signed time,
     * or the current system time for long-lived certificates).
     * MUST be verified if no other suitable source of time is present,
     * and SHOULD be verified otherwise.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionPromise inclusion_promise = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.rekor.v1.InclusionPromise, dev.sigstore.proto.rekor.v1.InclusionPromise.Builder, dev.sigstore.proto.rekor.v1.InclusionPromiseOrBuilder> 
        internalGetInclusionPromiseFieldBuilder() {
      if (inclusionPromiseBuilder_ == null) {
        inclusionPromiseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            dev.sigstore.proto.rekor.v1.InclusionPromise, dev.sigstore.proto.rekor.v1.InclusionPromise.Builder, dev.sigstore.proto.rekor.v1.InclusionPromiseOrBuilder>(
                getInclusionPromise(),
                getParentForChildren(),
                isClean());
        inclusionPromise_ = null;
      }
      return inclusionPromiseBuilder_;
    }

    private dev.sigstore.proto.rekor.v1.InclusionProof inclusionProof_;
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.rekor.v1.InclusionProof, dev.sigstore.proto.rekor.v1.InclusionProof.Builder, dev.sigstore.proto.rekor.v1.InclusionProofOrBuilder> inclusionProofBuilder_;
    /**
     * <pre>
     * The inclusion proof can be used for offline or online verification
     * that the entry was appended to the log, and that the log has not been
     * altered.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return Whether the inclusionProof field is set.
     */
    public boolean hasInclusionProof() {
      return ((bitField0_ & 0x00000020) != 0);
    }
    /**
     * <pre>
     * The inclusion proof can be used for offline or online verification
     * that the entry was appended to the log, and that the log has not been
     * altered.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return The inclusionProof.
     */
    public dev.sigstore.proto.rekor.v1.InclusionProof getInclusionProof() {
      if (inclusionProofBuilder_ == null) {
        return inclusionProof_ == null ? dev.sigstore.proto.rekor.v1.InclusionProof.getDefaultInstance() : inclusionProof_;
      } else {
        return inclusionProofBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The inclusion proof can be used for offline or online verification
     * that the entry was appended to the log, and that the log has not been
     * altered.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder setInclusionProof(dev.sigstore.proto.rekor.v1.InclusionProof value) {
      if (inclusionProofBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        inclusionProof_ = value;
      } else {
        inclusionProofBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The inclusion proof can be used for offline or online verification
     * that the entry was appended to the log, and that the log has not been
     * altered.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder setInclusionProof(
        dev.sigstore.proto.rekor.v1.InclusionProof.Builder builderForValue) {
      if (inclusionProofBuilder_ == null) {
        inclusionProof_ = builderForValue.build();
      } else {
        inclusionProofBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The inclusion proof can be used for offline or online verification
     * that the entry was appended to the log, and that the log has not been
     * altered.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder mergeInclusionProof(dev.sigstore.proto.rekor.v1.InclusionProof value) {
      if (inclusionProofBuilder_ == null) {
        if (((bitField0_ & 0x00000020) != 0) &&
          inclusionProof_ != null &&
          inclusionProof_ != dev.sigstore.proto.rekor.v1.InclusionProof.getDefaultInstance()) {
          getInclusionProofBuilder().mergeFrom(value);
        } else {
          inclusionProof_ = value;
        }
      } else {
        inclusionProofBuilder_.mergeFrom(value);
      }
      if (inclusionProof_ != null) {
        bitField0_ |= 0x00000020;
        onChanged();
      }
      return this;
    }
    /**
     * <pre>
     * The inclusion proof can be used for offline or online verification
     * that the entry was appended to the log, and that the log has not been
     * altered.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder clearInclusionProof() {
      bitField0_ = (bitField0_ & ~0x00000020);
      inclusionProof_ = null;
      if (inclusionProofBuilder_ != null) {
        inclusionProofBuilder_.dispose();
        inclusionProofBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The inclusion proof can be used for offline or online verification
     * that the entry was appended to the log, and that the log has not been
     * altered.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public dev.sigstore.proto.rekor.v1.InclusionProof.Builder getInclusionProofBuilder() {
      bitField0_ |= 0x00000020;
      onChanged();
      return internalGetInclusionProofFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The inclusion proof can be used for offline or online verification
     * that the entry was appended to the log, and that the log has not been
     * altered.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public dev.sigstore.proto.rekor.v1.InclusionProofOrBuilder getInclusionProofOrBuilder() {
      if (inclusionProofBuilder_ != null) {
        return inclusionProofBuilder_.getMessageOrBuilder();
      } else {
        return inclusionProof_ == null ?
            dev.sigstore.proto.rekor.v1.InclusionProof.getDefaultInstance() : inclusionProof_;
      }
    }
    /**
     * <pre>
     * The inclusion proof can be used for offline or online verification
     * that the entry was appended to the log, and that the log has not been
     * altered.
     * </pre>
     *
     * <code>.dev.sigstore.rekor.v1.InclusionProof inclusion_proof = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.rekor.v1.InclusionProof, dev.sigstore.proto.rekor.v1.InclusionProof.Builder, dev.sigstore.proto.rekor.v1.InclusionProofOrBuilder> 
        internalGetInclusionProofFieldBuilder() {
      if (inclusionProofBuilder_ == null) {
        inclusionProofBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            dev.sigstore.proto.rekor.v1.InclusionProof, dev.sigstore.proto.rekor.v1.InclusionProof.Builder, dev.sigstore.proto.rekor.v1.InclusionProofOrBuilder>(
                getInclusionProof(),
                getParentForChildren(),
                isClean());
        inclusionProof_ = null;
      }
      return inclusionProofBuilder_;
    }

    private com.google.protobuf.ByteString canonicalizedBody_ = com.google.protobuf.ByteString.EMPTY;
    /**
     * <pre>
     * Optional. The canonicalized transparency log entry, used to
     * reconstruct the Signed Entry Timestamp (SET) during verification.
     * The contents of this field are the same as the `body` field in
     * a Rekor response, meaning that it does **not** include the "full"
     * canonicalized form (of log index, ID, etc.) which are
     * exposed as separate fields. The verifier is responsible for
     * combining the `canonicalized_body`, `log_index`, `log_id`,
     * and `integrated_time` into the payload that the SET's signature
     * is generated over.
     * This field is intended to be used in cases where the SET cannot be
     * produced determinisitically (e.g. inconsistent JSON field ordering,
     * differing whitespace, etc).
     *
     * If set, clients MUST verify that the signature referenced in the
     * `canonicalized_body` matches the signature provided in the
     * `Bundle.content`.
     * If not set, clients are responsible for constructing an equivalent
     * payload from other sources to verify the signature.
     * </pre>
     *
     * <code>bytes canonicalized_body = 7;</code>
     * @return The canonicalizedBody.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getCanonicalizedBody() {
      return canonicalizedBody_;
    }
    /**
     * <pre>
     * Optional. The canonicalized transparency log entry, used to
     * reconstruct the Signed Entry Timestamp (SET) during verification.
     * The contents of this field are the same as the `body` field in
     * a Rekor response, meaning that it does **not** include the "full"
     * canonicalized form (of log index, ID, etc.) which are
     * exposed as separate fields. The verifier is responsible for
     * combining the `canonicalized_body`, `log_index`, `log_id`,
     * and `integrated_time` into the payload that the SET's signature
     * is generated over.
     * This field is intended to be used in cases where the SET cannot be
     * produced determinisitically (e.g. inconsistent JSON field ordering,
     * differing whitespace, etc).
     *
     * If set, clients MUST verify that the signature referenced in the
     * `canonicalized_body` matches the signature provided in the
     * `Bundle.content`.
     * If not set, clients are responsible for constructing an equivalent
     * payload from other sources to verify the signature.
     * </pre>
     *
     * <code>bytes canonicalized_body = 7;</code>
     * @param value The canonicalizedBody to set.
     * @return This builder for chaining.
     */
    public Builder setCanonicalizedBody(com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      canonicalizedBody_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. The canonicalized transparency log entry, used to
     * reconstruct the Signed Entry Timestamp (SET) during verification.
     * The contents of this field are the same as the `body` field in
     * a Rekor response, meaning that it does **not** include the "full"
     * canonicalized form (of log index, ID, etc.) which are
     * exposed as separate fields. The verifier is responsible for
     * combining the `canonicalized_body`, `log_index`, `log_id`,
     * and `integrated_time` into the payload that the SET's signature
     * is generated over.
     * This field is intended to be used in cases where the SET cannot be
     * produced determinisitically (e.g. inconsistent JSON field ordering,
     * differing whitespace, etc).
     *
     * If set, clients MUST verify that the signature referenced in the
     * `canonicalized_body` matches the signature provided in the
     * `Bundle.content`.
     * If not set, clients are responsible for constructing an equivalent
     * payload from other sources to verify the signature.
     * </pre>
     *
     * <code>bytes canonicalized_body = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearCanonicalizedBody() {
      bitField0_ = (bitField0_ & ~0x00000040);
      canonicalizedBody_ = getDefaultInstance().getCanonicalizedBody();
      onChanged();
      return this;
    }

    // @@protoc_insertion_point(builder_scope:dev.sigstore.rekor.v1.TransparencyLogEntry)
  }

  // @@protoc_insertion_point(class_scope:dev.sigstore.rekor.v1.TransparencyLogEntry)
  private static final dev.sigstore.proto.rekor.v1.TransparencyLogEntry DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new dev.sigstore.proto.rekor.v1.TransparencyLogEntry();
  }

  public static dev.sigstore.proto.rekor.v1.TransparencyLogEntry getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<TransparencyLogEntry>
      PARSER = new com.google.protobuf.AbstractParser<TransparencyLogEntry>() {
    @java.lang.Override
    public TransparencyLogEntry parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser<TransparencyLogEntry> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<TransparencyLogEntry> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public dev.sigstore.proto.rekor.v1.TransparencyLogEntry getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}