DSSEAttestationOccurrence.java

/*
 * Copyright 2019 The Grafeas Authors. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

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

package io.grafeas.v1;

/**
 *
 *
 * <pre>
 * Deprecated. Prefer to use a regular Occurrence, and populate the
 * Envelope at the top level of the Occurrence.
 * </pre>
 *
 * Protobuf type {@code grafeas.v1.DSSEAttestationOccurrence}
 */
public final class DSSEAttestationOccurrence extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:grafeas.v1.DSSEAttestationOccurrence)
    DSSEAttestationOccurrenceOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use DSSEAttestationOccurrence.newBuilder() to construct.
  private DSSEAttestationOccurrence(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private DSSEAttestationOccurrence() {}

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return io.grafeas.v1.DsseAttestation
        .internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.grafeas.v1.DsseAttestation
        .internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.grafeas.v1.DSSEAttestationOccurrence.class,
            io.grafeas.v1.DSSEAttestationOccurrence.Builder.class);
  }

  private int decodedPayloadCase_ = 0;
  private java.lang.Object decodedPayload_;

  public enum DecodedPayloadCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    STATEMENT(2),
    DECODEDPAYLOAD_NOT_SET(0);
    private final int value;

    private DecodedPayloadCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static DecodedPayloadCase valueOf(int value) {
      return forNumber(value);
    }

    public static DecodedPayloadCase forNumber(int value) {
      switch (value) {
        case 2:
          return STATEMENT;
        case 0:
          return DECODEDPAYLOAD_NOT_SET;
        default:
          return null;
      }
    }

    public int getNumber() {
      return this.value;
    }
  };

  public DecodedPayloadCase getDecodedPayloadCase() {
    return DecodedPayloadCase.forNumber(decodedPayloadCase_);
  }

  public static final int ENVELOPE_FIELD_NUMBER = 1;
  private io.grafeas.v1.Envelope envelope_;
  /**
   *
   *
   * <pre>
   * If doing something security critical, make sure to verify the signatures in
   * this metadata.
   * </pre>
   *
   * <code>.grafeas.v1.Envelope envelope = 1;</code>
   *
   * @return Whether the envelope field is set.
   */
  @java.lang.Override
  public boolean hasEnvelope() {
    return envelope_ != null;
  }
  /**
   *
   *
   * <pre>
   * If doing something security critical, make sure to verify the signatures in
   * this metadata.
   * </pre>
   *
   * <code>.grafeas.v1.Envelope envelope = 1;</code>
   *
   * @return The envelope.
   */
  @java.lang.Override
  public io.grafeas.v1.Envelope getEnvelope() {
    return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_;
  }
  /**
   *
   *
   * <pre>
   * If doing something security critical, make sure to verify the signatures in
   * this metadata.
   * </pre>
   *
   * <code>.grafeas.v1.Envelope envelope = 1;</code>
   */
  @java.lang.Override
  public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() {
    return getEnvelope();
  }

  public static final int STATEMENT_FIELD_NUMBER = 2;
  /**
   * <code>.grafeas.v1.InTotoStatement statement = 2;</code>
   *
   * @return Whether the statement field is set.
   */
  @java.lang.Override
  public boolean hasStatement() {
    return decodedPayloadCase_ == 2;
  }
  /**
   * <code>.grafeas.v1.InTotoStatement statement = 2;</code>
   *
   * @return The statement.
   */
  @java.lang.Override
  public io.grafeas.v1.InTotoStatement getStatement() {
    if (decodedPayloadCase_ == 2) {
      return (io.grafeas.v1.InTotoStatement) decodedPayload_;
    }
    return io.grafeas.v1.InTotoStatement.getDefaultInstance();
  }
  /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
  @java.lang.Override
  public io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder() {
    if (decodedPayloadCase_ == 2) {
      return (io.grafeas.v1.InTotoStatement) decodedPayload_;
    }
    return io.grafeas.v1.InTotoStatement.getDefaultInstance();
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (envelope_ != null) {
      output.writeMessage(1, getEnvelope());
    }
    if (decodedPayloadCase_ == 2) {
      output.writeMessage(2, (io.grafeas.v1.InTotoStatement) decodedPayload_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (envelope_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEnvelope());
    }
    if (decodedPayloadCase_ == 2) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              2, (io.grafeas.v1.InTotoStatement) decodedPayload_);
    }
    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.grafeas.v1.DSSEAttestationOccurrence)) {
      return super.equals(obj);
    }
    io.grafeas.v1.DSSEAttestationOccurrence other = (io.grafeas.v1.DSSEAttestationOccurrence) obj;

    if (hasEnvelope() != other.hasEnvelope()) return false;
    if (hasEnvelope()) {
      if (!getEnvelope().equals(other.getEnvelope())) return false;
    }
    if (!getDecodedPayloadCase().equals(other.getDecodedPayloadCase())) return false;
    switch (decodedPayloadCase_) {
      case 2:
        if (!getStatement().equals(other.getStatement())) return false;
        break;
      case 0:
      default:
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasEnvelope()) {
      hash = (37 * hash) + ENVELOPE_FIELD_NUMBER;
      hash = (53 * hash) + getEnvelope().hashCode();
    }
    switch (decodedPayloadCase_) {
      case 2:
        hash = (37 * hash) + STATEMENT_FIELD_NUMBER;
        hash = (53 * hash) + getStatement().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static io.grafeas.v1.DSSEAttestationOccurrence parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static io.grafeas.v1.DSSEAttestationOccurrence 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.grafeas.v1.DSSEAttestationOccurrence parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static io.grafeas.v1.DSSEAttestationOccurrence 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.grafeas.v1.DSSEAttestationOccurrence parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static io.grafeas.v1.DSSEAttestationOccurrence 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.grafeas.v1.DSSEAttestationOccurrence prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * Deprecated. Prefer to use a regular Occurrence, and populate the
   * Envelope at the top level of the Occurrence.
   * </pre>
   *
   * Protobuf type {@code grafeas.v1.DSSEAttestationOccurrence}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:grafeas.v1.DSSEAttestationOccurrence)
      io.grafeas.v1.DSSEAttestationOccurrenceOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return io.grafeas.v1.DsseAttestation
          .internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.grafeas.v1.DsseAttestation
          .internal_static_grafeas_v1_DSSEAttestationOccurrence_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.grafeas.v1.DSSEAttestationOccurrence.class,
              io.grafeas.v1.DSSEAttestationOccurrence.Builder.class);
    }

    // Construct using io.grafeas.v1.DSSEAttestationOccurrence.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (envelopeBuilder_ == null) {
        envelope_ = null;
      } else {
        envelope_ = null;
        envelopeBuilder_ = null;
      }
      if (statementBuilder_ != null) {
        statementBuilder_.clear();
      }
      decodedPayloadCase_ = 0;
      decodedPayload_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return io.grafeas.v1.DsseAttestation
          .internal_static_grafeas_v1_DSSEAttestationOccurrence_descriptor;
    }

    @java.lang.Override
    public io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstanceForType() {
      return io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance();
    }

    @java.lang.Override
    public io.grafeas.v1.DSSEAttestationOccurrence build() {
      io.grafeas.v1.DSSEAttestationOccurrence result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public io.grafeas.v1.DSSEAttestationOccurrence buildPartial() {
      io.grafeas.v1.DSSEAttestationOccurrence result =
          new io.grafeas.v1.DSSEAttestationOccurrence(this);
      if (envelopeBuilder_ == null) {
        result.envelope_ = envelope_;
      } else {
        result.envelope_ = envelopeBuilder_.build();
      }
      if (decodedPayloadCase_ == 2) {
        if (statementBuilder_ == null) {
          result.decodedPayload_ = decodedPayload_;
        } else {
          result.decodedPayload_ = statementBuilder_.build();
        }
      }
      result.decodedPayloadCase_ = decodedPayloadCase_;
      onBuilt();
      return result;
    }

    @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.grafeas.v1.DSSEAttestationOccurrence) {
        return mergeFrom((io.grafeas.v1.DSSEAttestationOccurrence) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.grafeas.v1.DSSEAttestationOccurrence other) {
      if (other == io.grafeas.v1.DSSEAttestationOccurrence.getDefaultInstance()) return this;
      if (other.hasEnvelope()) {
        mergeEnvelope(other.getEnvelope());
      }
      switch (other.getDecodedPayloadCase()) {
        case STATEMENT:
          {
            mergeStatement(other.getStatement());
            break;
          }
        case DECODEDPAYLOAD_NOT_SET:
          {
            break;
          }
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                input.readMessage(getEnvelopeFieldBuilder().getBuilder(), extensionRegistry);

                break;
              } // case 10
            case 18:
              {
                input.readMessage(getStatementFieldBuilder().getBuilder(), extensionRegistry);
                decodedPayloadCase_ = 2;
                break;
              } // case 18
            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 decodedPayloadCase_ = 0;
    private java.lang.Object decodedPayload_;

    public DecodedPayloadCase getDecodedPayloadCase() {
      return DecodedPayloadCase.forNumber(decodedPayloadCase_);
    }

    public Builder clearDecodedPayload() {
      decodedPayloadCase_ = 0;
      decodedPayload_ = null;
      onChanged();
      return this;
    }

    private io.grafeas.v1.Envelope envelope_;
    private com.google.protobuf.SingleFieldBuilderV3<
            io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder>
        envelopeBuilder_;
    /**
     *
     *
     * <pre>
     * If doing something security critical, make sure to verify the signatures in
     * this metadata.
     * </pre>
     *
     * <code>.grafeas.v1.Envelope envelope = 1;</code>
     *
     * @return Whether the envelope field is set.
     */
    public boolean hasEnvelope() {
      return envelopeBuilder_ != null || envelope_ != null;
    }
    /**
     *
     *
     * <pre>
     * If doing something security critical, make sure to verify the signatures in
     * this metadata.
     * </pre>
     *
     * <code>.grafeas.v1.Envelope envelope = 1;</code>
     *
     * @return The envelope.
     */
    public io.grafeas.v1.Envelope getEnvelope() {
      if (envelopeBuilder_ == null) {
        return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_;
      } else {
        return envelopeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * If doing something security critical, make sure to verify the signatures in
     * this metadata.
     * </pre>
     *
     * <code>.grafeas.v1.Envelope envelope = 1;</code>
     */
    public Builder setEnvelope(io.grafeas.v1.Envelope value) {
      if (envelopeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        envelope_ = value;
        onChanged();
      } else {
        envelopeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * If doing something security critical, make sure to verify the signatures in
     * this metadata.
     * </pre>
     *
     * <code>.grafeas.v1.Envelope envelope = 1;</code>
     */
    public Builder setEnvelope(io.grafeas.v1.Envelope.Builder builderForValue) {
      if (envelopeBuilder_ == null) {
        envelope_ = builderForValue.build();
        onChanged();
      } else {
        envelopeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * If doing something security critical, make sure to verify the signatures in
     * this metadata.
     * </pre>
     *
     * <code>.grafeas.v1.Envelope envelope = 1;</code>
     */
    public Builder mergeEnvelope(io.grafeas.v1.Envelope value) {
      if (envelopeBuilder_ == null) {
        if (envelope_ != null) {
          envelope_ = io.grafeas.v1.Envelope.newBuilder(envelope_).mergeFrom(value).buildPartial();
        } else {
          envelope_ = value;
        }
        onChanged();
      } else {
        envelopeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * If doing something security critical, make sure to verify the signatures in
     * this metadata.
     * </pre>
     *
     * <code>.grafeas.v1.Envelope envelope = 1;</code>
     */
    public Builder clearEnvelope() {
      if (envelopeBuilder_ == null) {
        envelope_ = null;
        onChanged();
      } else {
        envelope_ = null;
        envelopeBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * If doing something security critical, make sure to verify the signatures in
     * this metadata.
     * </pre>
     *
     * <code>.grafeas.v1.Envelope envelope = 1;</code>
     */
    public io.grafeas.v1.Envelope.Builder getEnvelopeBuilder() {

      onChanged();
      return getEnvelopeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * If doing something security critical, make sure to verify the signatures in
     * this metadata.
     * </pre>
     *
     * <code>.grafeas.v1.Envelope envelope = 1;</code>
     */
    public io.grafeas.v1.EnvelopeOrBuilder getEnvelopeOrBuilder() {
      if (envelopeBuilder_ != null) {
        return envelopeBuilder_.getMessageOrBuilder();
      } else {
        return envelope_ == null ? io.grafeas.v1.Envelope.getDefaultInstance() : envelope_;
      }
    }
    /**
     *
     *
     * <pre>
     * If doing something security critical, make sure to verify the signatures in
     * this metadata.
     * </pre>
     *
     * <code>.grafeas.v1.Envelope envelope = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            io.grafeas.v1.Envelope, io.grafeas.v1.Envelope.Builder, io.grafeas.v1.EnvelopeOrBuilder>
        getEnvelopeFieldBuilder() {
      if (envelopeBuilder_ == null) {
        envelopeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                io.grafeas.v1.Envelope,
                io.grafeas.v1.Envelope.Builder,
                io.grafeas.v1.EnvelopeOrBuilder>(getEnvelope(), getParentForChildren(), isClean());
        envelope_ = null;
      }
      return envelopeBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            io.grafeas.v1.InTotoStatement,
            io.grafeas.v1.InTotoStatement.Builder,
            io.grafeas.v1.InTotoStatementOrBuilder>
        statementBuilder_;
    /**
     * <code>.grafeas.v1.InTotoStatement statement = 2;</code>
     *
     * @return Whether the statement field is set.
     */
    @java.lang.Override
    public boolean hasStatement() {
      return decodedPayloadCase_ == 2;
    }
    /**
     * <code>.grafeas.v1.InTotoStatement statement = 2;</code>
     *
     * @return The statement.
     */
    @java.lang.Override
    public io.grafeas.v1.InTotoStatement getStatement() {
      if (statementBuilder_ == null) {
        if (decodedPayloadCase_ == 2) {
          return (io.grafeas.v1.InTotoStatement) decodedPayload_;
        }
        return io.grafeas.v1.InTotoStatement.getDefaultInstance();
      } else {
        if (decodedPayloadCase_ == 2) {
          return statementBuilder_.getMessage();
        }
        return io.grafeas.v1.InTotoStatement.getDefaultInstance();
      }
    }
    /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
    public Builder setStatement(io.grafeas.v1.InTotoStatement value) {
      if (statementBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        decodedPayload_ = value;
        onChanged();
      } else {
        statementBuilder_.setMessage(value);
      }
      decodedPayloadCase_ = 2;
      return this;
    }
    /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
    public Builder setStatement(io.grafeas.v1.InTotoStatement.Builder builderForValue) {
      if (statementBuilder_ == null) {
        decodedPayload_ = builderForValue.build();
        onChanged();
      } else {
        statementBuilder_.setMessage(builderForValue.build());
      }
      decodedPayloadCase_ = 2;
      return this;
    }
    /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
    public Builder mergeStatement(io.grafeas.v1.InTotoStatement value) {
      if (statementBuilder_ == null) {
        if (decodedPayloadCase_ == 2
            && decodedPayload_ != io.grafeas.v1.InTotoStatement.getDefaultInstance()) {
          decodedPayload_ =
              io.grafeas.v1.InTotoStatement.newBuilder(
                      (io.grafeas.v1.InTotoStatement) decodedPayload_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          decodedPayload_ = value;
        }
        onChanged();
      } else {
        if (decodedPayloadCase_ == 2) {
          statementBuilder_.mergeFrom(value);
        } else {
          statementBuilder_.setMessage(value);
        }
      }
      decodedPayloadCase_ = 2;
      return this;
    }
    /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
    public Builder clearStatement() {
      if (statementBuilder_ == null) {
        if (decodedPayloadCase_ == 2) {
          decodedPayloadCase_ = 0;
          decodedPayload_ = null;
          onChanged();
        }
      } else {
        if (decodedPayloadCase_ == 2) {
          decodedPayloadCase_ = 0;
          decodedPayload_ = null;
        }
        statementBuilder_.clear();
      }
      return this;
    }
    /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
    public io.grafeas.v1.InTotoStatement.Builder getStatementBuilder() {
      return getStatementFieldBuilder().getBuilder();
    }
    /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
    @java.lang.Override
    public io.grafeas.v1.InTotoStatementOrBuilder getStatementOrBuilder() {
      if ((decodedPayloadCase_ == 2) && (statementBuilder_ != null)) {
        return statementBuilder_.getMessageOrBuilder();
      } else {
        if (decodedPayloadCase_ == 2) {
          return (io.grafeas.v1.InTotoStatement) decodedPayload_;
        }
        return io.grafeas.v1.InTotoStatement.getDefaultInstance();
      }
    }
    /** <code>.grafeas.v1.InTotoStatement statement = 2;</code> */
    private com.google.protobuf.SingleFieldBuilderV3<
            io.grafeas.v1.InTotoStatement,
            io.grafeas.v1.InTotoStatement.Builder,
            io.grafeas.v1.InTotoStatementOrBuilder>
        getStatementFieldBuilder() {
      if (statementBuilder_ == null) {
        if (!(decodedPayloadCase_ == 2)) {
          decodedPayload_ = io.grafeas.v1.InTotoStatement.getDefaultInstance();
        }
        statementBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                io.grafeas.v1.InTotoStatement,
                io.grafeas.v1.InTotoStatement.Builder,
                io.grafeas.v1.InTotoStatementOrBuilder>(
                (io.grafeas.v1.InTotoStatement) decodedPayload_, getParentForChildren(), isClean());
        decodedPayload_ = null;
      }
      decodedPayloadCase_ = 2;
      onChanged();
      ;
      return statementBuilder_;
    }

    @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:grafeas.v1.DSSEAttestationOccurrence)
  }

  // @@protoc_insertion_point(class_scope:grafeas.v1.DSSEAttestationOccurrence)
  private static final io.grafeas.v1.DSSEAttestationOccurrence DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new io.grafeas.v1.DSSEAttestationOccurrence();
  }

  public static io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

  @java.lang.Override
  public io.grafeas.v1.DSSEAttestationOccurrence getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}