TrustBundle.java

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

package dev.sigstore.fulcio.v2;

/**
 * Protobuf type {@code dev.sigstore.fulcio.v2.TrustBundle}
 */
@javax.annotation.Generated(value="protoc", comments="annotations:TrustBundle.java.pb.meta")
public final class TrustBundle extends
    com.google.protobuf.GeneratedMessage implements
    // @@protoc_insertion_point(message_implements:dev.sigstore.fulcio.v2.TrustBundle)
    TrustBundleOrBuilder {
private static final long serialVersionUID = 0L;
  static {
    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
      /* major= */ 4,
      /* minor= */ 30,
      /* patch= */ 2,
      /* suffix= */ "",
      TrustBundle.class.getName());
  }
  // Use TrustBundle.newBuilder() to construct.
  private TrustBundle(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
    super(builder);
  }
  private TrustBundle() {
    chains_ = java.util.Collections.emptyList();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return dev.sigstore.fulcio.v2.FulcioProto.internal_static_dev_sigstore_fulcio_v2_TrustBundle_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return dev.sigstore.fulcio.v2.FulcioProto.internal_static_dev_sigstore_fulcio_v2_TrustBundle_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            dev.sigstore.fulcio.v2.TrustBundle.class, dev.sigstore.fulcio.v2.TrustBundle.Builder.class);
  }

  public static final int CHAINS_FIELD_NUMBER = 1;
  @SuppressWarnings("serial")
  private java.util.List<dev.sigstore.fulcio.v2.CertificateChain> chains_;
  /**
   * <pre>
   *
   * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
   * intermediate certificates (if present), finishing with the root certificate.
   * </pre>
   *
   * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
   */
  @java.lang.Override
  public java.util.List<dev.sigstore.fulcio.v2.CertificateChain> getChainsList() {
    return chains_;
  }
  /**
   * <pre>
   *
   * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
   * intermediate certificates (if present), finishing with the root certificate.
   * </pre>
   *
   * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
   */
  @java.lang.Override
  public java.util.List<? extends dev.sigstore.fulcio.v2.CertificateChainOrBuilder> 
      getChainsOrBuilderList() {
    return chains_;
  }
  /**
   * <pre>
   *
   * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
   * intermediate certificates (if present), finishing with the root certificate.
   * </pre>
   *
   * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
   */
  @java.lang.Override
  public int getChainsCount() {
    return chains_.size();
  }
  /**
   * <pre>
   *
   * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
   * intermediate certificates (if present), finishing with the root certificate.
   * </pre>
   *
   * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
   */
  @java.lang.Override
  public dev.sigstore.fulcio.v2.CertificateChain getChains(int index) {
    return chains_.get(index);
  }
  /**
   * <pre>
   *
   * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
   * intermediate certificates (if present), finishing with the root certificate.
   * </pre>
   *
   * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
   */
  @java.lang.Override
  public dev.sigstore.fulcio.v2.CertificateChainOrBuilder getChainsOrBuilder(
      int index) {
    return chains_.get(index);
  }

  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 {
    for (int i = 0; i < chains_.size(); i++) {
      output.writeMessage(1, chains_.get(i));
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    for (int i = 0; i < chains_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, chains_.get(i));
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof dev.sigstore.fulcio.v2.TrustBundle)) {
      return super.equals(obj);
    }
    dev.sigstore.fulcio.v2.TrustBundle other = (dev.sigstore.fulcio.v2.TrustBundle) obj;

    if (!getChainsList()
        .equals(other.getChainsList())) 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();
    if (getChainsCount() > 0) {
      hash = (37 * hash) + CHAINS_FIELD_NUMBER;
      hash = (53 * hash) + getChainsList().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public static dev.sigstore.fulcio.v2.TrustBundle parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input);
  }

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

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(dev.sigstore.fulcio.v2.TrustBundle prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code dev.sigstore.fulcio.v2.TrustBundle}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessage.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:dev.sigstore.fulcio.v2.TrustBundle)
      dev.sigstore.fulcio.v2.TrustBundleOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return dev.sigstore.fulcio.v2.FulcioProto.internal_static_dev_sigstore_fulcio_v2_TrustBundle_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return dev.sigstore.fulcio.v2.FulcioProto.internal_static_dev_sigstore_fulcio_v2_TrustBundle_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              dev.sigstore.fulcio.v2.TrustBundle.class, dev.sigstore.fulcio.v2.TrustBundle.Builder.class);
    }

    // Construct using dev.sigstore.fulcio.v2.TrustBundle.newBuilder()
    private Builder() {

    }

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

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (chainsBuilder_ == null) {
        chains_ = java.util.Collections.emptyList();
      } else {
        chains_ = null;
        chainsBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return dev.sigstore.fulcio.v2.FulcioProto.internal_static_dev_sigstore_fulcio_v2_TrustBundle_descriptor;
    }

    @java.lang.Override
    public dev.sigstore.fulcio.v2.TrustBundle getDefaultInstanceForType() {
      return dev.sigstore.fulcio.v2.TrustBundle.getDefaultInstance();
    }

    @java.lang.Override
    public dev.sigstore.fulcio.v2.TrustBundle build() {
      dev.sigstore.fulcio.v2.TrustBundle result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public dev.sigstore.fulcio.v2.TrustBundle buildPartial() {
      dev.sigstore.fulcio.v2.TrustBundle result = new dev.sigstore.fulcio.v2.TrustBundle(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(dev.sigstore.fulcio.v2.TrustBundle result) {
      if (chainsBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          chains_ = java.util.Collections.unmodifiableList(chains_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.chains_ = chains_;
      } else {
        result.chains_ = chainsBuilder_.build();
      }
    }

    private void buildPartial0(dev.sigstore.fulcio.v2.TrustBundle result) {
      int from_bitField0_ = bitField0_;
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof dev.sigstore.fulcio.v2.TrustBundle) {
        return mergeFrom((dev.sigstore.fulcio.v2.TrustBundle)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(dev.sigstore.fulcio.v2.TrustBundle other) {
      if (other == dev.sigstore.fulcio.v2.TrustBundle.getDefaultInstance()) return this;
      if (chainsBuilder_ == null) {
        if (!other.chains_.isEmpty()) {
          if (chains_.isEmpty()) {
            chains_ = other.chains_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureChainsIsMutable();
            chains_.addAll(other.chains_);
          }
          onChanged();
        }
      } else {
        if (!other.chains_.isEmpty()) {
          if (chainsBuilder_.isEmpty()) {
            chainsBuilder_.dispose();
            chainsBuilder_ = null;
            chains_ = other.chains_;
            bitField0_ = (bitField0_ & ~0x00000001);
            chainsBuilder_ = 
              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                 internalGetChainsFieldBuilder() : null;
          } else {
            chainsBuilder_.addAllMessages(other.chains_);
          }
        }
      }
      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: {
              dev.sigstore.fulcio.v2.CertificateChain m =
                  input.readMessage(
                      dev.sigstore.fulcio.v2.CertificateChain.parser(),
                      extensionRegistry);
              if (chainsBuilder_ == null) {
                ensureChainsIsMutable();
                chains_.add(m);
              } else {
                chainsBuilder_.addMessage(m);
              }
              break;
            } // case 10
            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.util.List<dev.sigstore.fulcio.v2.CertificateChain> chains_ =
      java.util.Collections.emptyList();
    private void ensureChainsIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        chains_ = new java.util.ArrayList<dev.sigstore.fulcio.v2.CertificateChain>(chains_);
        bitField0_ |= 0x00000001;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilder<
        dev.sigstore.fulcio.v2.CertificateChain, dev.sigstore.fulcio.v2.CertificateChain.Builder, dev.sigstore.fulcio.v2.CertificateChainOrBuilder> chainsBuilder_;

    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public java.util.List<dev.sigstore.fulcio.v2.CertificateChain> getChainsList() {
      if (chainsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(chains_);
      } else {
        return chainsBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public int getChainsCount() {
      if (chainsBuilder_ == null) {
        return chains_.size();
      } else {
        return chainsBuilder_.getCount();
      }
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public dev.sigstore.fulcio.v2.CertificateChain getChains(int index) {
      if (chainsBuilder_ == null) {
        return chains_.get(index);
      } else {
        return chainsBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public Builder setChains(
        int index, dev.sigstore.fulcio.v2.CertificateChain value) {
      if (chainsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureChainsIsMutable();
        chains_.set(index, value);
        onChanged();
      } else {
        chainsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public Builder setChains(
        int index, dev.sigstore.fulcio.v2.CertificateChain.Builder builderForValue) {
      if (chainsBuilder_ == null) {
        ensureChainsIsMutable();
        chains_.set(index, builderForValue.build());
        onChanged();
      } else {
        chainsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public Builder addChains(dev.sigstore.fulcio.v2.CertificateChain value) {
      if (chainsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureChainsIsMutable();
        chains_.add(value);
        onChanged();
      } else {
        chainsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public Builder addChains(
        int index, dev.sigstore.fulcio.v2.CertificateChain value) {
      if (chainsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureChainsIsMutable();
        chains_.add(index, value);
        onChanged();
      } else {
        chainsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public Builder addChains(
        dev.sigstore.fulcio.v2.CertificateChain.Builder builderForValue) {
      if (chainsBuilder_ == null) {
        ensureChainsIsMutable();
        chains_.add(builderForValue.build());
        onChanged();
      } else {
        chainsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public Builder addChains(
        int index, dev.sigstore.fulcio.v2.CertificateChain.Builder builderForValue) {
      if (chainsBuilder_ == null) {
        ensureChainsIsMutable();
        chains_.add(index, builderForValue.build());
        onChanged();
      } else {
        chainsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public Builder addAllChains(
        java.lang.Iterable<? extends dev.sigstore.fulcio.v2.CertificateChain> values) {
      if (chainsBuilder_ == null) {
        ensureChainsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, chains_);
        onChanged();
      } else {
        chainsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public Builder clearChains() {
      if (chainsBuilder_ == null) {
        chains_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        chainsBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public Builder removeChains(int index) {
      if (chainsBuilder_ == null) {
        ensureChainsIsMutable();
        chains_.remove(index);
        onChanged();
      } else {
        chainsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public dev.sigstore.fulcio.v2.CertificateChain.Builder getChainsBuilder(
        int index) {
      return internalGetChainsFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public dev.sigstore.fulcio.v2.CertificateChainOrBuilder getChainsOrBuilder(
        int index) {
      if (chainsBuilder_ == null) {
        return chains_.get(index);  } else {
        return chainsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public java.util.List<? extends dev.sigstore.fulcio.v2.CertificateChainOrBuilder> 
         getChainsOrBuilderList() {
      if (chainsBuilder_ != null) {
        return chainsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(chains_);
      }
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public dev.sigstore.fulcio.v2.CertificateChain.Builder addChainsBuilder() {
      return internalGetChainsFieldBuilder().addBuilder(
          dev.sigstore.fulcio.v2.CertificateChain.getDefaultInstance());
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public dev.sigstore.fulcio.v2.CertificateChain.Builder addChainsBuilder(
        int index) {
      return internalGetChainsFieldBuilder().addBuilder(
          index, dev.sigstore.fulcio.v2.CertificateChain.getDefaultInstance());
    }
    /**
     * <pre>
     *
     * The set of PEM-encoded certificate chains for this Fulcio instance; each chain will start with any
     * intermediate certificates (if present), finishing with the root certificate.
     * </pre>
     *
     * <code>repeated .dev.sigstore.fulcio.v2.CertificateChain chains = 1;</code>
     */
    public java.util.List<dev.sigstore.fulcio.v2.CertificateChain.Builder> 
         getChainsBuilderList() {
      return internalGetChainsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilder<
        dev.sigstore.fulcio.v2.CertificateChain, dev.sigstore.fulcio.v2.CertificateChain.Builder, dev.sigstore.fulcio.v2.CertificateChainOrBuilder> 
        internalGetChainsFieldBuilder() {
      if (chainsBuilder_ == null) {
        chainsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
            dev.sigstore.fulcio.v2.CertificateChain, dev.sigstore.fulcio.v2.CertificateChain.Builder, dev.sigstore.fulcio.v2.CertificateChainOrBuilder>(
                chains_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        chains_ = null;
      }
      return chainsBuilder_;
    }

    // @@protoc_insertion_point(builder_scope:dev.sigstore.fulcio.v2.TrustBundle)
  }

  // @@protoc_insertion_point(class_scope:dev.sigstore.fulcio.v2.TrustBundle)
  private static final dev.sigstore.fulcio.v2.TrustBundle DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new dev.sigstore.fulcio.v2.TrustBundle();
  }

  public static dev.sigstore.fulcio.v2.TrustBundle getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

  @java.lang.Override
  public dev.sigstore.fulcio.v2.TrustBundle getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}