// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: in_toto_attestation/predicates/link/v0/link.proto

package io.github.intoto.attestation.predicates.link.v0;

public final class LinkOuterClass {
  private LinkOuterClass() {}
  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 LinkOrBuilder extends
      // @@protoc_insertion_point(interface_extends:in_toto_attestation.predicates.link.v0.Link)
      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>repeated string command = 2;</code>
     * @return A list containing the command.
     */
    java.util.List<java.lang.String>
        getCommandList();
    /**
     * <code>repeated string command = 2;</code>
     * @return The count of command.
     */
    int getCommandCount();
    /**
     * <code>repeated string command = 2;</code>
     * @param index The index of the element to return.
     * @return The command at the given index.
     */
    java.lang.String getCommand(int index);
    /**
     * <code>repeated string command = 2;</code>
     * @param index The index of the value to return.
     * @return The bytes of the command at the given index.
     */
    com.google.protobuf.ByteString
        getCommandBytes(int index);

    /**
     * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
     */
    java.util.List<io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor> 
        getMaterialsList();
    /**
     * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
     */
    io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor getMaterials(int index);
    /**
     * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
     */
    int getMaterialsCount();
    /**
     * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
     */
    java.util.List<? extends io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptorOrBuilder> 
        getMaterialsOrBuilderList();
    /**
     * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
     */
    io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptorOrBuilder getMaterialsOrBuilder(
        int index);

    /**
     * <code>.google.protobuf.Struct byproducts = 4;</code>
     * @return Whether the byproducts field is set.
     */
    boolean hasByproducts();
    /**
     * <code>.google.protobuf.Struct byproducts = 4;</code>
     * @return The byproducts.
     */
    com.google.protobuf.Struct getByproducts();
    /**
     * <code>.google.protobuf.Struct byproducts = 4;</code>
     */
    com.google.protobuf.StructOrBuilder getByproductsOrBuilder();

    /**
     * <code>.google.protobuf.Struct environment = 5;</code>
     * @return Whether the environment field is set.
     */
    boolean hasEnvironment();
    /**
     * <code>.google.protobuf.Struct environment = 5;</code>
     * @return The environment.
     */
    com.google.protobuf.Struct getEnvironment();
    /**
     * <code>.google.protobuf.Struct environment = 5;</code>
     */
    com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder();
  }
  /**
   * Protobuf type {@code in_toto_attestation.predicates.link.v0.Link}
   */
  public static final class Link extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:in_toto_attestation.predicates.link.v0.Link)
      LinkOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Link.newBuilder() to construct.
    private Link(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Link() {
      name_ = "";
      command_ =
          com.google.protobuf.LazyStringArrayList.emptyList();
      materials_ = java.util.Collections.emptyList();
    }

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

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.internal_static_in_toto_attestation_predicates_link_v0_Link_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.internal_static_in_toto_attestation_predicates_link_v0_Link_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link.class, io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link.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 COMMAND_FIELD_NUMBER = 2;
    @SuppressWarnings("serial")
    private com.google.protobuf.LazyStringArrayList command_ =
        com.google.protobuf.LazyStringArrayList.emptyList();
    /**
     * <code>repeated string command = 2;</code>
     * @return A list containing the command.
     */
    public com.google.protobuf.ProtocolStringList
        getCommandList() {
      return command_;
    }
    /**
     * <code>repeated string command = 2;</code>
     * @return The count of command.
     */
    public int getCommandCount() {
      return command_.size();
    }
    /**
     * <code>repeated string command = 2;</code>
     * @param index The index of the element to return.
     * @return The command at the given index.
     */
    public java.lang.String getCommand(int index) {
      return command_.get(index);
    }
    /**
     * <code>repeated string command = 2;</code>
     * @param index The index of the value to return.
     * @return The bytes of the command at the given index.
     */
    public com.google.protobuf.ByteString
        getCommandBytes(int index) {
      return command_.getByteString(index);
    }

    public static final int MATERIALS_FIELD_NUMBER = 3;
    @SuppressWarnings("serial")
    private java.util.List<io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor> materials_;
    /**
     * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
     */
    @java.lang.Override
    public java.util.List<io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor> getMaterialsList() {
      return materials_;
    }
    /**
     * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
     */
    @java.lang.Override
    public java.util.List<? extends io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptorOrBuilder> 
        getMaterialsOrBuilderList() {
      return materials_;
    }
    /**
     * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
     */
    @java.lang.Override
    public int getMaterialsCount() {
      return materials_.size();
    }
    /**
     * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
     */
    @java.lang.Override
    public io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor getMaterials(int index) {
      return materials_.get(index);
    }
    /**
     * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
     */
    @java.lang.Override
    public io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptorOrBuilder getMaterialsOrBuilder(
        int index) {
      return materials_.get(index);
    }

    public static final int BYPRODUCTS_FIELD_NUMBER = 4;
    private com.google.protobuf.Struct byproducts_;
    /**
     * <code>.google.protobuf.Struct byproducts = 4;</code>
     * @return Whether the byproducts field is set.
     */
    @java.lang.Override
    public boolean hasByproducts() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <code>.google.protobuf.Struct byproducts = 4;</code>
     * @return The byproducts.
     */
    @java.lang.Override
    public com.google.protobuf.Struct getByproducts() {
      return byproducts_ == null ? com.google.protobuf.Struct.getDefaultInstance() : byproducts_;
    }
    /**
     * <code>.google.protobuf.Struct byproducts = 4;</code>
     */
    @java.lang.Override
    public com.google.protobuf.StructOrBuilder getByproductsOrBuilder() {
      return byproducts_ == null ? com.google.protobuf.Struct.getDefaultInstance() : byproducts_;
    }

    public static final int ENVIRONMENT_FIELD_NUMBER = 5;
    private com.google.protobuf.Struct environment_;
    /**
     * <code>.google.protobuf.Struct environment = 5;</code>
     * @return Whether the environment field is set.
     */
    @java.lang.Override
    public boolean hasEnvironment() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <code>.google.protobuf.Struct environment = 5;</code>
     * @return The environment.
     */
    @java.lang.Override
    public com.google.protobuf.Struct getEnvironment() {
      return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_;
    }
    /**
     * <code>.google.protobuf.Struct environment = 5;</code>
     */
    @java.lang.Override
    public com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder() {
      return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_;
    }

    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_);
      }
      for (int i = 0; i < command_.size(); i++) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, command_.getRaw(i));
      }
      for (int i = 0; i < materials_.size(); i++) {
        output.writeMessage(3, materials_.get(i));
      }
      if (((bitField0_ & 0x00000001) != 0)) {
        output.writeMessage(4, getByproducts());
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        output.writeMessage(5, getEnvironment());
      }
      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_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < command_.size(); i++) {
          dataSize += computeStringSizeNoTag(command_.getRaw(i));
        }
        size += dataSize;
        size += 1 * getCommandList().size();
      }
      for (int i = 0; i < materials_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, materials_.get(i));
      }
      if (((bitField0_ & 0x00000001) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, getByproducts());
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, getEnvironment());
      }
      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.predicates.link.v0.LinkOuterClass.Link)) {
        return super.equals(obj);
      }
      io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link other = (io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link) obj;

      if (!getName()
          .equals(other.getName())) return false;
      if (!getCommandList()
          .equals(other.getCommandList())) return false;
      if (!getMaterialsList()
          .equals(other.getMaterialsList())) return false;
      if (hasByproducts() != other.hasByproducts()) return false;
      if (hasByproducts()) {
        if (!getByproducts()
            .equals(other.getByproducts())) return false;
      }
      if (hasEnvironment() != other.hasEnvironment()) return false;
      if (hasEnvironment()) {
        if (!getEnvironment()
            .equals(other.getEnvironment())) 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();
      if (getCommandCount() > 0) {
        hash = (37 * hash) + COMMAND_FIELD_NUMBER;
        hash = (53 * hash) + getCommandList().hashCode();
      }
      if (getMaterialsCount() > 0) {
        hash = (37 * hash) + MATERIALS_FIELD_NUMBER;
        hash = (53 * hash) + getMaterialsList().hashCode();
      }
      if (hasByproducts()) {
        hash = (37 * hash) + BYPRODUCTS_FIELD_NUMBER;
        hash = (53 * hash) + getByproducts().hashCode();
      }
      if (hasEnvironment()) {
        hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER;
        hash = (53 * hash) + getEnvironment().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link 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.predicates.link.v0.LinkOuterClass.Link parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link 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.predicates.link.v0.LinkOuterClass.Link parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link 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.predicates.link.v0.LinkOuterClass.Link parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }

    public static io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link 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.predicates.link.v0.LinkOuterClass.Link parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link 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.predicates.link.v0.LinkOuterClass.Link 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;
    }
    /**
     * Protobuf type {@code in_toto_attestation.predicates.link.v0.Link}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:in_toto_attestation.predicates.link.v0.Link)
        io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.LinkOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.internal_static_in_toto_attestation_predicates_link_v0_Link_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.internal_static_in_toto_attestation_predicates_link_v0_Link_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link.class, io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link.Builder.class);
      }

      // Construct using io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getMaterialsFieldBuilder();
          getByproductsFieldBuilder();
          getEnvironmentFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        name_ = "";
        command_ =
            com.google.protobuf.LazyStringArrayList.emptyList();
        if (materialsBuilder_ == null) {
          materials_ = java.util.Collections.emptyList();
        } else {
          materials_ = null;
          materialsBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        byproducts_ = null;
        if (byproductsBuilder_ != null) {
          byproductsBuilder_.dispose();
          byproductsBuilder_ = null;
        }
        environment_ = null;
        if (environmentBuilder_ != null) {
          environmentBuilder_.dispose();
          environmentBuilder_ = null;
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.internal_static_in_toto_attestation_predicates_link_v0_Link_descriptor;
      }

      @java.lang.Override
      public io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link getDefaultInstanceForType() {
        return io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link.getDefaultInstance();
      }

      @java.lang.Override
      public io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link build() {
        io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link buildPartial() {
        io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link result = new io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link(this);
        buildPartialRepeatedFields(result);
        if (bitField0_ != 0) { buildPartial0(result); }
        onBuilt();
        return result;
      }

      private void buildPartialRepeatedFields(io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link result) {
        if (materialsBuilder_ == null) {
          if (((bitField0_ & 0x00000004) != 0)) {
            materials_ = java.util.Collections.unmodifiableList(materials_);
            bitField0_ = (bitField0_ & ~0x00000004);
          }
          result.materials_ = materials_;
        } else {
          result.materials_ = materialsBuilder_.build();
        }
      }

      private void buildPartial0(io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.name_ = name_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          command_.makeImmutable();
          result.command_ = command_;
        }
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000008) != 0)) {
          result.byproducts_ = byproductsBuilder_ == null
              ? byproducts_
              : byproductsBuilder_.build();
          to_bitField0_ |= 0x00000001;
        }
        if (((from_bitField0_ & 0x00000010) != 0)) {
          result.environment_ = environmentBuilder_ == null
              ? environment_
              : environmentBuilder_.build();
          to_bitField0_ |= 0x00000002;
        }
        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.predicates.link.v0.LinkOuterClass.Link) {
          return mergeFrom((io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link other) {
        if (other == io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link.getDefaultInstance()) return this;
        if (!other.getName().isEmpty()) {
          name_ = other.name_;
          bitField0_ |= 0x00000001;
          onChanged();
        }
        if (!other.command_.isEmpty()) {
          if (command_.isEmpty()) {
            command_ = other.command_;
            bitField0_ |= 0x00000002;
          } else {
            ensureCommandIsMutable();
            command_.addAll(other.command_);
          }
          onChanged();
        }
        if (materialsBuilder_ == null) {
          if (!other.materials_.isEmpty()) {
            if (materials_.isEmpty()) {
              materials_ = other.materials_;
              bitField0_ = (bitField0_ & ~0x00000004);
            } else {
              ensureMaterialsIsMutable();
              materials_.addAll(other.materials_);
            }
            onChanged();
          }
        } else {
          if (!other.materials_.isEmpty()) {
            if (materialsBuilder_.isEmpty()) {
              materialsBuilder_.dispose();
              materialsBuilder_ = null;
              materials_ = other.materials_;
              bitField0_ = (bitField0_ & ~0x00000004);
              materialsBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getMaterialsFieldBuilder() : null;
            } else {
              materialsBuilder_.addAllMessages(other.materials_);
            }
          }
        }
        if (other.hasByproducts()) {
          mergeByproducts(other.getByproducts());
        }
        if (other.hasEnvironment()) {
          mergeEnvironment(other.getEnvironment());
        }
        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: {
                java.lang.String s = input.readStringRequireUtf8();
                ensureCommandIsMutable();
                command_.add(s);
                break;
              } // case 18
              case 26: {
                io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor m =
                    input.readMessage(
                        io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.parser(),
                        extensionRegistry);
                if (materialsBuilder_ == null) {
                  ensureMaterialsIsMutable();
                  materials_.add(m);
                } else {
                  materialsBuilder_.addMessage(m);
                }
                break;
              } // case 26
              case 34: {
                input.readMessage(
                    getByproductsFieldBuilder().getBuilder(),
                    extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 34
              case 42: {
                input.readMessage(
                    getEnvironmentFieldBuilder().getBuilder(),
                    extensionRegistry);
                bitField0_ |= 0x00000010;
                break;
              } // case 42
              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 com.google.protobuf.LazyStringArrayList command_ =
          com.google.protobuf.LazyStringArrayList.emptyList();
      private void ensureCommandIsMutable() {
        if (!command_.isModifiable()) {
          command_ = new com.google.protobuf.LazyStringArrayList(command_);
        }
        bitField0_ |= 0x00000002;
      }
      /**
       * <code>repeated string command = 2;</code>
       * @return A list containing the command.
       */
      public com.google.protobuf.ProtocolStringList
          getCommandList() {
        command_.makeImmutable();
        return command_;
      }
      /**
       * <code>repeated string command = 2;</code>
       * @return The count of command.
       */
      public int getCommandCount() {
        return command_.size();
      }
      /**
       * <code>repeated string command = 2;</code>
       * @param index The index of the element to return.
       * @return The command at the given index.
       */
      public java.lang.String getCommand(int index) {
        return command_.get(index);
      }
      /**
       * <code>repeated string command = 2;</code>
       * @param index The index of the value to return.
       * @return The bytes of the command at the given index.
       */
      public com.google.protobuf.ByteString
          getCommandBytes(int index) {
        return command_.getByteString(index);
      }
      /**
       * <code>repeated string command = 2;</code>
       * @param index The index to set the value at.
       * @param value The command to set.
       * @return This builder for chaining.
       */
      public Builder setCommand(
          int index, java.lang.String value) {
        if (value == null) { throw new NullPointerException(); }
        ensureCommandIsMutable();
        command_.set(index, value);
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       * <code>repeated string command = 2;</code>
       * @param value The command to add.
       * @return This builder for chaining.
       */
      public Builder addCommand(
          java.lang.String value) {
        if (value == null) { throw new NullPointerException(); }
        ensureCommandIsMutable();
        command_.add(value);
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       * <code>repeated string command = 2;</code>
       * @param values The command to add.
       * @return This builder for chaining.
       */
      public Builder addAllCommand(
          java.lang.Iterable<java.lang.String> values) {
        ensureCommandIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, command_);
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       * <code>repeated string command = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearCommand() {
        command_ =
          com.google.protobuf.LazyStringArrayList.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);;
        onChanged();
        return this;
      }
      /**
       * <code>repeated string command = 2;</code>
       * @param value The bytes of the command to add.
       * @return This builder for chaining.
       */
      public Builder addCommandBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) { throw new NullPointerException(); }
        checkByteStringIsUtf8(value);
        ensureCommandIsMutable();
        command_.add(value);
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }

      private java.util.List<io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor> materials_ =
        java.util.Collections.emptyList();
      private void ensureMaterialsIsMutable() {
        if (!((bitField0_ & 0x00000004) != 0)) {
          materials_ = new java.util.ArrayList<io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor>(materials_);
          bitField0_ |= 0x00000004;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor, io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.Builder, io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptorOrBuilder> materialsBuilder_;

      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public java.util.List<io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor> getMaterialsList() {
        if (materialsBuilder_ == null) {
          return java.util.Collections.unmodifiableList(materials_);
        } else {
          return materialsBuilder_.getMessageList();
        }
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public int getMaterialsCount() {
        if (materialsBuilder_ == null) {
          return materials_.size();
        } else {
          return materialsBuilder_.getCount();
        }
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor getMaterials(int index) {
        if (materialsBuilder_ == null) {
          return materials_.get(index);
        } else {
          return materialsBuilder_.getMessage(index);
        }
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public Builder setMaterials(
          int index, io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor value) {
        if (materialsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMaterialsIsMutable();
          materials_.set(index, value);
          onChanged();
        } else {
          materialsBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public Builder setMaterials(
          int index, io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.Builder builderForValue) {
        if (materialsBuilder_ == null) {
          ensureMaterialsIsMutable();
          materials_.set(index, builderForValue.build());
          onChanged();
        } else {
          materialsBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public Builder addMaterials(io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor value) {
        if (materialsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMaterialsIsMutable();
          materials_.add(value);
          onChanged();
        } else {
          materialsBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public Builder addMaterials(
          int index, io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor value) {
        if (materialsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMaterialsIsMutable();
          materials_.add(index, value);
          onChanged();
        } else {
          materialsBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public Builder addMaterials(
          io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.Builder builderForValue) {
        if (materialsBuilder_ == null) {
          ensureMaterialsIsMutable();
          materials_.add(builderForValue.build());
          onChanged();
        } else {
          materialsBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public Builder addMaterials(
          int index, io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.Builder builderForValue) {
        if (materialsBuilder_ == null) {
          ensureMaterialsIsMutable();
          materials_.add(index, builderForValue.build());
          onChanged();
        } else {
          materialsBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public Builder addAllMaterials(
          java.lang.Iterable<? extends io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor> values) {
        if (materialsBuilder_ == null) {
          ensureMaterialsIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, materials_);
          onChanged();
        } else {
          materialsBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public Builder clearMaterials() {
        if (materialsBuilder_ == null) {
          materials_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000004);
          onChanged();
        } else {
          materialsBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public Builder removeMaterials(int index) {
        if (materialsBuilder_ == null) {
          ensureMaterialsIsMutable();
          materials_.remove(index);
          onChanged();
        } else {
          materialsBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.Builder getMaterialsBuilder(
          int index) {
        return getMaterialsFieldBuilder().getBuilder(index);
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptorOrBuilder getMaterialsOrBuilder(
          int index) {
        if (materialsBuilder_ == null) {
          return materials_.get(index);  } else {
          return materialsBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public java.util.List<? extends io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptorOrBuilder> 
           getMaterialsOrBuilderList() {
        if (materialsBuilder_ != null) {
          return materialsBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(materials_);
        }
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.Builder addMaterialsBuilder() {
        return getMaterialsFieldBuilder().addBuilder(
            io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.getDefaultInstance());
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.Builder addMaterialsBuilder(
          int index) {
        return getMaterialsFieldBuilder().addBuilder(
            index, io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.getDefaultInstance());
      }
      /**
       * <code>repeated .in_toto_attestation.v1.ResourceDescriptor materials = 3;</code>
       */
      public java.util.List<io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.Builder> 
           getMaterialsBuilderList() {
        return getMaterialsFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor, io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.Builder, io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptorOrBuilder> 
          getMaterialsFieldBuilder() {
        if (materialsBuilder_ == null) {
          materialsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor, io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptor.Builder, io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.ResourceDescriptorOrBuilder>(
                  materials_,
                  ((bitField0_ & 0x00000004) != 0),
                  getParentForChildren(),
                  isClean());
          materials_ = null;
        }
        return materialsBuilder_;
      }

      private com.google.protobuf.Struct byproducts_;
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> byproductsBuilder_;
      /**
       * <code>.google.protobuf.Struct byproducts = 4;</code>
       * @return Whether the byproducts field is set.
       */
      public boolean hasByproducts() {
        return ((bitField0_ & 0x00000008) != 0);
      }
      /**
       * <code>.google.protobuf.Struct byproducts = 4;</code>
       * @return The byproducts.
       */
      public com.google.protobuf.Struct getByproducts() {
        if (byproductsBuilder_ == null) {
          return byproducts_ == null ? com.google.protobuf.Struct.getDefaultInstance() : byproducts_;
        } else {
          return byproductsBuilder_.getMessage();
        }
      }
      /**
       * <code>.google.protobuf.Struct byproducts = 4;</code>
       */
      public Builder setByproducts(com.google.protobuf.Struct value) {
        if (byproductsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          byproducts_ = value;
        } else {
          byproductsBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }
      /**
       * <code>.google.protobuf.Struct byproducts = 4;</code>
       */
      public Builder setByproducts(
          com.google.protobuf.Struct.Builder builderForValue) {
        if (byproductsBuilder_ == null) {
          byproducts_ = builderForValue.build();
        } else {
          byproductsBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }
      /**
       * <code>.google.protobuf.Struct byproducts = 4;</code>
       */
      public Builder mergeByproducts(com.google.protobuf.Struct value) {
        if (byproductsBuilder_ == null) {
          if (((bitField0_ & 0x00000008) != 0) &&
            byproducts_ != null &&
            byproducts_ != com.google.protobuf.Struct.getDefaultInstance()) {
            getByproductsBuilder().mergeFrom(value);
          } else {
            byproducts_ = value;
          }
        } else {
          byproductsBuilder_.mergeFrom(value);
        }
        if (byproducts_ != null) {
          bitField0_ |= 0x00000008;
          onChanged();
        }
        return this;
      }
      /**
       * <code>.google.protobuf.Struct byproducts = 4;</code>
       */
      public Builder clearByproducts() {
        bitField0_ = (bitField0_ & ~0x00000008);
        byproducts_ = null;
        if (byproductsBuilder_ != null) {
          byproductsBuilder_.dispose();
          byproductsBuilder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       * <code>.google.protobuf.Struct byproducts = 4;</code>
       */
      public com.google.protobuf.Struct.Builder getByproductsBuilder() {
        bitField0_ |= 0x00000008;
        onChanged();
        return getByproductsFieldBuilder().getBuilder();
      }
      /**
       * <code>.google.protobuf.Struct byproducts = 4;</code>
       */
      public com.google.protobuf.StructOrBuilder getByproductsOrBuilder() {
        if (byproductsBuilder_ != null) {
          return byproductsBuilder_.getMessageOrBuilder();
        } else {
          return byproducts_ == null ?
              com.google.protobuf.Struct.getDefaultInstance() : byproducts_;
        }
      }
      /**
       * <code>.google.protobuf.Struct byproducts = 4;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> 
          getByproductsFieldBuilder() {
        if (byproductsBuilder_ == null) {
          byproductsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>(
                  getByproducts(),
                  getParentForChildren(),
                  isClean());
          byproducts_ = null;
        }
        return byproductsBuilder_;
      }

      private com.google.protobuf.Struct environment_;
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> environmentBuilder_;
      /**
       * <code>.google.protobuf.Struct environment = 5;</code>
       * @return Whether the environment field is set.
       */
      public boolean hasEnvironment() {
        return ((bitField0_ & 0x00000010) != 0);
      }
      /**
       * <code>.google.protobuf.Struct environment = 5;</code>
       * @return The environment.
       */
      public com.google.protobuf.Struct getEnvironment() {
        if (environmentBuilder_ == null) {
          return environment_ == null ? com.google.protobuf.Struct.getDefaultInstance() : environment_;
        } else {
          return environmentBuilder_.getMessage();
        }
      }
      /**
       * <code>.google.protobuf.Struct environment = 5;</code>
       */
      public Builder setEnvironment(com.google.protobuf.Struct value) {
        if (environmentBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          environment_ = value;
        } else {
          environmentBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000010;
        onChanged();
        return this;
      }
      /**
       * <code>.google.protobuf.Struct environment = 5;</code>
       */
      public Builder setEnvironment(
          com.google.protobuf.Struct.Builder builderForValue) {
        if (environmentBuilder_ == null) {
          environment_ = builderForValue.build();
        } else {
          environmentBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000010;
        onChanged();
        return this;
      }
      /**
       * <code>.google.protobuf.Struct environment = 5;</code>
       */
      public Builder mergeEnvironment(com.google.protobuf.Struct value) {
        if (environmentBuilder_ == null) {
          if (((bitField0_ & 0x00000010) != 0) &&
            environment_ != null &&
            environment_ != com.google.protobuf.Struct.getDefaultInstance()) {
            getEnvironmentBuilder().mergeFrom(value);
          } else {
            environment_ = value;
          }
        } else {
          environmentBuilder_.mergeFrom(value);
        }
        if (environment_ != null) {
          bitField0_ |= 0x00000010;
          onChanged();
        }
        return this;
      }
      /**
       * <code>.google.protobuf.Struct environment = 5;</code>
       */
      public Builder clearEnvironment() {
        bitField0_ = (bitField0_ & ~0x00000010);
        environment_ = null;
        if (environmentBuilder_ != null) {
          environmentBuilder_.dispose();
          environmentBuilder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       * <code>.google.protobuf.Struct environment = 5;</code>
       */
      public com.google.protobuf.Struct.Builder getEnvironmentBuilder() {
        bitField0_ |= 0x00000010;
        onChanged();
        return getEnvironmentFieldBuilder().getBuilder();
      }
      /**
       * <code>.google.protobuf.Struct environment = 5;</code>
       */
      public com.google.protobuf.StructOrBuilder getEnvironmentOrBuilder() {
        if (environmentBuilder_ != null) {
          return environmentBuilder_.getMessageOrBuilder();
        } else {
          return environment_ == null ?
              com.google.protobuf.Struct.getDefaultInstance() : environment_;
        }
      }
      /**
       * <code>.google.protobuf.Struct environment = 5;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> 
          getEnvironmentFieldBuilder() {
        if (environmentBuilder_ == null) {
          environmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>(
                  getEnvironment(),
                  getParentForChildren(),
                  isClean());
          environment_ = null;
        }
        return environmentBuilder_;
      }
      @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.predicates.link.v0.Link)
    }

    // @@protoc_insertion_point(class_scope:in_toto_attestation.predicates.link.v0.Link)
    private static final io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link();
    }

    public static io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public io.github.intoto.attestation.predicates.link.v0.LinkOuterClass.Link getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_in_toto_attestation_predicates_link_v0_Link_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_in_toto_attestation_predicates_link_v0_Link_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n1in_toto_attestation/predicates/link/v0" +
      "/link.proto\022&in_toto_attestation.predica" +
      "tes.link.v0\0320in_toto_attestation/v1/reso" +
      "urce_descriptor.proto\032\034google/protobuf/s" +
      "truct.proto\"\277\001\n\004Link\022\014\n\004name\030\001 \001(\t\022\017\n\007co" +
      "mmand\030\002 \003(\t\022=\n\tmaterials\030\003 \003(\0132*.in_toto" +
      "_attestation.v1.ResourceDescriptor\022+\n\nby" +
      "products\030\004 \001(\0132\027.google.protobuf.Struct\022" +
      ",\n\013environment\030\005 \001(\0132\027.google.protobuf.S" +
      "tructBg\n/io.github.intoto.attestation.pr" +
      "edicates.link.v0Z4github.com/in-toto/att" +
      "estation/go/predicates/link/v0b\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.getDescriptor(),
          com.google.protobuf.StructProto.getDescriptor(),
        });
    internal_static_in_toto_attestation_predicates_link_v0_Link_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_in_toto_attestation_predicates_link_v0_Link_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_in_toto_attestation_predicates_link_v0_Link_descriptor,
        new java.lang.String[] { "Name", "Command", "Materials", "Byproducts", "Environment", });
    io.github.intoto.attestation.v1.ResourceDescriptorOuterClass.getDescriptor();
    com.google.protobuf.StructProto.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
