Artifact.java

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

package dev.sigstore.proto.verification.v1;

/**
 * Protobuf type {@code dev.sigstore.verification.v1.Artifact}
 */
@javax.annotation.Generated(value="protoc", comments="annotations:Artifact.java.pb.meta")
public final class Artifact extends
    com.google.protobuf.GeneratedMessage implements
    // @@protoc_insertion_point(message_implements:dev.sigstore.verification.v1.Artifact)
    ArtifactOrBuilder {
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= */ "",
      Artifact.class.getName());
  }
  // Use Artifact.newBuilder() to construct.
  private Artifact(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
    super(builder);
  }
  private Artifact() {
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return dev.sigstore.proto.verification.v1.VerificationProto.internal_static_dev_sigstore_verification_v1_Artifact_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return dev.sigstore.proto.verification.v1.VerificationProto.internal_static_dev_sigstore_verification_v1_Artifact_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            dev.sigstore.proto.verification.v1.Artifact.class, dev.sigstore.proto.verification.v1.Artifact.Builder.class);
  }

  private int dataCase_ = 0;
  @SuppressWarnings("serial")
  private java.lang.Object data_;
  public enum DataCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    ARTIFACT_URI(1),
    ARTIFACT(2),
    ARTIFACT_DIGEST(3),
    DATA_NOT_SET(0);
    private final int value;
    private DataCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static DataCase valueOf(int value) {
      return forNumber(value);
    }

    public static DataCase forNumber(int value) {
      switch (value) {
        case 1: return ARTIFACT_URI;
        case 2: return ARTIFACT;
        case 3: return ARTIFACT_DIGEST;
        case 0: return DATA_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public DataCase
  getDataCase() {
    return DataCase.forNumber(
        dataCase_);
  }

  public static final int ARTIFACT_URI_FIELD_NUMBER = 1;
  /**
   * <pre>
   * Location of the artifact
   * </pre>
   *
   * <code>string artifact_uri = 1;</code>
   * @return Whether the artifactUri field is set.
   */
  public boolean hasArtifactUri() {
    return dataCase_ == 1;
  }
  /**
   * <pre>
   * Location of the artifact
   * </pre>
   *
   * <code>string artifact_uri = 1;</code>
   * @return The artifactUri.
   */
  public java.lang.String getArtifactUri() {
    java.lang.Object ref = "";
    if (dataCase_ == 1) {
      ref = data_;
    }
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (dataCase_ == 1) {
        data_ = s;
      }
      return s;
    }
  }
  /**
   * <pre>
   * Location of the artifact
   * </pre>
   *
   * <code>string artifact_uri = 1;</code>
   * @return The bytes for artifactUri.
   */
  public com.google.protobuf.ByteString
      getArtifactUriBytes() {
    java.lang.Object ref = "";
    if (dataCase_ == 1) {
      ref = data_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      if (dataCase_ == 1) {
        data_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ARTIFACT_FIELD_NUMBER = 2;
  /**
   * <pre>
   * The raw bytes of the artifact
   * </pre>
   *
   * <code>bytes artifact = 2;</code>
   * @return Whether the artifact field is set.
   */
  @java.lang.Override
  public boolean hasArtifact() {
    return dataCase_ == 2;
  }
  /**
   * <pre>
   * The raw bytes of the artifact
   * </pre>
   *
   * <code>bytes artifact = 2;</code>
   * @return The artifact.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getArtifact() {
    if (dataCase_ == 2) {
      return (com.google.protobuf.ByteString) data_;
    }
    return com.google.protobuf.ByteString.EMPTY;
  }

  public static final int ARTIFACT_DIGEST_FIELD_NUMBER = 3;
  /**
   * <pre>
   * Digest of the artifact. SHOULD NOT be used when verifying an
   * in-toto attestation as the subject digest cannot be
   * reconstructed. This option will not work with Ed25519
   * signatures, use Ed25519Ph or another algorithm instead.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.HashOutput artifact_digest = 3;</code>
   * @return Whether the artifactDigest field is set.
   */
  @java.lang.Override
  public boolean hasArtifactDigest() {
    return dataCase_ == 3;
  }
  /**
   * <pre>
   * Digest of the artifact. SHOULD NOT be used when verifying an
   * in-toto attestation as the subject digest cannot be
   * reconstructed. This option will not work with Ed25519
   * signatures, use Ed25519Ph or another algorithm instead.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.HashOutput artifact_digest = 3;</code>
   * @return The artifactDigest.
   */
  @java.lang.Override
  public dev.sigstore.proto.common.v1.HashOutput getArtifactDigest() {
    if (dataCase_ == 3) {
       return (dev.sigstore.proto.common.v1.HashOutput) data_;
    }
    return dev.sigstore.proto.common.v1.HashOutput.getDefaultInstance();
  }
  /**
   * <pre>
   * Digest of the artifact. SHOULD NOT be used when verifying an
   * in-toto attestation as the subject digest cannot be
   * reconstructed. This option will not work with Ed25519
   * signatures, use Ed25519Ph or another algorithm instead.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.HashOutput artifact_digest = 3;</code>
   */
  @java.lang.Override
  public dev.sigstore.proto.common.v1.HashOutputOrBuilder getArtifactDigestOrBuilder() {
    if (dataCase_ == 3) {
       return (dev.sigstore.proto.common.v1.HashOutput) data_;
    }
    return dev.sigstore.proto.common.v1.HashOutput.getDefaultInstance();
  }

  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 (dataCase_ == 1) {
      com.google.protobuf.GeneratedMessage.writeString(output, 1, data_);
    }
    if (dataCase_ == 2) {
      output.writeBytes(
          2, (com.google.protobuf.ByteString) data_);
    }
    if (dataCase_ == 3) {
      output.writeMessage(3, (dev.sigstore.proto.common.v1.HashOutput) data_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (dataCase_ == 1) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, data_);
    }
    if (dataCase_ == 2) {
      size += com.google.protobuf.CodedOutputStream
        .computeBytesSize(
            2, (com.google.protobuf.ByteString) data_);
    }
    if (dataCase_ == 3) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, (dev.sigstore.proto.common.v1.HashOutput) data_);
    }
    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.verification.v1.Artifact)) {
      return super.equals(obj);
    }
    dev.sigstore.proto.verification.v1.Artifact other = (dev.sigstore.proto.verification.v1.Artifact) obj;

    if (!getDataCase().equals(other.getDataCase())) return false;
    switch (dataCase_) {
      case 1:
        if (!getArtifactUri()
            .equals(other.getArtifactUri())) return false;
        break;
      case 2:
        if (!getArtifact()
            .equals(other.getArtifact())) return false;
        break;
      case 3:
        if (!getArtifactDigest()
            .equals(other.getArtifactDigest())) return false;
        break;
      case 0:
      default:
    }
    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();
    switch (dataCase_) {
      case 1:
        hash = (37 * hash) + ARTIFACT_URI_FIELD_NUMBER;
        hash = (53 * hash) + getArtifactUri().hashCode();
        break;
      case 2:
        hash = (37 * hash) + ARTIFACT_FIELD_NUMBER;
        hash = (53 * hash) + getArtifact().hashCode();
        break;
      case 3:
        hash = (37 * hash) + ARTIFACT_DIGEST_FIELD_NUMBER;
        hash = (53 * hash) + getArtifactDigest().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static dev.sigstore.proto.verification.v1.Artifact parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static dev.sigstore.proto.verification.v1.Artifact 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.verification.v1.Artifact parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static dev.sigstore.proto.verification.v1.Artifact 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.verification.v1.Artifact parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static dev.sigstore.proto.verification.v1.Artifact parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static dev.sigstore.proto.verification.v1.Artifact parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static dev.sigstore.proto.verification.v1.Artifact 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.verification.v1.Artifact parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static dev.sigstore.proto.verification.v1.Artifact 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.verification.v1.Artifact parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static dev.sigstore.proto.verification.v1.Artifact 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.verification.v1.Artifact 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;
  }
  /**
   * Protobuf type {@code dev.sigstore.verification.v1.Artifact}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessage.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:dev.sigstore.verification.v1.Artifact)
      dev.sigstore.proto.verification.v1.ArtifactOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return dev.sigstore.proto.verification.v1.VerificationProto.internal_static_dev_sigstore_verification_v1_Artifact_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return dev.sigstore.proto.verification.v1.VerificationProto.internal_static_dev_sigstore_verification_v1_Artifact_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              dev.sigstore.proto.verification.v1.Artifact.class, dev.sigstore.proto.verification.v1.Artifact.Builder.class);
    }

    // Construct using dev.sigstore.proto.verification.v1.Artifact.newBuilder()
    private Builder() {

    }

    private Builder(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      super(parent);

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (artifactDigestBuilder_ != null) {
        artifactDigestBuilder_.clear();
      }
      dataCase_ = 0;
      data_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return dev.sigstore.proto.verification.v1.VerificationProto.internal_static_dev_sigstore_verification_v1_Artifact_descriptor;
    }

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

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

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

    private void buildPartial0(dev.sigstore.proto.verification.v1.Artifact result) {
      int from_bitField0_ = bitField0_;
    }

    private void buildPartialOneofs(dev.sigstore.proto.verification.v1.Artifact result) {
      result.dataCase_ = dataCase_;
      result.data_ = this.data_;
      if (dataCase_ == 3 &&
          artifactDigestBuilder_ != null) {
        result.data_ = artifactDigestBuilder_.build();
      }
    }

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

    public Builder mergeFrom(dev.sigstore.proto.verification.v1.Artifact other) {
      if (other == dev.sigstore.proto.verification.v1.Artifact.getDefaultInstance()) return this;
      switch (other.getDataCase()) {
        case ARTIFACT_URI: {
          dataCase_ = 1;
          data_ = other.data_;
          onChanged();
          break;
        }
        case ARTIFACT: {
          setArtifact(other.getArtifact());
          break;
        }
        case ARTIFACT_DIGEST: {
          mergeArtifactDigest(other.getArtifactDigest());
          break;
        }
        case DATA_NOT_SET: {
          break;
        }
      }
      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 10: {
              java.lang.String s = input.readStringRequireUtf8();
              dataCase_ = 1;
              data_ = s;
              break;
            } // case 10
            case 18: {
              data_ = input.readBytes();
              dataCase_ = 2;
              break;
            } // case 18
            case 26: {
              input.readMessage(
                  internalGetArtifactDigestFieldBuilder().getBuilder(),
                  extensionRegistry);
              dataCase_ = 3;
              break;
            } // case 26
            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 dataCase_ = 0;
    private java.lang.Object data_;
    public DataCase
        getDataCase() {
      return DataCase.forNumber(
          dataCase_);
    }

    public Builder clearData() {
      dataCase_ = 0;
      data_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    /**
     * <pre>
     * Location of the artifact
     * </pre>
     *
     * <code>string artifact_uri = 1;</code>
     * @return Whether the artifactUri field is set.
     */
    @java.lang.Override
    public boolean hasArtifactUri() {
      return dataCase_ == 1;
    }
    /**
     * <pre>
     * Location of the artifact
     * </pre>
     *
     * <code>string artifact_uri = 1;</code>
     * @return The artifactUri.
     */
    @java.lang.Override
    public java.lang.String getArtifactUri() {
      java.lang.Object ref = "";
      if (dataCase_ == 1) {
        ref = data_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (dataCase_ == 1) {
          data_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Location of the artifact
     * </pre>
     *
     * <code>string artifact_uri = 1;</code>
     * @return The bytes for artifactUri.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getArtifactUriBytes() {
      java.lang.Object ref = "";
      if (dataCase_ == 1) {
        ref = data_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        if (dataCase_ == 1) {
          data_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Location of the artifact
     * </pre>
     *
     * <code>string artifact_uri = 1;</code>
     * @param value The artifactUri to set.
     * @return This builder for chaining.
     */
    public Builder setArtifactUri(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      dataCase_ = 1;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Location of the artifact
     * </pre>
     *
     * <code>string artifact_uri = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearArtifactUri() {
      if (dataCase_ == 1) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }
    /**
     * <pre>
     * Location of the artifact
     * </pre>
     *
     * <code>string artifact_uri = 1;</code>
     * @param value The bytes for artifactUri to set.
     * @return This builder for chaining.
     */
    public Builder setArtifactUriBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      dataCase_ = 1;
      data_ = value;
      onChanged();
      return this;
    }

    /**
     * <pre>
     * The raw bytes of the artifact
     * </pre>
     *
     * <code>bytes artifact = 2;</code>
     * @return Whether the artifact field is set.
     */
    public boolean hasArtifact() {
      return dataCase_ == 2;
    }
    /**
     * <pre>
     * The raw bytes of the artifact
     * </pre>
     *
     * <code>bytes artifact = 2;</code>
     * @return The artifact.
     */
    public com.google.protobuf.ByteString getArtifact() {
      if (dataCase_ == 2) {
        return (com.google.protobuf.ByteString) data_;
      }
      return com.google.protobuf.ByteString.EMPTY;
    }
    /**
     * <pre>
     * The raw bytes of the artifact
     * </pre>
     *
     * <code>bytes artifact = 2;</code>
     * @param value The artifact to set.
     * @return This builder for chaining.
     */
    public Builder setArtifact(com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      dataCase_ = 2;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The raw bytes of the artifact
     * </pre>
     *
     * <code>bytes artifact = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearArtifact() {
      if (dataCase_ == 2) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }

    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.common.v1.HashOutput, dev.sigstore.proto.common.v1.HashOutput.Builder, dev.sigstore.proto.common.v1.HashOutputOrBuilder> artifactDigestBuilder_;
    /**
     * <pre>
     * Digest of the artifact. SHOULD NOT be used when verifying an
     * in-toto attestation as the subject digest cannot be
     * reconstructed. This option will not work with Ed25519
     * signatures, use Ed25519Ph or another algorithm instead.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.HashOutput artifact_digest = 3;</code>
     * @return Whether the artifactDigest field is set.
     */
    @java.lang.Override
    public boolean hasArtifactDigest() {
      return dataCase_ == 3;
    }
    /**
     * <pre>
     * Digest of the artifact. SHOULD NOT be used when verifying an
     * in-toto attestation as the subject digest cannot be
     * reconstructed. This option will not work with Ed25519
     * signatures, use Ed25519Ph or another algorithm instead.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.HashOutput artifact_digest = 3;</code>
     * @return The artifactDigest.
     */
    @java.lang.Override
    public dev.sigstore.proto.common.v1.HashOutput getArtifactDigest() {
      if (artifactDigestBuilder_ == null) {
        if (dataCase_ == 3) {
          return (dev.sigstore.proto.common.v1.HashOutput) data_;
        }
        return dev.sigstore.proto.common.v1.HashOutput.getDefaultInstance();
      } else {
        if (dataCase_ == 3) {
          return artifactDigestBuilder_.getMessage();
        }
        return dev.sigstore.proto.common.v1.HashOutput.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Digest of the artifact. SHOULD NOT be used when verifying an
     * in-toto attestation as the subject digest cannot be
     * reconstructed. This option will not work with Ed25519
     * signatures, use Ed25519Ph or another algorithm instead.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.HashOutput artifact_digest = 3;</code>
     */
    public Builder setArtifactDigest(dev.sigstore.proto.common.v1.HashOutput value) {
      if (artifactDigestBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        data_ = value;
        onChanged();
      } else {
        artifactDigestBuilder_.setMessage(value);
      }
      dataCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * Digest of the artifact. SHOULD NOT be used when verifying an
     * in-toto attestation as the subject digest cannot be
     * reconstructed. This option will not work with Ed25519
     * signatures, use Ed25519Ph or another algorithm instead.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.HashOutput artifact_digest = 3;</code>
     */
    public Builder setArtifactDigest(
        dev.sigstore.proto.common.v1.HashOutput.Builder builderForValue) {
      if (artifactDigestBuilder_ == null) {
        data_ = builderForValue.build();
        onChanged();
      } else {
        artifactDigestBuilder_.setMessage(builderForValue.build());
      }
      dataCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * Digest of the artifact. SHOULD NOT be used when verifying an
     * in-toto attestation as the subject digest cannot be
     * reconstructed. This option will not work with Ed25519
     * signatures, use Ed25519Ph or another algorithm instead.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.HashOutput artifact_digest = 3;</code>
     */
    public Builder mergeArtifactDigest(dev.sigstore.proto.common.v1.HashOutput value) {
      if (artifactDigestBuilder_ == null) {
        if (dataCase_ == 3 &&
            data_ != dev.sigstore.proto.common.v1.HashOutput.getDefaultInstance()) {
          data_ = dev.sigstore.proto.common.v1.HashOutput.newBuilder((dev.sigstore.proto.common.v1.HashOutput) data_)
              .mergeFrom(value).buildPartial();
        } else {
          data_ = value;
        }
        onChanged();
      } else {
        if (dataCase_ == 3) {
          artifactDigestBuilder_.mergeFrom(value);
        } else {
          artifactDigestBuilder_.setMessage(value);
        }
      }
      dataCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * Digest of the artifact. SHOULD NOT be used when verifying an
     * in-toto attestation as the subject digest cannot be
     * reconstructed. This option will not work with Ed25519
     * signatures, use Ed25519Ph or another algorithm instead.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.HashOutput artifact_digest = 3;</code>
     */
    public Builder clearArtifactDigest() {
      if (artifactDigestBuilder_ == null) {
        if (dataCase_ == 3) {
          dataCase_ = 0;
          data_ = null;
          onChanged();
        }
      } else {
        if (dataCase_ == 3) {
          dataCase_ = 0;
          data_ = null;
        }
        artifactDigestBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Digest of the artifact. SHOULD NOT be used when verifying an
     * in-toto attestation as the subject digest cannot be
     * reconstructed. This option will not work with Ed25519
     * signatures, use Ed25519Ph or another algorithm instead.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.HashOutput artifact_digest = 3;</code>
     */
    public dev.sigstore.proto.common.v1.HashOutput.Builder getArtifactDigestBuilder() {
      return internalGetArtifactDigestFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Digest of the artifact. SHOULD NOT be used when verifying an
     * in-toto attestation as the subject digest cannot be
     * reconstructed. This option will not work with Ed25519
     * signatures, use Ed25519Ph or another algorithm instead.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.HashOutput artifact_digest = 3;</code>
     */
    @java.lang.Override
    public dev.sigstore.proto.common.v1.HashOutputOrBuilder getArtifactDigestOrBuilder() {
      if ((dataCase_ == 3) && (artifactDigestBuilder_ != null)) {
        return artifactDigestBuilder_.getMessageOrBuilder();
      } else {
        if (dataCase_ == 3) {
          return (dev.sigstore.proto.common.v1.HashOutput) data_;
        }
        return dev.sigstore.proto.common.v1.HashOutput.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Digest of the artifact. SHOULD NOT be used when verifying an
     * in-toto attestation as the subject digest cannot be
     * reconstructed. This option will not work with Ed25519
     * signatures, use Ed25519Ph or another algorithm instead.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.HashOutput artifact_digest = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.common.v1.HashOutput, dev.sigstore.proto.common.v1.HashOutput.Builder, dev.sigstore.proto.common.v1.HashOutputOrBuilder> 
        internalGetArtifactDigestFieldBuilder() {
      if (artifactDigestBuilder_ == null) {
        if (!(dataCase_ == 3)) {
          data_ = dev.sigstore.proto.common.v1.HashOutput.getDefaultInstance();
        }
        artifactDigestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            dev.sigstore.proto.common.v1.HashOutput, dev.sigstore.proto.common.v1.HashOutput.Builder, dev.sigstore.proto.common.v1.HashOutputOrBuilder>(
                (dev.sigstore.proto.common.v1.HashOutput) data_,
                getParentForChildren(),
                isClean());
        data_ = null;
      }
      dataCase_ = 3;
      onChanged();
      return artifactDigestBuilder_;
    }

    // @@protoc_insertion_point(builder_scope:dev.sigstore.verification.v1.Artifact)
  }

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

  public static dev.sigstore.proto.verification.v1.Artifact getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<Artifact>
      PARSER = new com.google.protobuf.AbstractParser<Artifact>() {
    @java.lang.Override
    public Artifact 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<Artifact> parser() {
    return PARSER;
  }

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

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

}