CertificateAuthority.java

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

package dev.sigstore.proto.trustroot.v1;

/**
 * <pre>
 * CertificateAuthority enlists the information required to identify which
 * CA to use and perform signature verification.
 * </pre>
 *
 * Protobuf type {@code dev.sigstore.trustroot.v1.CertificateAuthority}
 */
@javax.annotation.Generated(value="protoc", comments="annotations:CertificateAuthority.java.pb.meta")
public final class CertificateAuthority extends
    com.google.protobuf.GeneratedMessage implements
    // @@protoc_insertion_point(message_implements:dev.sigstore.trustroot.v1.CertificateAuthority)
    CertificateAuthorityOrBuilder {
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= */ "",
      CertificateAuthority.class.getName());
  }
  // Use CertificateAuthority.newBuilder() to construct.
  private CertificateAuthority(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
    super(builder);
  }
  private CertificateAuthority() {
    uri_ = "";
    operator_ = "";
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return dev.sigstore.proto.trustroot.v1.TrustRootProto.internal_static_dev_sigstore_trustroot_v1_CertificateAuthority_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return dev.sigstore.proto.trustroot.v1.TrustRootProto.internal_static_dev_sigstore_trustroot_v1_CertificateAuthority_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            dev.sigstore.proto.trustroot.v1.CertificateAuthority.class, dev.sigstore.proto.trustroot.v1.CertificateAuthority.Builder.class);
  }

  private int bitField0_;
  public static final int SUBJECT_FIELD_NUMBER = 1;
  private dev.sigstore.proto.common.v1.DistinguishedName subject_;
  /**
   * <pre>
   * The root certificate MUST be self-signed, and so the subject and
   * issuer are the same.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.DistinguishedName subject = 1;</code>
   * @return Whether the subject field is set.
   */
  @java.lang.Override
  public boolean hasSubject() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * <pre>
   * The root certificate MUST be self-signed, and so the subject and
   * issuer are the same.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.DistinguishedName subject = 1;</code>
   * @return The subject.
   */
  @java.lang.Override
  public dev.sigstore.proto.common.v1.DistinguishedName getSubject() {
    return subject_ == null ? dev.sigstore.proto.common.v1.DistinguishedName.getDefaultInstance() : subject_;
  }
  /**
   * <pre>
   * The root certificate MUST be self-signed, and so the subject and
   * issuer are the same.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.DistinguishedName subject = 1;</code>
   */
  @java.lang.Override
  public dev.sigstore.proto.common.v1.DistinguishedNameOrBuilder getSubjectOrBuilder() {
    return subject_ == null ? dev.sigstore.proto.common.v1.DistinguishedName.getDefaultInstance() : subject_;
  }

  public static final int URI_FIELD_NUMBER = 2;
  @SuppressWarnings("serial")
  private volatile java.lang.Object uri_ = "";
  /**
   * <pre>
   * The URI identifies the certificate authority.
   *
   * It is RECOMMENDED that the URI is the base URL for the certificate
   * authority, that can be provided to any SDK/client provided
   * by the certificate authority to interact with the certificate
   * authority.
   * </pre>
   *
   * <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;
    }
  }
  /**
   * <pre>
   * The URI identifies the certificate authority.
   *
   * It is RECOMMENDED that the URI is the base URL for the certificate
   * authority, that can be provided to any SDK/client provided
   * by the certificate authority to interact with the certificate
   * authority.
   * </pre>
   *
   * <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 CERT_CHAIN_FIELD_NUMBER = 3;
  private dev.sigstore.proto.common.v1.X509CertificateChain certChain_;
  /**
   * <pre>
   * The certificate chain for this CA. The last certificate in the chain
   * MUST be the trust anchor. The trust anchor MAY be a self-signed root
   * CA certificate or MAY be an intermediate CA certificate.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.X509CertificateChain cert_chain = 3;</code>
   * @return Whether the certChain field is set.
   */
  @java.lang.Override
  public boolean hasCertChain() {
    return ((bitField0_ & 0x00000002) != 0);
  }
  /**
   * <pre>
   * The certificate chain for this CA. The last certificate in the chain
   * MUST be the trust anchor. The trust anchor MAY be a self-signed root
   * CA certificate or MAY be an intermediate CA certificate.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.X509CertificateChain cert_chain = 3;</code>
   * @return The certChain.
   */
  @java.lang.Override
  public dev.sigstore.proto.common.v1.X509CertificateChain getCertChain() {
    return certChain_ == null ? dev.sigstore.proto.common.v1.X509CertificateChain.getDefaultInstance() : certChain_;
  }
  /**
   * <pre>
   * The certificate chain for this CA. The last certificate in the chain
   * MUST be the trust anchor. The trust anchor MAY be a self-signed root
   * CA certificate or MAY be an intermediate CA certificate.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.X509CertificateChain cert_chain = 3;</code>
   */
  @java.lang.Override
  public dev.sigstore.proto.common.v1.X509CertificateChainOrBuilder getCertChainOrBuilder() {
    return certChain_ == null ? dev.sigstore.proto.common.v1.X509CertificateChain.getDefaultInstance() : certChain_;
  }

  public static final int VALID_FOR_FIELD_NUMBER = 4;
  private dev.sigstore.proto.common.v1.TimeRange validFor_;
  /**
   * <pre>
   * The time the *entire* chain was valid. This is at max the
   * longest interval when *all* certificates in the chain were valid,
   * but it MAY be shorter. Clients MUST check timestamps against *both*
   * the `valid_for` time range *and* the entire certificate chain.
   *
   * The TimeRange should be considered valid *inclusive* of the
   * endpoints.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.TimeRange valid_for = 4;</code>
   * @return Whether the validFor field is set.
   */
  @java.lang.Override
  public boolean hasValidFor() {
    return ((bitField0_ & 0x00000004) != 0);
  }
  /**
   * <pre>
   * The time the *entire* chain was valid. This is at max the
   * longest interval when *all* certificates in the chain were valid,
   * but it MAY be shorter. Clients MUST check timestamps against *both*
   * the `valid_for` time range *and* the entire certificate chain.
   *
   * The TimeRange should be considered valid *inclusive* of the
   * endpoints.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.TimeRange valid_for = 4;</code>
   * @return The validFor.
   */
  @java.lang.Override
  public dev.sigstore.proto.common.v1.TimeRange getValidFor() {
    return validFor_ == null ? dev.sigstore.proto.common.v1.TimeRange.getDefaultInstance() : validFor_;
  }
  /**
   * <pre>
   * The time the *entire* chain was valid. This is at max the
   * longest interval when *all* certificates in the chain were valid,
   * but it MAY be shorter. Clients MUST check timestamps against *both*
   * the `valid_for` time range *and* the entire certificate chain.
   *
   * The TimeRange should be considered valid *inclusive* of the
   * endpoints.
   * </pre>
   *
   * <code>.dev.sigstore.common.v1.TimeRange valid_for = 4;</code>
   */
  @java.lang.Override
  public dev.sigstore.proto.common.v1.TimeRangeOrBuilder getValidForOrBuilder() {
    return validFor_ == null ? dev.sigstore.proto.common.v1.TimeRange.getDefaultInstance() : validFor_;
  }

  public static final int OPERATOR_FIELD_NUMBER = 5;
  @SuppressWarnings("serial")
  private volatile java.lang.Object operator_ = "";
  /**
   * <pre>
   * The name of the operator of this certificate or timestamp authority.
   * Operator MUST be formatted as a scheme-less URI, e.g. sigstore.dev
   * This MUST be used when there are multiple timestamp authorities to
   * determine if the signed timestamp verification meets a specified
   * threshold, e.g. two signed timestamps from timestamp authorities
   * operated by the same operator should count as only one valid
   * timestamp.
   * </pre>
   *
   * <code>string operator = 5;</code>
   * @return The operator.
   */
  @java.lang.Override
  public java.lang.String getOperator() {
    java.lang.Object ref = operator_;
    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();
      operator_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The name of the operator of this certificate or timestamp authority.
   * Operator MUST be formatted as a scheme-less URI, e.g. sigstore.dev
   * This MUST be used when there are multiple timestamp authorities to
   * determine if the signed timestamp verification meets a specified
   * threshold, e.g. two signed timestamps from timestamp authorities
   * operated by the same operator should count as only one valid
   * timestamp.
   * </pre>
   *
   * <code>string operator = 5;</code>
   * @return The bytes for operator.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getOperatorBytes() {
    java.lang.Object ref = operator_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      operator_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  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 (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(1, getSubject());
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 2, uri_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      output.writeMessage(3, getCertChain());
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      output.writeMessage(4, getValidFor());
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operator_)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 5, operator_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getSubject());
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uri_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getCertChain());
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, getValidFor());
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operator_)) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(5, operator_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

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

    if (hasSubject() != other.hasSubject()) return false;
    if (hasSubject()) {
      if (!getSubject()
          .equals(other.getSubject())) return false;
    }
    if (!getUri()
        .equals(other.getUri())) return false;
    if (hasCertChain() != other.hasCertChain()) return false;
    if (hasCertChain()) {
      if (!getCertChain()
          .equals(other.getCertChain())) return false;
    }
    if (hasValidFor() != other.hasValidFor()) return false;
    if (hasValidFor()) {
      if (!getValidFor()
          .equals(other.getValidFor())) return false;
    }
    if (!getOperator()
        .equals(other.getOperator())) 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 (hasSubject()) {
      hash = (37 * hash) + SUBJECT_FIELD_NUMBER;
      hash = (53 * hash) + getSubject().hashCode();
    }
    hash = (37 * hash) + URI_FIELD_NUMBER;
    hash = (53 * hash) + getUri().hashCode();
    if (hasCertChain()) {
      hash = (37 * hash) + CERT_CHAIN_FIELD_NUMBER;
      hash = (53 * hash) + getCertChain().hashCode();
    }
    if (hasValidFor()) {
      hash = (37 * hash) + VALID_FOR_FIELD_NUMBER;
      hash = (53 * hash) + getValidFor().hashCode();
    }
    hash = (37 * hash) + OPERATOR_FIELD_NUMBER;
    hash = (53 * hash) + getOperator().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   * CertificateAuthority enlists the information required to identify which
   * CA to use and perform signature verification.
   * </pre>
   *
   * Protobuf type {@code dev.sigstore.trustroot.v1.CertificateAuthority}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessage.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:dev.sigstore.trustroot.v1.CertificateAuthority)
      dev.sigstore.proto.trustroot.v1.CertificateAuthorityOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return dev.sigstore.proto.trustroot.v1.TrustRootProto.internal_static_dev_sigstore_trustroot_v1_CertificateAuthority_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return dev.sigstore.proto.trustroot.v1.TrustRootProto.internal_static_dev_sigstore_trustroot_v1_CertificateAuthority_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              dev.sigstore.proto.trustroot.v1.CertificateAuthority.class, dev.sigstore.proto.trustroot.v1.CertificateAuthority.Builder.class);
    }

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

    private Builder(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessage
              .alwaysUseFieldBuilders) {
        internalGetSubjectFieldBuilder();
        internalGetCertChainFieldBuilder();
        internalGetValidForFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      subject_ = null;
      if (subjectBuilder_ != null) {
        subjectBuilder_.dispose();
        subjectBuilder_ = null;
      }
      uri_ = "";
      certChain_ = null;
      if (certChainBuilder_ != null) {
        certChainBuilder_.dispose();
        certChainBuilder_ = null;
      }
      validFor_ = null;
      if (validForBuilder_ != null) {
        validForBuilder_.dispose();
        validForBuilder_ = null;
      }
      operator_ = "";
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return dev.sigstore.proto.trustroot.v1.TrustRootProto.internal_static_dev_sigstore_trustroot_v1_CertificateAuthority_descriptor;
    }

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

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

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

    private void buildPartial0(dev.sigstore.proto.trustroot.v1.CertificateAuthority result) {
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.subject_ = subjectBuilder_ == null
            ? subject_
            : subjectBuilder_.build();
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.uri_ = uri_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.certChain_ = certChainBuilder_ == null
            ? certChain_
            : certChainBuilder_.build();
        to_bitField0_ |= 0x00000002;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.validFor_ = validForBuilder_ == null
            ? validFor_
            : validForBuilder_.build();
        to_bitField0_ |= 0x00000004;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.operator_ = operator_;
      }
      result.bitField0_ |= to_bitField0_;
    }

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

    public Builder mergeFrom(dev.sigstore.proto.trustroot.v1.CertificateAuthority other) {
      if (other == dev.sigstore.proto.trustroot.v1.CertificateAuthority.getDefaultInstance()) return this;
      if (other.hasSubject()) {
        mergeSubject(other.getSubject());
      }
      if (!other.getUri().isEmpty()) {
        uri_ = other.uri_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      if (other.hasCertChain()) {
        mergeCertChain(other.getCertChain());
      }
      if (other.hasValidFor()) {
        mergeValidFor(other.getValidFor());
      }
      if (!other.getOperator().isEmpty()) {
        operator_ = other.operator_;
        bitField0_ |= 0x00000010;
        onChanged();
      }
      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: {
              input.readMessage(
                  internalGetSubjectFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000001;
              break;
            } // case 10
            case 18: {
              uri_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000002;
              break;
            } // case 18
            case 26: {
              input.readMessage(
                  internalGetCertChainFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000004;
              break;
            } // case 26
            case 34: {
              input.readMessage(
                  internalGetValidForFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000008;
              break;
            } // case 34
            case 42: {
              operator_ = input.readStringRequireUtf8();
              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 dev.sigstore.proto.common.v1.DistinguishedName subject_;
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.common.v1.DistinguishedName, dev.sigstore.proto.common.v1.DistinguishedName.Builder, dev.sigstore.proto.common.v1.DistinguishedNameOrBuilder> subjectBuilder_;
    /**
     * <pre>
     * The root certificate MUST be self-signed, and so the subject and
     * issuer are the same.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.DistinguishedName subject = 1;</code>
     * @return Whether the subject field is set.
     */
    public boolean hasSubject() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * The root certificate MUST be self-signed, and so the subject and
     * issuer are the same.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.DistinguishedName subject = 1;</code>
     * @return The subject.
     */
    public dev.sigstore.proto.common.v1.DistinguishedName getSubject() {
      if (subjectBuilder_ == null) {
        return subject_ == null ? dev.sigstore.proto.common.v1.DistinguishedName.getDefaultInstance() : subject_;
      } else {
        return subjectBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The root certificate MUST be self-signed, and so the subject and
     * issuer are the same.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.DistinguishedName subject = 1;</code>
     */
    public Builder setSubject(dev.sigstore.proto.common.v1.DistinguishedName value) {
      if (subjectBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        subject_ = value;
      } else {
        subjectBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The root certificate MUST be self-signed, and so the subject and
     * issuer are the same.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.DistinguishedName subject = 1;</code>
     */
    public Builder setSubject(
        dev.sigstore.proto.common.v1.DistinguishedName.Builder builderForValue) {
      if (subjectBuilder_ == null) {
        subject_ = builderForValue.build();
      } else {
        subjectBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The root certificate MUST be self-signed, and so the subject and
     * issuer are the same.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.DistinguishedName subject = 1;</code>
     */
    public Builder mergeSubject(dev.sigstore.proto.common.v1.DistinguishedName value) {
      if (subjectBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0) &&
          subject_ != null &&
          subject_ != dev.sigstore.proto.common.v1.DistinguishedName.getDefaultInstance()) {
          getSubjectBuilder().mergeFrom(value);
        } else {
          subject_ = value;
        }
      } else {
        subjectBuilder_.mergeFrom(value);
      }
      if (subject_ != null) {
        bitField0_ |= 0x00000001;
        onChanged();
      }
      return this;
    }
    /**
     * <pre>
     * The root certificate MUST be self-signed, and so the subject and
     * issuer are the same.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.DistinguishedName subject = 1;</code>
     */
    public Builder clearSubject() {
      bitField0_ = (bitField0_ & ~0x00000001);
      subject_ = null;
      if (subjectBuilder_ != null) {
        subjectBuilder_.dispose();
        subjectBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The root certificate MUST be self-signed, and so the subject and
     * issuer are the same.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.DistinguishedName subject = 1;</code>
     */
    public dev.sigstore.proto.common.v1.DistinguishedName.Builder getSubjectBuilder() {
      bitField0_ |= 0x00000001;
      onChanged();
      return internalGetSubjectFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The root certificate MUST be self-signed, and so the subject and
     * issuer are the same.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.DistinguishedName subject = 1;</code>
     */
    public dev.sigstore.proto.common.v1.DistinguishedNameOrBuilder getSubjectOrBuilder() {
      if (subjectBuilder_ != null) {
        return subjectBuilder_.getMessageOrBuilder();
      } else {
        return subject_ == null ?
            dev.sigstore.proto.common.v1.DistinguishedName.getDefaultInstance() : subject_;
      }
    }
    /**
     * <pre>
     * The root certificate MUST be self-signed, and so the subject and
     * issuer are the same.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.DistinguishedName subject = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.common.v1.DistinguishedName, dev.sigstore.proto.common.v1.DistinguishedName.Builder, dev.sigstore.proto.common.v1.DistinguishedNameOrBuilder> 
        internalGetSubjectFieldBuilder() {
      if (subjectBuilder_ == null) {
        subjectBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            dev.sigstore.proto.common.v1.DistinguishedName, dev.sigstore.proto.common.v1.DistinguishedName.Builder, dev.sigstore.proto.common.v1.DistinguishedNameOrBuilder>(
                getSubject(),
                getParentForChildren(),
                isClean());
        subject_ = null;
      }
      return subjectBuilder_;
    }

    private java.lang.Object uri_ = "";
    /**
     * <pre>
     * The URI identifies the certificate authority.
     *
     * It is RECOMMENDED that the URI is the base URL for the certificate
     * authority, that can be provided to any SDK/client provided
     * by the certificate authority to interact with the certificate
     * authority.
     * </pre>
     *
     * <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;
      }
    }
    /**
     * <pre>
     * The URI identifies the certificate authority.
     *
     * It is RECOMMENDED that the URI is the base URL for the certificate
     * authority, that can be provided to any SDK/client provided
     * by the certificate authority to interact with the certificate
     * authority.
     * </pre>
     *
     * <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;
      }
    }
    /**
     * <pre>
     * The URI identifies the certificate authority.
     *
     * It is RECOMMENDED that the URI is the base URL for the certificate
     * authority, that can be provided to any SDK/client provided
     * by the certificate authority to interact with the certificate
     * authority.
     * </pre>
     *
     * <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;
    }
    /**
     * <pre>
     * The URI identifies the certificate authority.
     *
     * It is RECOMMENDED that the URI is the base URL for the certificate
     * authority, that can be provided to any SDK/client provided
     * by the certificate authority to interact with the certificate
     * authority.
     * </pre>
     *
     * <code>string uri = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearUri() {
      uri_ = getDefaultInstance().getUri();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The URI identifies the certificate authority.
     *
     * It is RECOMMENDED that the URI is the base URL for the certificate
     * authority, that can be provided to any SDK/client provided
     * by the certificate authority to interact with the certificate
     * authority.
     * </pre>
     *
     * <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 dev.sigstore.proto.common.v1.X509CertificateChain certChain_;
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.common.v1.X509CertificateChain, dev.sigstore.proto.common.v1.X509CertificateChain.Builder, dev.sigstore.proto.common.v1.X509CertificateChainOrBuilder> certChainBuilder_;
    /**
     * <pre>
     * The certificate chain for this CA. The last certificate in the chain
     * MUST be the trust anchor. The trust anchor MAY be a self-signed root
     * CA certificate or MAY be an intermediate CA certificate.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.X509CertificateChain cert_chain = 3;</code>
     * @return Whether the certChain field is set.
     */
    public boolean hasCertChain() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     * <pre>
     * The certificate chain for this CA. The last certificate in the chain
     * MUST be the trust anchor. The trust anchor MAY be a self-signed root
     * CA certificate or MAY be an intermediate CA certificate.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.X509CertificateChain cert_chain = 3;</code>
     * @return The certChain.
     */
    public dev.sigstore.proto.common.v1.X509CertificateChain getCertChain() {
      if (certChainBuilder_ == null) {
        return certChain_ == null ? dev.sigstore.proto.common.v1.X509CertificateChain.getDefaultInstance() : certChain_;
      } else {
        return certChainBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The certificate chain for this CA. The last certificate in the chain
     * MUST be the trust anchor. The trust anchor MAY be a self-signed root
     * CA certificate or MAY be an intermediate CA certificate.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.X509CertificateChain cert_chain = 3;</code>
     */
    public Builder setCertChain(dev.sigstore.proto.common.v1.X509CertificateChain value) {
      if (certChainBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        certChain_ = value;
      } else {
        certChainBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The certificate chain for this CA. The last certificate in the chain
     * MUST be the trust anchor. The trust anchor MAY be a self-signed root
     * CA certificate or MAY be an intermediate CA certificate.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.X509CertificateChain cert_chain = 3;</code>
     */
    public Builder setCertChain(
        dev.sigstore.proto.common.v1.X509CertificateChain.Builder builderForValue) {
      if (certChainBuilder_ == null) {
        certChain_ = builderForValue.build();
      } else {
        certChainBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The certificate chain for this CA. The last certificate in the chain
     * MUST be the trust anchor. The trust anchor MAY be a self-signed root
     * CA certificate or MAY be an intermediate CA certificate.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.X509CertificateChain cert_chain = 3;</code>
     */
    public Builder mergeCertChain(dev.sigstore.proto.common.v1.X509CertificateChain value) {
      if (certChainBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0) &&
          certChain_ != null &&
          certChain_ != dev.sigstore.proto.common.v1.X509CertificateChain.getDefaultInstance()) {
          getCertChainBuilder().mergeFrom(value);
        } else {
          certChain_ = value;
        }
      } else {
        certChainBuilder_.mergeFrom(value);
      }
      if (certChain_ != null) {
        bitField0_ |= 0x00000004;
        onChanged();
      }
      return this;
    }
    /**
     * <pre>
     * The certificate chain for this CA. The last certificate in the chain
     * MUST be the trust anchor. The trust anchor MAY be a self-signed root
     * CA certificate or MAY be an intermediate CA certificate.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.X509CertificateChain cert_chain = 3;</code>
     */
    public Builder clearCertChain() {
      bitField0_ = (bitField0_ & ~0x00000004);
      certChain_ = null;
      if (certChainBuilder_ != null) {
        certChainBuilder_.dispose();
        certChainBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The certificate chain for this CA. The last certificate in the chain
     * MUST be the trust anchor. The trust anchor MAY be a self-signed root
     * CA certificate or MAY be an intermediate CA certificate.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.X509CertificateChain cert_chain = 3;</code>
     */
    public dev.sigstore.proto.common.v1.X509CertificateChain.Builder getCertChainBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return internalGetCertChainFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The certificate chain for this CA. The last certificate in the chain
     * MUST be the trust anchor. The trust anchor MAY be a self-signed root
     * CA certificate or MAY be an intermediate CA certificate.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.X509CertificateChain cert_chain = 3;</code>
     */
    public dev.sigstore.proto.common.v1.X509CertificateChainOrBuilder getCertChainOrBuilder() {
      if (certChainBuilder_ != null) {
        return certChainBuilder_.getMessageOrBuilder();
      } else {
        return certChain_ == null ?
            dev.sigstore.proto.common.v1.X509CertificateChain.getDefaultInstance() : certChain_;
      }
    }
    /**
     * <pre>
     * The certificate chain for this CA. The last certificate in the chain
     * MUST be the trust anchor. The trust anchor MAY be a self-signed root
     * CA certificate or MAY be an intermediate CA certificate.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.X509CertificateChain cert_chain = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.common.v1.X509CertificateChain, dev.sigstore.proto.common.v1.X509CertificateChain.Builder, dev.sigstore.proto.common.v1.X509CertificateChainOrBuilder> 
        internalGetCertChainFieldBuilder() {
      if (certChainBuilder_ == null) {
        certChainBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            dev.sigstore.proto.common.v1.X509CertificateChain, dev.sigstore.proto.common.v1.X509CertificateChain.Builder, dev.sigstore.proto.common.v1.X509CertificateChainOrBuilder>(
                getCertChain(),
                getParentForChildren(),
                isClean());
        certChain_ = null;
      }
      return certChainBuilder_;
    }

    private dev.sigstore.proto.common.v1.TimeRange validFor_;
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.common.v1.TimeRange, dev.sigstore.proto.common.v1.TimeRange.Builder, dev.sigstore.proto.common.v1.TimeRangeOrBuilder> validForBuilder_;
    /**
     * <pre>
     * The time the *entire* chain was valid. This is at max the
     * longest interval when *all* certificates in the chain were valid,
     * but it MAY be shorter. Clients MUST check timestamps against *both*
     * the `valid_for` time range *and* the entire certificate chain.
     *
     * The TimeRange should be considered valid *inclusive* of the
     * endpoints.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.TimeRange valid_for = 4;</code>
     * @return Whether the validFor field is set.
     */
    public boolean hasValidFor() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     * <pre>
     * The time the *entire* chain was valid. This is at max the
     * longest interval when *all* certificates in the chain were valid,
     * but it MAY be shorter. Clients MUST check timestamps against *both*
     * the `valid_for` time range *and* the entire certificate chain.
     *
     * The TimeRange should be considered valid *inclusive* of the
     * endpoints.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.TimeRange valid_for = 4;</code>
     * @return The validFor.
     */
    public dev.sigstore.proto.common.v1.TimeRange getValidFor() {
      if (validForBuilder_ == null) {
        return validFor_ == null ? dev.sigstore.proto.common.v1.TimeRange.getDefaultInstance() : validFor_;
      } else {
        return validForBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The time the *entire* chain was valid. This is at max the
     * longest interval when *all* certificates in the chain were valid,
     * but it MAY be shorter. Clients MUST check timestamps against *both*
     * the `valid_for` time range *and* the entire certificate chain.
     *
     * The TimeRange should be considered valid *inclusive* of the
     * endpoints.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.TimeRange valid_for = 4;</code>
     */
    public Builder setValidFor(dev.sigstore.proto.common.v1.TimeRange value) {
      if (validForBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        validFor_ = value;
      } else {
        validForBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The time the *entire* chain was valid. This is at max the
     * longest interval when *all* certificates in the chain were valid,
     * but it MAY be shorter. Clients MUST check timestamps against *both*
     * the `valid_for` time range *and* the entire certificate chain.
     *
     * The TimeRange should be considered valid *inclusive* of the
     * endpoints.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.TimeRange valid_for = 4;</code>
     */
    public Builder setValidFor(
        dev.sigstore.proto.common.v1.TimeRange.Builder builderForValue) {
      if (validForBuilder_ == null) {
        validFor_ = builderForValue.build();
      } else {
        validForBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The time the *entire* chain was valid. This is at max the
     * longest interval when *all* certificates in the chain were valid,
     * but it MAY be shorter. Clients MUST check timestamps against *both*
     * the `valid_for` time range *and* the entire certificate chain.
     *
     * The TimeRange should be considered valid *inclusive* of the
     * endpoints.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.TimeRange valid_for = 4;</code>
     */
    public Builder mergeValidFor(dev.sigstore.proto.common.v1.TimeRange value) {
      if (validForBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0) &&
          validFor_ != null &&
          validFor_ != dev.sigstore.proto.common.v1.TimeRange.getDefaultInstance()) {
          getValidForBuilder().mergeFrom(value);
        } else {
          validFor_ = value;
        }
      } else {
        validForBuilder_.mergeFrom(value);
      }
      if (validFor_ != null) {
        bitField0_ |= 0x00000008;
        onChanged();
      }
      return this;
    }
    /**
     * <pre>
     * The time the *entire* chain was valid. This is at max the
     * longest interval when *all* certificates in the chain were valid,
     * but it MAY be shorter. Clients MUST check timestamps against *both*
     * the `valid_for` time range *and* the entire certificate chain.
     *
     * The TimeRange should be considered valid *inclusive* of the
     * endpoints.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.TimeRange valid_for = 4;</code>
     */
    public Builder clearValidFor() {
      bitField0_ = (bitField0_ & ~0x00000008);
      validFor_ = null;
      if (validForBuilder_ != null) {
        validForBuilder_.dispose();
        validForBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The time the *entire* chain was valid. This is at max the
     * longest interval when *all* certificates in the chain were valid,
     * but it MAY be shorter. Clients MUST check timestamps against *both*
     * the `valid_for` time range *and* the entire certificate chain.
     *
     * The TimeRange should be considered valid *inclusive* of the
     * endpoints.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.TimeRange valid_for = 4;</code>
     */
    public dev.sigstore.proto.common.v1.TimeRange.Builder getValidForBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return internalGetValidForFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The time the *entire* chain was valid. This is at max the
     * longest interval when *all* certificates in the chain were valid,
     * but it MAY be shorter. Clients MUST check timestamps against *both*
     * the `valid_for` time range *and* the entire certificate chain.
     *
     * The TimeRange should be considered valid *inclusive* of the
     * endpoints.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.TimeRange valid_for = 4;</code>
     */
    public dev.sigstore.proto.common.v1.TimeRangeOrBuilder getValidForOrBuilder() {
      if (validForBuilder_ != null) {
        return validForBuilder_.getMessageOrBuilder();
      } else {
        return validFor_ == null ?
            dev.sigstore.proto.common.v1.TimeRange.getDefaultInstance() : validFor_;
      }
    }
    /**
     * <pre>
     * The time the *entire* chain was valid. This is at max the
     * longest interval when *all* certificates in the chain were valid,
     * but it MAY be shorter. Clients MUST check timestamps against *both*
     * the `valid_for` time range *and* the entire certificate chain.
     *
     * The TimeRange should be considered valid *inclusive* of the
     * endpoints.
     * </pre>
     *
     * <code>.dev.sigstore.common.v1.TimeRange valid_for = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilder<
        dev.sigstore.proto.common.v1.TimeRange, dev.sigstore.proto.common.v1.TimeRange.Builder, dev.sigstore.proto.common.v1.TimeRangeOrBuilder> 
        internalGetValidForFieldBuilder() {
      if (validForBuilder_ == null) {
        validForBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            dev.sigstore.proto.common.v1.TimeRange, dev.sigstore.proto.common.v1.TimeRange.Builder, dev.sigstore.proto.common.v1.TimeRangeOrBuilder>(
                getValidFor(),
                getParentForChildren(),
                isClean());
        validFor_ = null;
      }
      return validForBuilder_;
    }

    private java.lang.Object operator_ = "";
    /**
     * <pre>
     * The name of the operator of this certificate or timestamp authority.
     * Operator MUST be formatted as a scheme-less URI, e.g. sigstore.dev
     * This MUST be used when there are multiple timestamp authorities to
     * determine if the signed timestamp verification meets a specified
     * threshold, e.g. two signed timestamps from timestamp authorities
     * operated by the same operator should count as only one valid
     * timestamp.
     * </pre>
     *
     * <code>string operator = 5;</code>
     * @return The operator.
     */
    public java.lang.String getOperator() {
      java.lang.Object ref = operator_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        operator_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The name of the operator of this certificate or timestamp authority.
     * Operator MUST be formatted as a scheme-less URI, e.g. sigstore.dev
     * This MUST be used when there are multiple timestamp authorities to
     * determine if the signed timestamp verification meets a specified
     * threshold, e.g. two signed timestamps from timestamp authorities
     * operated by the same operator should count as only one valid
     * timestamp.
     * </pre>
     *
     * <code>string operator = 5;</code>
     * @return The bytes for operator.
     */
    public com.google.protobuf.ByteString
        getOperatorBytes() {
      java.lang.Object ref = operator_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        operator_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The name of the operator of this certificate or timestamp authority.
     * Operator MUST be formatted as a scheme-less URI, e.g. sigstore.dev
     * This MUST be used when there are multiple timestamp authorities to
     * determine if the signed timestamp verification meets a specified
     * threshold, e.g. two signed timestamps from timestamp authorities
     * operated by the same operator should count as only one valid
     * timestamp.
     * </pre>
     *
     * <code>string operator = 5;</code>
     * @param value The operator to set.
     * @return This builder for chaining.
     */
    public Builder setOperator(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      operator_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The name of the operator of this certificate or timestamp authority.
     * Operator MUST be formatted as a scheme-less URI, e.g. sigstore.dev
     * This MUST be used when there are multiple timestamp authorities to
     * determine if the signed timestamp verification meets a specified
     * threshold, e.g. two signed timestamps from timestamp authorities
     * operated by the same operator should count as only one valid
     * timestamp.
     * </pre>
     *
     * <code>string operator = 5;</code>
     * @return This builder for chaining.
     */
    public Builder clearOperator() {
      operator_ = getDefaultInstance().getOperator();
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The name of the operator of this certificate or timestamp authority.
     * Operator MUST be formatted as a scheme-less URI, e.g. sigstore.dev
     * This MUST be used when there are multiple timestamp authorities to
     * determine if the signed timestamp verification meets a specified
     * threshold, e.g. two signed timestamps from timestamp authorities
     * operated by the same operator should count as only one valid
     * timestamp.
     * </pre>
     *
     * <code>string operator = 5;</code>
     * @param value The bytes for operator to set.
     * @return This builder for chaining.
     */
    public Builder setOperatorBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      operator_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }

    // @@protoc_insertion_point(builder_scope:dev.sigstore.trustroot.v1.CertificateAuthority)
  }

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

  public static dev.sigstore.proto.trustroot.v1.CertificateAuthority getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

}