// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: in_toto_attestation/v1/resource_descriptor.proto

package io.github.intoto.attestation.v1;

public final class ResourceDescriptorOuterClass {
  private ResourceDescriptorOuterClass() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface ResourceDescriptorOrBuilder extends
      // @@protoc_insertion_point(interface_extends:in_toto_attestation.v1.ResourceDescriptor)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>string name = 1;</code>
     * @return The name.
     */
    java.lang.String getName();
    /**
     * <code>string name = 1;</code>
     * @return The bytes for name.
     */
    com.google.protobuf.ByteString
        getNameBytes();

    /**
     * <code>string uri = 2;</code>
     * @return The uri.
     */
    java.lang.String getUri();
    /**
     * <code>string uri = 2;</code>
     * @return The bytes for uri.
     */
    com.google.protobuf.ByteString
        getUriBytes();

    /**
     * <code>map&lt;string, string&gt; digest = 3;</code>
     */
    int getDigestCount();
    /**
     * <code>map&lt;string, string&gt; digest = 3;</code>
     */
    boolean containsDigest(
        java.lang.String key);
    /**
     * Use {@link #getDigestMap()} instead.
     */
    @java.lang.Deprecated
    java.util.Map<java.lang.String, java.lang.String>
    getDigest();
    /**
     * <code>map&lt;string, string&gt; digest = 3;</code>
     */
    java.util.Map<java.lang.String, java.lang.String>
    getDigestMap();
    /**
     * <code>map&lt;string, string&gt; digest = 3;</code>
     */
    /* nullable */
java.lang.String getDigestOrDefault(
        java.lang.String key,
        /* nullable */
java.lang.String defaultValue);
    /**
     * <code>map&lt;string, string&gt; digest = 3;</code>
     */
    java.lang.String getDigestOrThrow(
        java.lang.String key);

    /**
     * <code>bytes content = 4;</code>
     * @return The content.
     */
    com.google.protobuf.ByteString getContent();

    /**
     * <code>string download_location = 5;</code>
     * @return The downloadLocation.
     */
    java.lang.String getDownloadLocation();
    /**
     * <code>string download_location = 5;</code>
     * @return The bytes for downloadLocation.
     */
    com.google.protobuf.ByteString
        getDownloadLocationBytes();

    /**
     * <code>string media_type = 6;</code>
     * @return The mediaType.
     */
    java.lang.String getMediaType();
    /**
     * <code>string media_type = 6;</code>
     * @return The bytes for mediaType.
     */
    com.google.protobuf.ByteString
        getMediaTypeBytes();

    /**
     * <pre>
     * Per the Struct protobuf spec, this type corresponds to
     * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
     * So, the Struct a) is still consistent with our specification for
     * the `annotations` field, and b) has native support in some language
     * bindings making their use easier in implementations.
     * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
     * </pre>
     *
     * <code>.google.protobuf.Struct annotations = 7;</code>
     * @return Whether the annotations field is set.
     */
    boolean hasAnnotations();
    /**
     * <pre>
     * Per the Struct protobuf spec, this type corresponds to
     * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
     * So, the Struct a) is still consistent with our specification for
     * the `annotations` field, and b) has native support in some language
     * bindings making their use easier in implementations.
     * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
     * </pre>
     *
     * <code>.google.protobuf.Struct annotations = 7;</code>
     * @return The annotations.
     */
    com.google.protobuf.Struct getAnnotations();
    /**
     * <pre>
     * Per the Struct protobuf spec, this type corresponds to
     * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
     * So, the Struct a) is still consistent with our specification for
     * the `annotations` field, and b) has native support in some language
     * bindings making their use easier in implementations.
     * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
     * </pre>
     *
     * <code>.google.protobuf.Struct annotations = 7;</code>
     */
    com.google.protobuf.StructOrBuilder getAnnotationsOrBuilder();
  }
  /**
   * <pre>
   * Proto representation of the in-toto v1 ResourceDescriptor.
   * https://github.com/in-toto/attestation/blob/main/spec/v1/resource_descriptor.md
   * Validation of all fields is left to the users of this proto.
   * </pre>
   *
   * Protobuf type {@code in_toto_attestation.v1.ResourceDescriptor}
   */
  public static final class ResourceDescriptor extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:in_toto_attestation.v1.ResourceDescriptor)
      ResourceDescriptorOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use ResourceDescriptor.newBuilder() to construct.
    private ResourceDescriptor(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private ResourceDescriptor() {
      name_ = "";
      uri_ = "";
      content_ = com.google.protobuf.ByteString.EMPTY;
      downloadLocation_ = "";
      mediaType_ = "";
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new ResourceDescriptor();
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.internal_static_in_toto_attestation_v1_ResourceDescriptor_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    @java.lang.Override
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 3:
          return internalGetDigest();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.internal_static_in_toto_attestation_v1_ResourceDescriptor_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.class, io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.Builder.class);
    }

    private int bitField0_;
    public static final int NAME_FIELD_NUMBER = 1;
    @SuppressWarnings("serial")
    private volatile java.lang.Object name_ = "";
    /**
     * <code>string name = 1;</code>
     * @return The name.
     */
    @java.lang.Override
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      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();
        name_ = s;
        return s;
      }
    }
    /**
     * <code>string name = 1;</code>
     * @return The bytes for name.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int URI_FIELD_NUMBER = 2;
    @SuppressWarnings("serial")
    private volatile java.lang.Object uri_ = "";
    /**
     * <code>string uri = 2;</code>
     * @return The uri.
     */
    @java.lang.Override
    public java.lang.String getUri() {
      java.lang.Object ref = uri_;
      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();
        uri_ = s;
        return s;
      }
    }
    /**
     * <code>string uri = 2;</code>
     * @return The bytes for uri.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getUriBytes() {
      java.lang.Object ref = uri_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        uri_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int DIGEST_FIELD_NUMBER = 3;
    private static final class DigestDefaultEntryHolder {
      static final com.google.protobuf.MapEntry<
          java.lang.String, java.lang.String> defaultEntry =
              com.google.protobuf.MapEntry
              .<java.lang.String, java.lang.String>newDefaultInstance(
                  io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.internal_static_in_toto_attestation_v1_ResourceDescriptor_DigestEntry_descriptor, 
                  com.google.protobuf.WireFormat.FieldType.STRING,
                  "",
                  com.google.protobuf.WireFormat.FieldType.STRING,
                  "");
    }
    @SuppressWarnings("serial")
    private com.google.protobuf.MapField<
        java.lang.String, java.lang.String> digest_;
    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
    internalGetDigest() {
      if (digest_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            DigestDefaultEntryHolder.defaultEntry);
      }
      return digest_;
    }
    public int getDigestCount() {
      return internalGetDigest().getMap().size();
    }
    /**
     * <code>map&lt;string, string&gt; digest = 3;</code>
     */
    @java.lang.Override
    public boolean containsDigest(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetDigest().getMap().containsKey(key);
    }
    /**
     * Use {@link #getDigestMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getDigest() {
      return getDigestMap();
    }
    /**
     * <code>map&lt;string, string&gt; digest = 3;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getDigestMap() {
      return internalGetDigest().getMap();
    }
    /**
     * <code>map&lt;string, string&gt; digest = 3;</code>
     */
    @java.lang.Override
    public /* nullable */
java.lang.String getDigestOrDefault(
        java.lang.String key,
        /* nullable */
java.lang.String defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetDigest().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <code>map&lt;string, string&gt; digest = 3;</code>
     */
    @java.lang.Override
    public java.lang.String getDigestOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetDigest().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public static final int CONTENT_FIELD_NUMBER = 4;
    private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY;
    /**
     * <code>bytes content = 4;</code>
     * @return The content.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getContent() {
      return content_;
    }

    public static final int DOWNLOAD_LOCATION_FIELD_NUMBER = 5;
    @SuppressWarnings("serial")
    private volatile java.lang.Object downloadLocation_ = "";
    /**
     * <code>string download_location = 5;</code>
     * @return The downloadLocation.
     */
    @java.lang.Override
    public java.lang.String getDownloadLocation() {
      java.lang.Object ref = downloadLocation_;
      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();
        downloadLocation_ = s;
        return s;
      }
    }
    /**
     * <code>string download_location = 5;</code>
     * @return The bytes for downloadLocation.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getDownloadLocationBytes() {
      java.lang.Object ref = downloadLocation_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        downloadLocation_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int MEDIA_TYPE_FIELD_NUMBER = 6;
    @SuppressWarnings("serial")
    private volatile java.lang.Object mediaType_ = "";
    /**
     * <code>string media_type = 6;</code>
     * @return The mediaType.
     */
    @java.lang.Override
    public java.lang.String getMediaType() {
      java.lang.Object ref = mediaType_;
      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();
        mediaType_ = s;
        return s;
      }
    }
    /**
     * <code>string media_type = 6;</code>
     * @return The bytes for mediaType.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getMediaTypeBytes() {
      java.lang.Object ref = mediaType_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        mediaType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int ANNOTATIONS_FIELD_NUMBER = 7;
    private com.google.protobuf.Struct annotations_;
    /**
     * <pre>
     * Per the Struct protobuf spec, this type corresponds to
     * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
     * So, the Struct a) is still consistent with our specification for
     * the `annotations` field, and b) has native support in some language
     * bindings making their use easier in implementations.
     * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
     * </pre>
     *
     * <code>.google.protobuf.Struct annotations = 7;</code>
     * @return Whether the annotations field is set.
     */
    @java.lang.Override
    public boolean hasAnnotations() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * Per the Struct protobuf spec, this type corresponds to
     * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
     * So, the Struct a) is still consistent with our specification for
     * the `annotations` field, and b) has native support in some language
     * bindings making their use easier in implementations.
     * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
     * </pre>
     *
     * <code>.google.protobuf.Struct annotations = 7;</code>
     * @return The annotations.
     */
    @java.lang.Override
    public com.google.protobuf.Struct getAnnotations() {
      return annotations_ == null ? com.google.protobuf.Struct.getDefaultInstance() : annotations_;
    }
    /**
     * <pre>
     * Per the Struct protobuf spec, this type corresponds to
     * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
     * So, the Struct a) is still consistent with our specification for
     * the `annotations` field, and b) has native support in some language
     * bindings making their use easier in implementations.
     * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
     * </pre>
     *
     * <code>.google.protobuf.Struct annotations = 7;</code>
     */
    @java.lang.Override
    public com.google.protobuf.StructOrBuilder getAnnotationsOrBuilder() {
      return annotations_ == null ? com.google.protobuf.Struct.getDefaultInstance() : annotations_;
    }

    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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_);
      }
      com.google.protobuf.GeneratedMessageV3
        .serializeStringMapTo(
          output,
          internalGetDigest(),
          DigestDefaultEntryHolder.defaultEntry,
          3);
      if (!content_.isEmpty()) {
        output.writeBytes(4, content_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(downloadLocation_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, downloadLocation_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mediaType_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 6, mediaType_);
      }
      if (((bitField0_ & 0x00000001) != 0)) {
        output.writeMessage(7, getAnnotations());
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_);
      }
      for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
           : internalGetDigest().getMap().entrySet()) {
        com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
        digest__ = DigestDefaultEntryHolder.defaultEntry.newBuilderForType()
            .setKey(entry.getKey())
            .setValue(entry.getValue())
            .build();
        size += com.google.protobuf.CodedOutputStream
            .computeMessageSize(3, digest__);
      }
      if (!content_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(4, content_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(downloadLocation_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, downloadLocation_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mediaType_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, mediaType_);
      }
      if (((bitField0_ & 0x00000001) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(7, getAnnotations());
      }
      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 io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor)) {
        return super.equals(obj);
      }
      io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor other = (io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor) obj;

      if (!getName()
          .equals(other.getName())) return false;
      if (!getUri()
          .equals(other.getUri())) return false;
      if (!internalGetDigest().equals(
          other.internalGetDigest())) return false;
      if (!getContent()
          .equals(other.getContent())) return false;
      if (!getDownloadLocation()
          .equals(other.getDownloadLocation())) return false;
      if (!getMediaType()
          .equals(other.getMediaType())) return false;
      if (hasAnnotations() != other.hasAnnotations()) return false;
      if (hasAnnotations()) {
        if (!getAnnotations()
            .equals(other.getAnnotations())) 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) + NAME_FIELD_NUMBER;
      hash = (53 * hash) + getName().hashCode();
      hash = (37 * hash) + URI_FIELD_NUMBER;
      hash = (53 * hash) + getUri().hashCode();
      if (!internalGetDigest().getMap().isEmpty()) {
        hash = (37 * hash) + DIGEST_FIELD_NUMBER;
        hash = (53 * hash) + internalGetDigest().hashCode();
      }
      hash = (37 * hash) + CONTENT_FIELD_NUMBER;
      hash = (53 * hash) + getContent().hashCode();
      hash = (37 * hash) + DOWNLOAD_LOCATION_FIELD_NUMBER;
      hash = (53 * hash) + getDownloadLocation().hashCode();
      hash = (37 * hash) + MEDIA_TYPE_FIELD_NUMBER;
      hash = (53 * hash) + getMediaType().hashCode();
      if (hasAnnotations()) {
        hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER;
        hash = (53 * hash) + getAnnotations().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public static io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }

    public static io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor 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.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * Proto representation of the in-toto v1 ResourceDescriptor.
     * https://github.com/in-toto/attestation/blob/main/spec/v1/resource_descriptor.md
     * Validation of all fields is left to the users of this proto.
     * </pre>
     *
     * Protobuf type {@code in_toto_attestation.v1.ResourceDescriptor}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:in_toto_attestation.v1.ResourceDescriptor)
        io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptorOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.internal_static_in_toto_attestation_v1_ResourceDescriptor_descriptor;
      }

      @SuppressWarnings({"rawtypes"})
      protected com.google.protobuf.MapField internalGetMapField(
          int number) {
        switch (number) {
          case 3:
            return internalGetDigest();
          default:
            throw new RuntimeException(
                "Invalid map field number: " + number);
        }
      }
      @SuppressWarnings({"rawtypes"})
      protected com.google.protobuf.MapField internalGetMutableMapField(
          int number) {
        switch (number) {
          case 3:
            return internalGetMutableDigest();
          default:
            throw new RuntimeException(
                "Invalid map field number: " + number);
        }
      }
      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.internal_static_in_toto_attestation_v1_ResourceDescriptor_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.class, io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.Builder.class);
      }

      // Construct using io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getAnnotationsFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        name_ = "";
        uri_ = "";
        internalGetMutableDigest().clear();
        content_ = com.google.protobuf.ByteString.EMPTY;
        downloadLocation_ = "";
        mediaType_ = "";
        annotations_ = null;
        if (annotationsBuilder_ != null) {
          annotationsBuilder_.dispose();
          annotationsBuilder_ = null;
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.internal_static_in_toto_attestation_v1_ResourceDescriptor_descriptor;
      }

      @java.lang.Override
      public io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor getDefaultInstanceForType() {
        return io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.getDefaultInstance();
      }

      @java.lang.Override
      public io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor build() {
        io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor buildPartial() {
        io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor result = new io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor(this);
        if (bitField0_ != 0) { buildPartial0(result); }
        onBuilt();
        return result;
      }

      private void buildPartial0(io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.name_ = name_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.uri_ = uri_;
        }
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.digest_ = internalGetDigest();
          result.digest_.makeImmutable();
        }
        if (((from_bitField0_ & 0x00000008) != 0)) {
          result.content_ = content_;
        }
        if (((from_bitField0_ & 0x00000010) != 0)) {
          result.downloadLocation_ = downloadLocation_;
        }
        if (((from_bitField0_ & 0x00000020) != 0)) {
          result.mediaType_ = mediaType_;
        }
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000040) != 0)) {
          result.annotations_ = annotationsBuilder_ == null
              ? annotations_
              : annotationsBuilder_.build();
          to_bitField0_ |= 0x00000001;
        }
        result.bitField0_ |= to_bitField0_;
      }

      @java.lang.Override
      public Builder clone() {
        return super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor) {
          return mergeFrom((io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor other) {
        if (other == io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.getDefaultInstance()) return this;
        if (!other.getName().isEmpty()) {
          name_ = other.name_;
          bitField0_ |= 0x00000001;
          onChanged();
        }
        if (!other.getUri().isEmpty()) {
          uri_ = other.uri_;
          bitField0_ |= 0x00000002;
          onChanged();
        }
        internalGetMutableDigest().mergeFrom(
            other.internalGetDigest());
        bitField0_ |= 0x00000004;
        if (other.getContent() != com.google.protobuf.ByteString.EMPTY) {
          setContent(other.getContent());
        }
        if (!other.getDownloadLocation().isEmpty()) {
          downloadLocation_ = other.downloadLocation_;
          bitField0_ |= 0x00000010;
          onChanged();
        }
        if (!other.getMediaType().isEmpty()) {
          mediaType_ = other.mediaType_;
          bitField0_ |= 0x00000020;
          onChanged();
        }
        if (other.hasAnnotations()) {
          mergeAnnotations(other.getAnnotations());
        }
        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: {
                name_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
              case 18: {
                uri_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 18
              case 26: {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
                digest__ = input.readMessage(
                    DigestDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
                internalGetMutableDigest().getMutableMap().put(
                    digest__.getKey(), digest__.getValue());
                bitField0_ |= 0x00000004;
                break;
              } // case 26
              case 34: {
                content_ = input.readBytes();
                bitField0_ |= 0x00000008;
                break;
              } // case 34
              case 42: {
                downloadLocation_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000010;
                break;
              } // case 42
              case 50: {
                mediaType_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000020;
                break;
              } // case 50
              case 58: {
                input.readMessage(
                    getAnnotationsFieldBuilder().getBuilder(),
                    extensionRegistry);
                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 java.lang.Object name_ = "";
      /**
       * <code>string name = 1;</code>
       * @return The name.
       */
      public java.lang.String getName() {
        java.lang.Object ref = name_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          name_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string name = 1;</code>
       * @return The bytes for name.
       */
      public com.google.protobuf.ByteString
          getNameBytes() {
        java.lang.Object ref = name_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          name_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string name = 1;</code>
       * @param value The name to set.
       * @return This builder for chaining.
       */
      public Builder setName(
          java.lang.String value) {
        if (value == null) { throw new NullPointerException(); }
        name_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       * <code>string name = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearName() {
        name_ = getDefaultInstance().getName();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       * <code>string name = 1;</code>
       * @param value The bytes for name to set.
       * @return This builder for chaining.
       */
      public Builder setNameBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) { throw new NullPointerException(); }
        checkByteStringIsUtf8(value);
        name_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      private java.lang.Object uri_ = "";
      /**
       * <code>string uri = 2;</code>
       * @return The uri.
       */
      public java.lang.String getUri() {
        java.lang.Object ref = uri_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          uri_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string uri = 2;</code>
       * @return The bytes for uri.
       */
      public com.google.protobuf.ByteString
          getUriBytes() {
        java.lang.Object ref = uri_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          uri_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string uri = 2;</code>
       * @param value The uri to set.
       * @return This builder for chaining.
       */
      public Builder setUri(
          java.lang.String value) {
        if (value == null) { throw new NullPointerException(); }
        uri_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       * <code>string uri = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearUri() {
        uri_ = getDefaultInstance().getUri();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
        return this;
      }
      /**
       * <code>string uri = 2;</code>
       * @param value The bytes for uri to set.
       * @return This builder for chaining.
       */
      public Builder setUriBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) { throw new NullPointerException(); }
        checkByteStringIsUtf8(value);
        uri_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }

      private com.google.protobuf.MapField<
          java.lang.String, java.lang.String> digest_;
      private com.google.protobuf.MapField<java.lang.String, java.lang.String>
          internalGetDigest() {
        if (digest_ == null) {
          return com.google.protobuf.MapField.emptyMapField(
              DigestDefaultEntryHolder.defaultEntry);
        }
        return digest_;
      }
      private com.google.protobuf.MapField<java.lang.String, java.lang.String>
          internalGetMutableDigest() {
        if (digest_ == null) {
          digest_ = com.google.protobuf.MapField.newMapField(
              DigestDefaultEntryHolder.defaultEntry);
        }
        if (!digest_.isMutable()) {
          digest_ = digest_.copy();
        }
        bitField0_ |= 0x00000004;
        onChanged();
        return digest_;
      }
      public int getDigestCount() {
        return internalGetDigest().getMap().size();
      }
      /**
       * <code>map&lt;string, string&gt; digest = 3;</code>
       */
      @java.lang.Override
      public boolean containsDigest(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        return internalGetDigest().getMap().containsKey(key);
      }
      /**
       * Use {@link #getDigestMap()} instead.
       */
      @java.lang.Override
      @java.lang.Deprecated
      public java.util.Map<java.lang.String, java.lang.String> getDigest() {
        return getDigestMap();
      }
      /**
       * <code>map&lt;string, string&gt; digest = 3;</code>
       */
      @java.lang.Override
      public java.util.Map<java.lang.String, java.lang.String> getDigestMap() {
        return internalGetDigest().getMap();
      }
      /**
       * <code>map&lt;string, string&gt; digest = 3;</code>
       */
      @java.lang.Override
      public /* nullable */
java.lang.String getDigestOrDefault(
          java.lang.String key,
          /* nullable */
java.lang.String defaultValue) {
        if (key == null) { throw new NullPointerException("map key"); }
        java.util.Map<java.lang.String, java.lang.String> map =
            internalGetDigest().getMap();
        return map.containsKey(key) ? map.get(key) : defaultValue;
      }
      /**
       * <code>map&lt;string, string&gt; digest = 3;</code>
       */
      @java.lang.Override
      public java.lang.String getDigestOrThrow(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        java.util.Map<java.lang.String, java.lang.String> map =
            internalGetDigest().getMap();
        if (!map.containsKey(key)) {
          throw new java.lang.IllegalArgumentException();
        }
        return map.get(key);
      }
      public Builder clearDigest() {
        bitField0_ = (bitField0_ & ~0x00000004);
        internalGetMutableDigest().getMutableMap()
            .clear();
        return this;
      }
      /**
       * <code>map&lt;string, string&gt; digest = 3;</code>
       */
      public Builder removeDigest(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        internalGetMutableDigest().getMutableMap()
            .remove(key);
        return this;
      }
      /**
       * Use alternate mutation accessors instead.
       */
      @java.lang.Deprecated
      public java.util.Map<java.lang.String, java.lang.String>
          getMutableDigest() {
        bitField0_ |= 0x00000004;
        return internalGetMutableDigest().getMutableMap();
      }
      /**
       * <code>map&lt;string, string&gt; digest = 3;</code>
       */
      public Builder putDigest(
          java.lang.String key,
          java.lang.String value) {
        if (key == null) { throw new NullPointerException("map key"); }
        if (value == null) { throw new NullPointerException("map value"); }
        internalGetMutableDigest().getMutableMap()
            .put(key, value);
        bitField0_ |= 0x00000004;
        return this;
      }
      /**
       * <code>map&lt;string, string&gt; digest = 3;</code>
       */
      public Builder putAllDigest(
          java.util.Map<java.lang.String, java.lang.String> values) {
        internalGetMutableDigest().getMutableMap()
            .putAll(values);
        bitField0_ |= 0x00000004;
        return this;
      }

      private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <code>bytes content = 4;</code>
       * @return The content.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getContent() {
        return content_;
      }
      /**
       * <code>bytes content = 4;</code>
       * @param value The content to set.
       * @return This builder for chaining.
       */
      public Builder setContent(com.google.protobuf.ByteString value) {
        if (value == null) { throw new NullPointerException(); }
        content_ = value;
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }
      /**
       * <code>bytes content = 4;</code>
       * @return This builder for chaining.
       */
      public Builder clearContent() {
        bitField0_ = (bitField0_ & ~0x00000008);
        content_ = getDefaultInstance().getContent();
        onChanged();
        return this;
      }

      private java.lang.Object downloadLocation_ = "";
      /**
       * <code>string download_location = 5;</code>
       * @return The downloadLocation.
       */
      public java.lang.String getDownloadLocation() {
        java.lang.Object ref = downloadLocation_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          downloadLocation_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string download_location = 5;</code>
       * @return The bytes for downloadLocation.
       */
      public com.google.protobuf.ByteString
          getDownloadLocationBytes() {
        java.lang.Object ref = downloadLocation_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          downloadLocation_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string download_location = 5;</code>
       * @param value The downloadLocation to set.
       * @return This builder for chaining.
       */
      public Builder setDownloadLocation(
          java.lang.String value) {
        if (value == null) { throw new NullPointerException(); }
        downloadLocation_ = value;
        bitField0_ |= 0x00000010;
        onChanged();
        return this;
      }
      /**
       * <code>string download_location = 5;</code>
       * @return This builder for chaining.
       */
      public Builder clearDownloadLocation() {
        downloadLocation_ = getDefaultInstance().getDownloadLocation();
        bitField0_ = (bitField0_ & ~0x00000010);
        onChanged();
        return this;
      }
      /**
       * <code>string download_location = 5;</code>
       * @param value The bytes for downloadLocation to set.
       * @return This builder for chaining.
       */
      public Builder setDownloadLocationBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) { throw new NullPointerException(); }
        checkByteStringIsUtf8(value);
        downloadLocation_ = value;
        bitField0_ |= 0x00000010;
        onChanged();
        return this;
      }

      private java.lang.Object mediaType_ = "";
      /**
       * <code>string media_type = 6;</code>
       * @return The mediaType.
       */
      public java.lang.String getMediaType() {
        java.lang.Object ref = mediaType_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          mediaType_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string media_type = 6;</code>
       * @return The bytes for mediaType.
       */
      public com.google.protobuf.ByteString
          getMediaTypeBytes() {
        java.lang.Object ref = mediaType_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          mediaType_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string media_type = 6;</code>
       * @param value The mediaType to set.
       * @return This builder for chaining.
       */
      public Builder setMediaType(
          java.lang.String value) {
        if (value == null) { throw new NullPointerException(); }
        mediaType_ = value;
        bitField0_ |= 0x00000020;
        onChanged();
        return this;
      }
      /**
       * <code>string media_type = 6;</code>
       * @return This builder for chaining.
       */
      public Builder clearMediaType() {
        mediaType_ = getDefaultInstance().getMediaType();
        bitField0_ = (bitField0_ & ~0x00000020);
        onChanged();
        return this;
      }
      /**
       * <code>string media_type = 6;</code>
       * @param value The bytes for mediaType to set.
       * @return This builder for chaining.
       */
      public Builder setMediaTypeBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) { throw new NullPointerException(); }
        checkByteStringIsUtf8(value);
        mediaType_ = value;
        bitField0_ |= 0x00000020;
        onChanged();
        return this;
      }

      private com.google.protobuf.Struct annotations_;
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> annotationsBuilder_;
      /**
       * <pre>
       * Per the Struct protobuf spec, this type corresponds to
       * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
       * So, the Struct a) is still consistent with our specification for
       * the `annotations` field, and b) has native support in some language
       * bindings making their use easier in implementations.
       * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
       * </pre>
       *
       * <code>.google.protobuf.Struct annotations = 7;</code>
       * @return Whether the annotations field is set.
       */
      public boolean hasAnnotations() {
        return ((bitField0_ & 0x00000040) != 0);
      }
      /**
       * <pre>
       * Per the Struct protobuf spec, this type corresponds to
       * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
       * So, the Struct a) is still consistent with our specification for
       * the `annotations` field, and b) has native support in some language
       * bindings making their use easier in implementations.
       * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
       * </pre>
       *
       * <code>.google.protobuf.Struct annotations = 7;</code>
       * @return The annotations.
       */
      public com.google.protobuf.Struct getAnnotations() {
        if (annotationsBuilder_ == null) {
          return annotations_ == null ? com.google.protobuf.Struct.getDefaultInstance() : annotations_;
        } else {
          return annotationsBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Per the Struct protobuf spec, this type corresponds to
       * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
       * So, the Struct a) is still consistent with our specification for
       * the `annotations` field, and b) has native support in some language
       * bindings making their use easier in implementations.
       * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
       * </pre>
       *
       * <code>.google.protobuf.Struct annotations = 7;</code>
       */
      public Builder setAnnotations(com.google.protobuf.Struct value) {
        if (annotationsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          annotations_ = value;
        } else {
          annotationsBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000040;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Per the Struct protobuf spec, this type corresponds to
       * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
       * So, the Struct a) is still consistent with our specification for
       * the `annotations` field, and b) has native support in some language
       * bindings making their use easier in implementations.
       * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
       * </pre>
       *
       * <code>.google.protobuf.Struct annotations = 7;</code>
       */
      public Builder setAnnotations(
          com.google.protobuf.Struct.Builder builderForValue) {
        if (annotationsBuilder_ == null) {
          annotations_ = builderForValue.build();
        } else {
          annotationsBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000040;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Per the Struct protobuf spec, this type corresponds to
       * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
       * So, the Struct a) is still consistent with our specification for
       * the `annotations` field, and b) has native support in some language
       * bindings making their use easier in implementations.
       * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
       * </pre>
       *
       * <code>.google.protobuf.Struct annotations = 7;</code>
       */
      public Builder mergeAnnotations(com.google.protobuf.Struct value) {
        if (annotationsBuilder_ == null) {
          if (((bitField0_ & 0x00000040) != 0) &&
            annotations_ != null &&
            annotations_ != com.google.protobuf.Struct.getDefaultInstance()) {
            getAnnotationsBuilder().mergeFrom(value);
          } else {
            annotations_ = value;
          }
        } else {
          annotationsBuilder_.mergeFrom(value);
        }
        if (annotations_ != null) {
          bitField0_ |= 0x00000040;
          onChanged();
        }
        return this;
      }
      /**
       * <pre>
       * Per the Struct protobuf spec, this type corresponds to
       * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
       * So, the Struct a) is still consistent with our specification for
       * the `annotations` field, and b) has native support in some language
       * bindings making their use easier in implementations.
       * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
       * </pre>
       *
       * <code>.google.protobuf.Struct annotations = 7;</code>
       */
      public Builder clearAnnotations() {
        bitField0_ = (bitField0_ & ~0x00000040);
        annotations_ = null;
        if (annotationsBuilder_ != null) {
          annotationsBuilder_.dispose();
          annotationsBuilder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Per the Struct protobuf spec, this type corresponds to
       * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
       * So, the Struct a) is still consistent with our specification for
       * the `annotations` field, and b) has native support in some language
       * bindings making their use easier in implementations.
       * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
       * </pre>
       *
       * <code>.google.protobuf.Struct annotations = 7;</code>
       */
      public com.google.protobuf.Struct.Builder getAnnotationsBuilder() {
        bitField0_ |= 0x00000040;
        onChanged();
        return getAnnotationsFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Per the Struct protobuf spec, this type corresponds to
       * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
       * So, the Struct a) is still consistent with our specification for
       * the `annotations` field, and b) has native support in some language
       * bindings making their use easier in implementations.
       * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
       * </pre>
       *
       * <code>.google.protobuf.Struct annotations = 7;</code>
       */
      public com.google.protobuf.StructOrBuilder getAnnotationsOrBuilder() {
        if (annotationsBuilder_ != null) {
          return annotationsBuilder_.getMessageOrBuilder();
        } else {
          return annotations_ == null ?
              com.google.protobuf.Struct.getDefaultInstance() : annotations_;
        }
      }
      /**
       * <pre>
       * Per the Struct protobuf spec, this type corresponds to
       * a JSON Object, which is truly a map&lt;string, Value&gt; under the hood.
       * So, the Struct a) is still consistent with our specification for
       * the `annotations` field, and b) has native support in some language
       * bindings making their use easier in implementations.
       * See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct
       * </pre>
       *
       * <code>.google.protobuf.Struct annotations = 7;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> 
          getAnnotationsFieldBuilder() {
        if (annotationsBuilder_ == null) {
          annotationsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>(
                  getAnnotations(),
                  getParentForChildren(),
                  isClean());
          annotations_ = null;
        }
        return annotationsBuilder_;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:in_toto_attestation.v1.ResourceDescriptor)
    }

    // @@protoc_insertion_point(class_scope:in_toto_attestation.v1.ResourceDescriptor)
    private static final io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor();
    }

    public static io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_in_toto_attestation_v1_ResourceDescriptor_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_in_toto_attestation_v1_ResourceDescriptor_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_in_toto_attestation_v1_ResourceDescriptor_DigestEntry_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_in_toto_attestation_v1_ResourceDescriptor_DigestEntry_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n0in_toto_attestation/v1/resource_descri" +
      "ptor.proto\022\026in_toto_attestation.v1\032\034goog" +
      "le/protobuf/struct.proto\"\224\002\n\022ResourceDes" +
      "criptor\022\014\n\004name\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\022F\n\006di" +
      "gest\030\003 \003(\01326.in_toto_attestation.v1.Reso" +
      "urceDescriptor.DigestEntry\022\017\n\007content\030\004 " +
      "\001(\014\022\031\n\021download_location\030\005 \001(\t\022\022\n\nmedia_" +
      "type\030\006 \001(\t\022,\n\013annotations\030\007 \001(\0132\027.google" +
      ".protobuf.Struct\032-\n\013DigestEntry\022\013\n\003key\030\001" +
      " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001BG\n\037io.github.int" +
      "oto.attestation.v1Z$github.com/in-toto/a" +
      "ttestation/go/v1b\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          com.google.protobuf.StructProto.getDescriptor(),
        });
    internal_static_in_toto_attestation_v1_ResourceDescriptor_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_in_toto_attestation_v1_ResourceDescriptor_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_in_toto_attestation_v1_ResourceDescriptor_descriptor,
        new java.lang.String[] { "Name", "Uri", "Digest", "Content", "DownloadLocation", "MediaType", "Annotations", });
    internal_static_in_toto_attestation_v1_ResourceDescriptor_DigestEntry_descriptor =
      internal_static_in_toto_attestation_v1_ResourceDescriptor_descriptor.getNestedTypes().get(0);
    internal_static_in_toto_attestation_v1_ResourceDescriptor_DigestEntry_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_in_toto_attestation_v1_ResourceDescriptor_DigestEntry_descriptor,
        new java.lang.String[] { "Key", "Value", });
    com.google.protobuf.StructProto.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
