// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto

package io.grafeas.v1beta1;

/**
 * <pre>
 * An instance of an analysis type that has been found on a resource.
 * </pre>
 *
 * Protobuf type {@code grafeas.v1beta1.Occurrence}
 */
public  final class Occurrence extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:grafeas.v1beta1.Occurrence)
    OccurrenceOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Occurrence.newBuilder() to construct.
  private Occurrence(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private Occurrence() {
    name_ = "";
    noteName_ = "";
    kind_ = 0;
    remediation_ = "";
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private Occurrence(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            name_ = s;
            break;
          }
          case 18: {
            io.grafeas.v1beta1.Resource.Builder subBuilder = null;
            if (resource_ != null) {
              subBuilder = resource_.toBuilder();
            }
            resource_ = input.readMessage(io.grafeas.v1beta1.Resource.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(resource_);
              resource_ = subBuilder.buildPartial();
            }

            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();

            noteName_ = s;
            break;
          }
          case 32: {
            int rawValue = input.readEnum();

            kind_ = rawValue;
            break;
          }
          case 42: {
            java.lang.String s = input.readStringRequireUtf8();

            remediation_ = s;
            break;
          }
          case 50: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (createTime_ != null) {
              subBuilder = createTime_.toBuilder();
            }
            createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(createTime_);
              createTime_ = subBuilder.buildPartial();
            }

            break;
          }
          case 58: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (updateTime_ != null) {
              subBuilder = updateTime_.toBuilder();
            }
            updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(updateTime_);
              updateTime_ = subBuilder.buildPartial();
            }

            break;
          }
          case 66: {
            io.grafeas.v1beta1.vulnerability.Details.Builder subBuilder = null;
            if (detailsCase_ == 8) {
              subBuilder = ((io.grafeas.v1beta1.vulnerability.Details) details_).toBuilder();
            }
            details_ =
                input.readMessage(io.grafeas.v1beta1.vulnerability.Details.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((io.grafeas.v1beta1.vulnerability.Details) details_);
              details_ = subBuilder.buildPartial();
            }
            detailsCase_ = 8;
            break;
          }
          case 74: {
            io.grafeas.v1beta1.build.Details.Builder subBuilder = null;
            if (detailsCase_ == 9) {
              subBuilder = ((io.grafeas.v1beta1.build.Details) details_).toBuilder();
            }
            details_ =
                input.readMessage(io.grafeas.v1beta1.build.Details.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((io.grafeas.v1beta1.build.Details) details_);
              details_ = subBuilder.buildPartial();
            }
            detailsCase_ = 9;
            break;
          }
          case 82: {
            io.grafeas.v1beta1.image.Details.Builder subBuilder = null;
            if (detailsCase_ == 10) {
              subBuilder = ((io.grafeas.v1beta1.image.Details) details_).toBuilder();
            }
            details_ =
                input.readMessage(io.grafeas.v1beta1.image.Details.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((io.grafeas.v1beta1.image.Details) details_);
              details_ = subBuilder.buildPartial();
            }
            detailsCase_ = 10;
            break;
          }
          case 90: {
            io.grafeas.v1beta1.pkg.Details.Builder subBuilder = null;
            if (detailsCase_ == 11) {
              subBuilder = ((io.grafeas.v1beta1.pkg.Details) details_).toBuilder();
            }
            details_ =
                input.readMessage(io.grafeas.v1beta1.pkg.Details.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((io.grafeas.v1beta1.pkg.Details) details_);
              details_ = subBuilder.buildPartial();
            }
            detailsCase_ = 11;
            break;
          }
          case 98: {
            io.grafeas.v1beta1.deployment.Details.Builder subBuilder = null;
            if (detailsCase_ == 12) {
              subBuilder = ((io.grafeas.v1beta1.deployment.Details) details_).toBuilder();
            }
            details_ =
                input.readMessage(io.grafeas.v1beta1.deployment.Details.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((io.grafeas.v1beta1.deployment.Details) details_);
              details_ = subBuilder.buildPartial();
            }
            detailsCase_ = 12;
            break;
          }
          case 106: {
            io.grafeas.v1beta1.discovery.Details.Builder subBuilder = null;
            if (detailsCase_ == 13) {
              subBuilder = ((io.grafeas.v1beta1.discovery.Details) details_).toBuilder();
            }
            details_ =
                input.readMessage(io.grafeas.v1beta1.discovery.Details.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((io.grafeas.v1beta1.discovery.Details) details_);
              details_ = subBuilder.buildPartial();
            }
            detailsCase_ = 13;
            break;
          }
          case 114: {
            io.grafeas.v1beta1.attestation.Details.Builder subBuilder = null;
            if (detailsCase_ == 14) {
              subBuilder = ((io.grafeas.v1beta1.attestation.Details) details_).toBuilder();
            }
            details_ =
                input.readMessage(io.grafeas.v1beta1.attestation.Details.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((io.grafeas.v1beta1.attestation.Details) details_);
              details_ = subBuilder.buildPartial();
            }
            detailsCase_ = 14;
            break;
          }
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.grafeas.v1beta1.Grafeas.internal_static_grafeas_v1beta1_Occurrence_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.grafeas.v1beta1.Grafeas.internal_static_grafeas_v1beta1_Occurrence_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.grafeas.v1beta1.Occurrence.class, io.grafeas.v1beta1.Occurrence.Builder.class);
  }

  private int detailsCase_ = 0;
  private java.lang.Object details_;
  public enum DetailsCase
      implements com.google.protobuf.Internal.EnumLite {
    VULNERABILITY(8),
    BUILD(9),
    DERIVED_IMAGE(10),
    INSTALLATION(11),
    DEPLOYMENT(12),
    DISCOVERED(13),
    ATTESTATION(14),
    DETAILS_NOT_SET(0);
    private final int value;
    private DetailsCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static DetailsCase valueOf(int value) {
      return forNumber(value);
    }

    public static DetailsCase forNumber(int value) {
      switch (value) {
        case 8: return VULNERABILITY;
        case 9: return BUILD;
        case 10: return DERIVED_IMAGE;
        case 11: return INSTALLATION;
        case 12: return DEPLOYMENT;
        case 13: return DISCOVERED;
        case 14: return ATTESTATION;
        case 0: return DETAILS_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public DetailsCase
  getDetailsCase() {
    return DetailsCase.forNumber(
        detailsCase_);
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   * <pre>
   * Output only. The name of the occurrence in the form of
   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Output only. The name of the occurrence in the form of
   * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  public com.google.protobuf.ByteString
      getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int RESOURCE_FIELD_NUMBER = 2;
  private io.grafeas.v1beta1.Resource resource_;
  /**
   * <pre>
   * Required. Immutable. The resource for which the occurrence applies.
   * </pre>
   *
   * <code>.grafeas.v1beta1.Resource resource = 2;</code>
   */
  public boolean hasResource() {
    return resource_ != null;
  }
  /**
   * <pre>
   * Required. Immutable. The resource for which the occurrence applies.
   * </pre>
   *
   * <code>.grafeas.v1beta1.Resource resource = 2;</code>
   */
  public io.grafeas.v1beta1.Resource getResource() {
    return resource_ == null ? io.grafeas.v1beta1.Resource.getDefaultInstance() : resource_;
  }
  /**
   * <pre>
   * Required. Immutable. The resource for which the occurrence applies.
   * </pre>
   *
   * <code>.grafeas.v1beta1.Resource resource = 2;</code>
   */
  public io.grafeas.v1beta1.ResourceOrBuilder getResourceOrBuilder() {
    return getResource();
  }

  public static final int NOTE_NAME_FIELD_NUMBER = 3;
  private volatile java.lang.Object noteName_;
  /**
   * <pre>
   * Required. Immutable. The analysis note associated with this occurrence, in
   * the form of `projects[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used
   * as a filter in list requests.
   * </pre>
   *
   * <code>string note_name = 3;</code>
   */
  public java.lang.String getNoteName() {
    java.lang.Object ref = noteName_;
    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();
      noteName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Required. Immutable. The analysis note associated with this occurrence, in
   * the form of `projects[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used
   * as a filter in list requests.
   * </pre>
   *
   * <code>string note_name = 3;</code>
   */
  public com.google.protobuf.ByteString
      getNoteNameBytes() {
    java.lang.Object ref = noteName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      noteName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int KIND_FIELD_NUMBER = 4;
  private int kind_;
  /**
   * <pre>
   * Output only. This explicitly denotes which of the occurrence details are
   * specified. This field can be used as a filter in list requests.
   * </pre>
   *
   * <code>.grafeas.v1beta1.NoteKind kind = 4;</code>
   */
  public int getKindValue() {
    return kind_;
  }
  /**
   * <pre>
   * Output only. This explicitly denotes which of the occurrence details are
   * specified. This field can be used as a filter in list requests.
   * </pre>
   *
   * <code>.grafeas.v1beta1.NoteKind kind = 4;</code>
   */
  public io.grafeas.v1beta1.common.NoteKind getKind() {
    @SuppressWarnings("deprecation")
    io.grafeas.v1beta1.common.NoteKind result = io.grafeas.v1beta1.common.NoteKind.valueOf(kind_);
    return result == null ? io.grafeas.v1beta1.common.NoteKind.UNRECOGNIZED : result;
  }

  public static final int REMEDIATION_FIELD_NUMBER = 5;
  private volatile java.lang.Object remediation_;
  /**
   * <pre>
   * A description of actions that can be taken to remedy the note.
   * </pre>
   *
   * <code>string remediation = 5;</code>
   */
  public java.lang.String getRemediation() {
    java.lang.Object ref = remediation_;
    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();
      remediation_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * A description of actions that can be taken to remedy the note.
   * </pre>
   *
   * <code>string remediation = 5;</code>
   */
  public com.google.protobuf.ByteString
      getRemediationBytes() {
    java.lang.Object ref = remediation_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      remediation_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CREATE_TIME_FIELD_NUMBER = 6;
  private com.google.protobuf.Timestamp createTime_;
  /**
   * <pre>
   * Output only. The time this occurrence was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 6;</code>
   */
  public boolean hasCreateTime() {
    return createTime_ != null;
  }
  /**
   * <pre>
   * Output only. The time this occurrence was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 6;</code>
   */
  public com.google.protobuf.Timestamp getCreateTime() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }
  /**
   * <pre>
   * Output only. The time this occurrence was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 6;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
    return getCreateTime();
  }

  public static final int UPDATE_TIME_FIELD_NUMBER = 7;
  private com.google.protobuf.Timestamp updateTime_;
  /**
   * <pre>
   * Output only. The time this occurrence was last updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 7;</code>
   */
  public boolean hasUpdateTime() {
    return updateTime_ != null;
  }
  /**
   * <pre>
   * Output only. The time this occurrence was last updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 7;</code>
   */
  public com.google.protobuf.Timestamp getUpdateTime() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }
  /**
   * <pre>
   * Output only. The time this occurrence was last updated.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 7;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
    return getUpdateTime();
  }

  public static final int VULNERABILITY_FIELD_NUMBER = 8;
  /**
   * <pre>
   * Describes a security vulnerability.
   * </pre>
   *
   * <code>.grafeas.v1beta1.vulnerability.Details vulnerability = 8;</code>
   */
  public boolean hasVulnerability() {
    return detailsCase_ == 8;
  }
  /**
   * <pre>
   * Describes a security vulnerability.
   * </pre>
   *
   * <code>.grafeas.v1beta1.vulnerability.Details vulnerability = 8;</code>
   */
  public io.grafeas.v1beta1.vulnerability.Details getVulnerability() {
    if (detailsCase_ == 8) {
       return (io.grafeas.v1beta1.vulnerability.Details) details_;
    }
    return io.grafeas.v1beta1.vulnerability.Details.getDefaultInstance();
  }
  /**
   * <pre>
   * Describes a security vulnerability.
   * </pre>
   *
   * <code>.grafeas.v1beta1.vulnerability.Details vulnerability = 8;</code>
   */
  public io.grafeas.v1beta1.vulnerability.DetailsOrBuilder getVulnerabilityOrBuilder() {
    if (detailsCase_ == 8) {
       return (io.grafeas.v1beta1.vulnerability.Details) details_;
    }
    return io.grafeas.v1beta1.vulnerability.Details.getDefaultInstance();
  }

  public static final int BUILD_FIELD_NUMBER = 9;
  /**
   * <pre>
   * Describes a verifiable build.
   * </pre>
   *
   * <code>.grafeas.v1beta1.build.Details build = 9;</code>
   */
  public boolean hasBuild() {
    return detailsCase_ == 9;
  }
  /**
   * <pre>
   * Describes a verifiable build.
   * </pre>
   *
   * <code>.grafeas.v1beta1.build.Details build = 9;</code>
   */
  public io.grafeas.v1beta1.build.Details getBuild() {
    if (detailsCase_ == 9) {
       return (io.grafeas.v1beta1.build.Details) details_;
    }
    return io.grafeas.v1beta1.build.Details.getDefaultInstance();
  }
  /**
   * <pre>
   * Describes a verifiable build.
   * </pre>
   *
   * <code>.grafeas.v1beta1.build.Details build = 9;</code>
   */
  public io.grafeas.v1beta1.build.DetailsOrBuilder getBuildOrBuilder() {
    if (detailsCase_ == 9) {
       return (io.grafeas.v1beta1.build.Details) details_;
    }
    return io.grafeas.v1beta1.build.Details.getDefaultInstance();
  }

  public static final int DERIVED_IMAGE_FIELD_NUMBER = 10;
  /**
   * <pre>
   * Describes how this resource derives from the basis in the associated
   * note.
   * </pre>
   *
   * <code>.grafeas.v1beta1.image.Details derived_image = 10;</code>
   */
  public boolean hasDerivedImage() {
    return detailsCase_ == 10;
  }
  /**
   * <pre>
   * Describes how this resource derives from the basis in the associated
   * note.
   * </pre>
   *
   * <code>.grafeas.v1beta1.image.Details derived_image = 10;</code>
   */
  public io.grafeas.v1beta1.image.Details getDerivedImage() {
    if (detailsCase_ == 10) {
       return (io.grafeas.v1beta1.image.Details) details_;
    }
    return io.grafeas.v1beta1.image.Details.getDefaultInstance();
  }
  /**
   * <pre>
   * Describes how this resource derives from the basis in the associated
   * note.
   * </pre>
   *
   * <code>.grafeas.v1beta1.image.Details derived_image = 10;</code>
   */
  public io.grafeas.v1beta1.image.DetailsOrBuilder getDerivedImageOrBuilder() {
    if (detailsCase_ == 10) {
       return (io.grafeas.v1beta1.image.Details) details_;
    }
    return io.grafeas.v1beta1.image.Details.getDefaultInstance();
  }

  public static final int INSTALLATION_FIELD_NUMBER = 11;
  /**
   * <pre>
   * Describes the installation of a package on the linked resource.
   * </pre>
   *
   * <code>.grafeas.v1beta1.package.Details installation = 11;</code>
   */
  public boolean hasInstallation() {
    return detailsCase_ == 11;
  }
  /**
   * <pre>
   * Describes the installation of a package on the linked resource.
   * </pre>
   *
   * <code>.grafeas.v1beta1.package.Details installation = 11;</code>
   */
  public io.grafeas.v1beta1.pkg.Details getInstallation() {
    if (detailsCase_ == 11) {
       return (io.grafeas.v1beta1.pkg.Details) details_;
    }
    return io.grafeas.v1beta1.pkg.Details.getDefaultInstance();
  }
  /**
   * <pre>
   * Describes the installation of a package on the linked resource.
   * </pre>
   *
   * <code>.grafeas.v1beta1.package.Details installation = 11;</code>
   */
  public io.grafeas.v1beta1.pkg.DetailsOrBuilder getInstallationOrBuilder() {
    if (detailsCase_ == 11) {
       return (io.grafeas.v1beta1.pkg.Details) details_;
    }
    return io.grafeas.v1beta1.pkg.Details.getDefaultInstance();
  }

  public static final int DEPLOYMENT_FIELD_NUMBER = 12;
  /**
   * <pre>
   * Describes the deployment of an artifact on a runtime.
   * </pre>
   *
   * <code>.grafeas.v1beta1.deployment.Details deployment = 12;</code>
   */
  public boolean hasDeployment() {
    return detailsCase_ == 12;
  }
  /**
   * <pre>
   * Describes the deployment of an artifact on a runtime.
   * </pre>
   *
   * <code>.grafeas.v1beta1.deployment.Details deployment = 12;</code>
   */
  public io.grafeas.v1beta1.deployment.Details getDeployment() {
    if (detailsCase_ == 12) {
       return (io.grafeas.v1beta1.deployment.Details) details_;
    }
    return io.grafeas.v1beta1.deployment.Details.getDefaultInstance();
  }
  /**
   * <pre>
   * Describes the deployment of an artifact on a runtime.
   * </pre>
   *
   * <code>.grafeas.v1beta1.deployment.Details deployment = 12;</code>
   */
  public io.grafeas.v1beta1.deployment.DetailsOrBuilder getDeploymentOrBuilder() {
    if (detailsCase_ == 12) {
       return (io.grafeas.v1beta1.deployment.Details) details_;
    }
    return io.grafeas.v1beta1.deployment.Details.getDefaultInstance();
  }

  public static final int DISCOVERED_FIELD_NUMBER = 13;
  /**
   * <pre>
   * Describes when a resource was discovered.
   * </pre>
   *
   * <code>.grafeas.v1beta1.discovery.Details discovered = 13;</code>
   */
  public boolean hasDiscovered() {
    return detailsCase_ == 13;
  }
  /**
   * <pre>
   * Describes when a resource was discovered.
   * </pre>
   *
   * <code>.grafeas.v1beta1.discovery.Details discovered = 13;</code>
   */
  public io.grafeas.v1beta1.discovery.Details getDiscovered() {
    if (detailsCase_ == 13) {
       return (io.grafeas.v1beta1.discovery.Details) details_;
    }
    return io.grafeas.v1beta1.discovery.Details.getDefaultInstance();
  }
  /**
   * <pre>
   * Describes when a resource was discovered.
   * </pre>
   *
   * <code>.grafeas.v1beta1.discovery.Details discovered = 13;</code>
   */
  public io.grafeas.v1beta1.discovery.DetailsOrBuilder getDiscoveredOrBuilder() {
    if (detailsCase_ == 13) {
       return (io.grafeas.v1beta1.discovery.Details) details_;
    }
    return io.grafeas.v1beta1.discovery.Details.getDefaultInstance();
  }

  public static final int ATTESTATION_FIELD_NUMBER = 14;
  /**
   * <pre>
   * Describes an attestation of an artifact.
   * </pre>
   *
   * <code>.grafeas.v1beta1.attestation.Details attestation = 14;</code>
   */
  public boolean hasAttestation() {
    return detailsCase_ == 14;
  }
  /**
   * <pre>
   * Describes an attestation of an artifact.
   * </pre>
   *
   * <code>.grafeas.v1beta1.attestation.Details attestation = 14;</code>
   */
  public io.grafeas.v1beta1.attestation.Details getAttestation() {
    if (detailsCase_ == 14) {
       return (io.grafeas.v1beta1.attestation.Details) details_;
    }
    return io.grafeas.v1beta1.attestation.Details.getDefaultInstance();
  }
  /**
   * <pre>
   * Describes an attestation of an artifact.
   * </pre>
   *
   * <code>.grafeas.v1beta1.attestation.Details attestation = 14;</code>
   */
  public io.grafeas.v1beta1.attestation.DetailsOrBuilder getAttestationOrBuilder() {
    if (detailsCase_ == 14) {
       return (io.grafeas.v1beta1.attestation.Details) details_;
    }
    return io.grafeas.v1beta1.attestation.Details.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 (!getNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (resource_ != null) {
      output.writeMessage(2, getResource());
    }
    if (!getNoteNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, noteName_);
    }
    if (kind_ != io.grafeas.v1beta1.common.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) {
      output.writeEnum(4, kind_);
    }
    if (!getRemediationBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remediation_);
    }
    if (createTime_ != null) {
      output.writeMessage(6, getCreateTime());
    }
    if (updateTime_ != null) {
      output.writeMessage(7, getUpdateTime());
    }
    if (detailsCase_ == 8) {
      output.writeMessage(8, (io.grafeas.v1beta1.vulnerability.Details) details_);
    }
    if (detailsCase_ == 9) {
      output.writeMessage(9, (io.grafeas.v1beta1.build.Details) details_);
    }
    if (detailsCase_ == 10) {
      output.writeMessage(10, (io.grafeas.v1beta1.image.Details) details_);
    }
    if (detailsCase_ == 11) {
      output.writeMessage(11, (io.grafeas.v1beta1.pkg.Details) details_);
    }
    if (detailsCase_ == 12) {
      output.writeMessage(12, (io.grafeas.v1beta1.deployment.Details) details_);
    }
    if (detailsCase_ == 13) {
      output.writeMessage(13, (io.grafeas.v1beta1.discovery.Details) details_);
    }
    if (detailsCase_ == 14) {
      output.writeMessage(14, (io.grafeas.v1beta1.attestation.Details) details_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (resource_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getResource());
    }
    if (!getNoteNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, noteName_);
    }
    if (kind_ != io.grafeas.v1beta1.common.NoteKind.NOTE_KIND_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(4, kind_);
    }
    if (!getRemediationBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remediation_);
    }
    if (createTime_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(6, getCreateTime());
    }
    if (updateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(7, getUpdateTime());
    }
    if (detailsCase_ == 8) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(8, (io.grafeas.v1beta1.vulnerability.Details) details_);
    }
    if (detailsCase_ == 9) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(9, (io.grafeas.v1beta1.build.Details) details_);
    }
    if (detailsCase_ == 10) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(10, (io.grafeas.v1beta1.image.Details) details_);
    }
    if (detailsCase_ == 11) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(11, (io.grafeas.v1beta1.pkg.Details) details_);
    }
    if (detailsCase_ == 12) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(12, (io.grafeas.v1beta1.deployment.Details) details_);
    }
    if (detailsCase_ == 13) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(13, (io.grafeas.v1beta1.discovery.Details) details_);
    }
    if (detailsCase_ == 14) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(14, (io.grafeas.v1beta1.attestation.Details) details_);
    }
    size += unknownFields.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.v1beta1.Occurrence)) {
      return super.equals(obj);
    }
    io.grafeas.v1beta1.Occurrence other = (io.grafeas.v1beta1.Occurrence) obj;

    boolean result = true;
    result = result && getName()
        .equals(other.getName());
    result = result && (hasResource() == other.hasResource());
    if (hasResource()) {
      result = result && getResource()
          .equals(other.getResource());
    }
    result = result && getNoteName()
        .equals(other.getNoteName());
    result = result && kind_ == other.kind_;
    result = result && getRemediation()
        .equals(other.getRemediation());
    result = result && (hasCreateTime() == other.hasCreateTime());
    if (hasCreateTime()) {
      result = result && getCreateTime()
          .equals(other.getCreateTime());
    }
    result = result && (hasUpdateTime() == other.hasUpdateTime());
    if (hasUpdateTime()) {
      result = result && getUpdateTime()
          .equals(other.getUpdateTime());
    }
    result = result && getDetailsCase().equals(
        other.getDetailsCase());
    if (!result) return false;
    switch (detailsCase_) {
      case 8:
        result = result && getVulnerability()
            .equals(other.getVulnerability());
        break;
      case 9:
        result = result && getBuild()
            .equals(other.getBuild());
        break;
      case 10:
        result = result && getDerivedImage()
            .equals(other.getDerivedImage());
        break;
      case 11:
        result = result && getInstallation()
            .equals(other.getInstallation());
        break;
      case 12:
        result = result && getDeployment()
            .equals(other.getDeployment());
        break;
      case 13:
        result = result && getDiscovered()
            .equals(other.getDiscovered());
        break;
      case 14:
        result = result && getAttestation()
            .equals(other.getAttestation());
        break;
      case 0:
      default:
    }
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    if (hasResource()) {
      hash = (37 * hash) + RESOURCE_FIELD_NUMBER;
      hash = (53 * hash) + getResource().hashCode();
    }
    hash = (37 * hash) + NOTE_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getNoteName().hashCode();
    hash = (37 * hash) + KIND_FIELD_NUMBER;
    hash = (53 * hash) + kind_;
    hash = (37 * hash) + REMEDIATION_FIELD_NUMBER;
    hash = (53 * hash) + getRemediation().hashCode();
    if (hasCreateTime()) {
      hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getCreateTime().hashCode();
    }
    if (hasUpdateTime()) {
      hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUpdateTime().hashCode();
    }
    switch (detailsCase_) {
      case 8:
        hash = (37 * hash) + VULNERABILITY_FIELD_NUMBER;
        hash = (53 * hash) + getVulnerability().hashCode();
        break;
      case 9:
        hash = (37 * hash) + BUILD_FIELD_NUMBER;
        hash = (53 * hash) + getBuild().hashCode();
        break;
      case 10:
        hash = (37 * hash) + DERIVED_IMAGE_FIELD_NUMBER;
        hash = (53 * hash) + getDerivedImage().hashCode();
        break;
      case 11:
        hash = (37 * hash) + INSTALLATION_FIELD_NUMBER;
        hash = (53 * hash) + getInstallation().hashCode();
        break;
      case 12:
        hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER;
        hash = (53 * hash) + getDeployment().hashCode();
        break;
      case 13:
        hash = (37 * hash) + DISCOVERED_FIELD_NUMBER;
        hash = (53 * hash) + getDiscovered().hashCode();
        break;
      case 14:
        hash = (37 * hash) + ATTESTATION_FIELD_NUMBER;
        hash = (53 * hash) + getAttestation().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static io.grafeas.v1beta1.Occurrence parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.grafeas.v1beta1.Occurrence parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.grafeas.v1beta1.Occurrence parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.grafeas.v1beta1.Occurrence 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.v1beta1.Occurrence parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.grafeas.v1beta1.Occurrence parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.grafeas.v1beta1.Occurrence parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.grafeas.v1beta1.Occurrence 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.v1beta1.Occurrence parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static io.grafeas.v1beta1.Occurrence 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.v1beta1.Occurrence parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.grafeas.v1beta1.Occurrence 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.v1beta1.Occurrence 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>
   * An instance of an analysis type that has been found on a resource.
   * </pre>
   *
   * Protobuf type {@code grafeas.v1beta1.Occurrence}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:grafeas.v1beta1.Occurrence)
      io.grafeas.v1beta1.OccurrenceOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.grafeas.v1beta1.Grafeas.internal_static_grafeas_v1beta1_Occurrence_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.grafeas.v1beta1.Grafeas.internal_static_grafeas_v1beta1_Occurrence_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.grafeas.v1beta1.Occurrence.class, io.grafeas.v1beta1.Occurrence.Builder.class);
    }

    // Construct using io.grafeas.v1beta1.Occurrence.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      name_ = "";

      if (resourceBuilder_ == null) {
        resource_ = null;
      } else {
        resource_ = null;
        resourceBuilder_ = null;
      }
      noteName_ = "";

      kind_ = 0;

      remediation_ = "";

      if (createTimeBuilder_ == null) {
        createTime_ = null;
      } else {
        createTime_ = null;
        createTimeBuilder_ = null;
      }
      if (updateTimeBuilder_ == null) {
        updateTime_ = null;
      } else {
        updateTime_ = null;
        updateTimeBuilder_ = null;
      }
      detailsCase_ = 0;
      details_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return io.grafeas.v1beta1.Grafeas.internal_static_grafeas_v1beta1_Occurrence_descriptor;
    }

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

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

    @java.lang.Override
    public io.grafeas.v1beta1.Occurrence buildPartial() {
      io.grafeas.v1beta1.Occurrence result = new io.grafeas.v1beta1.Occurrence(this);
      result.name_ = name_;
      if (resourceBuilder_ == null) {
        result.resource_ = resource_;
      } else {
        result.resource_ = resourceBuilder_.build();
      }
      result.noteName_ = noteName_;
      result.kind_ = kind_;
      result.remediation_ = remediation_;
      if (createTimeBuilder_ == null) {
        result.createTime_ = createTime_;
      } else {
        result.createTime_ = createTimeBuilder_.build();
      }
      if (updateTimeBuilder_ == null) {
        result.updateTime_ = updateTime_;
      } else {
        result.updateTime_ = updateTimeBuilder_.build();
      }
      if (detailsCase_ == 8) {
        if (vulnerabilityBuilder_ == null) {
          result.details_ = details_;
        } else {
          result.details_ = vulnerabilityBuilder_.build();
        }
      }
      if (detailsCase_ == 9) {
        if (buildBuilder_ == null) {
          result.details_ = details_;
        } else {
          result.details_ = buildBuilder_.build();
        }
      }
      if (detailsCase_ == 10) {
        if (derivedImageBuilder_ == null) {
          result.details_ = details_;
        } else {
          result.details_ = derivedImageBuilder_.build();
        }
      }
      if (detailsCase_ == 11) {
        if (installationBuilder_ == null) {
          result.details_ = details_;
        } else {
          result.details_ = installationBuilder_.build();
        }
      }
      if (detailsCase_ == 12) {
        if (deploymentBuilder_ == null) {
          result.details_ = details_;
        } else {
          result.details_ = deploymentBuilder_.build();
        }
      }
      if (detailsCase_ == 13) {
        if (discoveredBuilder_ == null) {
          result.details_ = details_;
        } else {
          result.details_ = discoveredBuilder_.build();
        }
      }
      if (detailsCase_ == 14) {
        if (attestationBuilder_ == null) {
          result.details_ = details_;
        } else {
          result.details_ = attestationBuilder_.build();
        }
      }
      result.detailsCase_ = detailsCase_;
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(io.grafeas.v1beta1.Occurrence other) {
      if (other == io.grafeas.v1beta1.Occurrence.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (other.hasResource()) {
        mergeResource(other.getResource());
      }
      if (!other.getNoteName().isEmpty()) {
        noteName_ = other.noteName_;
        onChanged();
      }
      if (other.kind_ != 0) {
        setKindValue(other.getKindValue());
      }
      if (!other.getRemediation().isEmpty()) {
        remediation_ = other.remediation_;
        onChanged();
      }
      if (other.hasCreateTime()) {
        mergeCreateTime(other.getCreateTime());
      }
      if (other.hasUpdateTime()) {
        mergeUpdateTime(other.getUpdateTime());
      }
      switch (other.getDetailsCase()) {
        case VULNERABILITY: {
          mergeVulnerability(other.getVulnerability());
          break;
        }
        case BUILD: {
          mergeBuild(other.getBuild());
          break;
        }
        case DERIVED_IMAGE: {
          mergeDerivedImage(other.getDerivedImage());
          break;
        }
        case INSTALLATION: {
          mergeInstallation(other.getInstallation());
          break;
        }
        case DEPLOYMENT: {
          mergeDeployment(other.getDeployment());
          break;
        }
        case DISCOVERED: {
          mergeDiscovered(other.getDiscovered());
          break;
        }
        case ATTESTATION: {
          mergeAttestation(other.getAttestation());
          break;
        }
        case DETAILS_NOT_SET: {
          break;
        }
      }
      this.mergeUnknownFields(other.unknownFields);
      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 {
      io.grafeas.v1beta1.Occurrence parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (io.grafeas.v1beta1.Occurrence) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int detailsCase_ = 0;
    private java.lang.Object details_;
    public DetailsCase
        getDetailsCase() {
      return DetailsCase.forNumber(
          detailsCase_);
    }

    public Builder clearDetails() {
      detailsCase_ = 0;
      details_ = null;
      onChanged();
      return this;
    }


    private java.lang.Object name_ = "";
    /**
     * <pre>
     * Output only. The name of the occurrence in the form of
     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Output only. The name of the occurrence in the form of
     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public com.google.protobuf.ByteString
        getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Output only. The name of the occurrence in the form of
     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      name_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. The name of the occurrence in the form of
     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder clearName() {
      
      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. The name of the occurrence in the form of
     * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      name_ = value;
      onChanged();
      return this;
    }

    private io.grafeas.v1beta1.Resource resource_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.Resource, io.grafeas.v1beta1.Resource.Builder, io.grafeas.v1beta1.ResourceOrBuilder> resourceBuilder_;
    /**
     * <pre>
     * Required. Immutable. The resource for which the occurrence applies.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 2;</code>
     */
    public boolean hasResource() {
      return resourceBuilder_ != null || resource_ != null;
    }
    /**
     * <pre>
     * Required. Immutable. The resource for which the occurrence applies.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 2;</code>
     */
    public io.grafeas.v1beta1.Resource getResource() {
      if (resourceBuilder_ == null) {
        return resource_ == null ? io.grafeas.v1beta1.Resource.getDefaultInstance() : resource_;
      } else {
        return resourceBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Required. Immutable. The resource for which the occurrence applies.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 2;</code>
     */
    public Builder setResource(io.grafeas.v1beta1.Resource value) {
      if (resourceBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        resource_ = value;
        onChanged();
      } else {
        resourceBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Required. Immutable. The resource for which the occurrence applies.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 2;</code>
     */
    public Builder setResource(
        io.grafeas.v1beta1.Resource.Builder builderForValue) {
      if (resourceBuilder_ == null) {
        resource_ = builderForValue.build();
        onChanged();
      } else {
        resourceBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Required. Immutable. The resource for which the occurrence applies.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 2;</code>
     */
    public Builder mergeResource(io.grafeas.v1beta1.Resource value) {
      if (resourceBuilder_ == null) {
        if (resource_ != null) {
          resource_ =
            io.grafeas.v1beta1.Resource.newBuilder(resource_).mergeFrom(value).buildPartial();
        } else {
          resource_ = value;
        }
        onChanged();
      } else {
        resourceBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Required. Immutable. The resource for which the occurrence applies.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 2;</code>
     */
    public Builder clearResource() {
      if (resourceBuilder_ == null) {
        resource_ = null;
        onChanged();
      } else {
        resource_ = null;
        resourceBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Required. Immutable. The resource for which the occurrence applies.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 2;</code>
     */
    public io.grafeas.v1beta1.Resource.Builder getResourceBuilder() {
      
      onChanged();
      return getResourceFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Required. Immutable. The resource for which the occurrence applies.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 2;</code>
     */
    public io.grafeas.v1beta1.ResourceOrBuilder getResourceOrBuilder() {
      if (resourceBuilder_ != null) {
        return resourceBuilder_.getMessageOrBuilder();
      } else {
        return resource_ == null ?
            io.grafeas.v1beta1.Resource.getDefaultInstance() : resource_;
      }
    }
    /**
     * <pre>
     * Required. Immutable. The resource for which the occurrence applies.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.Resource, io.grafeas.v1beta1.Resource.Builder, io.grafeas.v1beta1.ResourceOrBuilder> 
        getResourceFieldBuilder() {
      if (resourceBuilder_ == null) {
        resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.grafeas.v1beta1.Resource, io.grafeas.v1beta1.Resource.Builder, io.grafeas.v1beta1.ResourceOrBuilder>(
                getResource(),
                getParentForChildren(),
                isClean());
        resource_ = null;
      }
      return resourceBuilder_;
    }

    private java.lang.Object noteName_ = "";
    /**
     * <pre>
     * Required. Immutable. The analysis note associated with this occurrence, in
     * the form of `projects[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used
     * as a filter in list requests.
     * </pre>
     *
     * <code>string note_name = 3;</code>
     */
    public java.lang.String getNoteName() {
      java.lang.Object ref = noteName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        noteName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Required. Immutable. The analysis note associated with this occurrence, in
     * the form of `projects[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used
     * as a filter in list requests.
     * </pre>
     *
     * <code>string note_name = 3;</code>
     */
    public com.google.protobuf.ByteString
        getNoteNameBytes() {
      java.lang.Object ref = noteName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        noteName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Required. Immutable. The analysis note associated with this occurrence, in
     * the form of `projects[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used
     * as a filter in list requests.
     * </pre>
     *
     * <code>string note_name = 3;</code>
     */
    public Builder setNoteName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      noteName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Required. Immutable. The analysis note associated with this occurrence, in
     * the form of `projects[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used
     * as a filter in list requests.
     * </pre>
     *
     * <code>string note_name = 3;</code>
     */
    public Builder clearNoteName() {
      
      noteName_ = getDefaultInstance().getNoteName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Required. Immutable. The analysis note associated with this occurrence, in
     * the form of `projects[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used
     * as a filter in list requests.
     * </pre>
     *
     * <code>string note_name = 3;</code>
     */
    public Builder setNoteNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      noteName_ = value;
      onChanged();
      return this;
    }

    private int kind_ = 0;
    /**
     * <pre>
     * Output only. This explicitly denotes which of the occurrence details are
     * specified. This field can be used as a filter in list requests.
     * </pre>
     *
     * <code>.grafeas.v1beta1.NoteKind kind = 4;</code>
     */
    public int getKindValue() {
      return kind_;
    }
    /**
     * <pre>
     * Output only. This explicitly denotes which of the occurrence details are
     * specified. This field can be used as a filter in list requests.
     * </pre>
     *
     * <code>.grafeas.v1beta1.NoteKind kind = 4;</code>
     */
    public Builder setKindValue(int value) {
      kind_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. This explicitly denotes which of the occurrence details are
     * specified. This field can be used as a filter in list requests.
     * </pre>
     *
     * <code>.grafeas.v1beta1.NoteKind kind = 4;</code>
     */
    public io.grafeas.v1beta1.common.NoteKind getKind() {
      @SuppressWarnings("deprecation")
      io.grafeas.v1beta1.common.NoteKind result = io.grafeas.v1beta1.common.NoteKind.valueOf(kind_);
      return result == null ? io.grafeas.v1beta1.common.NoteKind.UNRECOGNIZED : result;
    }
    /**
     * <pre>
     * Output only. This explicitly denotes which of the occurrence details are
     * specified. This field can be used as a filter in list requests.
     * </pre>
     *
     * <code>.grafeas.v1beta1.NoteKind kind = 4;</code>
     */
    public Builder setKind(io.grafeas.v1beta1.common.NoteKind value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      kind_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. This explicitly denotes which of the occurrence details are
     * specified. This field can be used as a filter in list requests.
     * </pre>
     *
     * <code>.grafeas.v1beta1.NoteKind kind = 4;</code>
     */
    public Builder clearKind() {
      
      kind_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object remediation_ = "";
    /**
     * <pre>
     * A description of actions that can be taken to remedy the note.
     * </pre>
     *
     * <code>string remediation = 5;</code>
     */
    public java.lang.String getRemediation() {
      java.lang.Object ref = remediation_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        remediation_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * A description of actions that can be taken to remedy the note.
     * </pre>
     *
     * <code>string remediation = 5;</code>
     */
    public com.google.protobuf.ByteString
        getRemediationBytes() {
      java.lang.Object ref = remediation_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        remediation_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * A description of actions that can be taken to remedy the note.
     * </pre>
     *
     * <code>string remediation = 5;</code>
     */
    public Builder setRemediation(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      remediation_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A description of actions that can be taken to remedy the note.
     * </pre>
     *
     * <code>string remediation = 5;</code>
     */
    public Builder clearRemediation() {
      
      remediation_ = getDefaultInstance().getRemediation();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A description of actions that can be taken to remedy the note.
     * </pre>
     *
     * <code>string remediation = 5;</code>
     */
    public Builder setRemediationBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      remediation_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp createTime_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_;
    /**
     * <pre>
     * Output only. The time this occurrence was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 6;</code>
     */
    public boolean hasCreateTime() {
      return createTimeBuilder_ != null || createTime_ != null;
    }
    /**
     * <pre>
     * Output only. The time this occurrence was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 6;</code>
     */
    public com.google.protobuf.Timestamp getCreateTime() {
      if (createTimeBuilder_ == null) {
        return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
      } else {
        return createTimeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Output only. The time this occurrence was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 6;</code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        createTime_ = value;
        onChanged();
      } else {
        createTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Output only. The time this occurrence was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 6;</code>
     */
    public Builder setCreateTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      if (createTimeBuilder_ == null) {
        createTime_ = builderForValue.build();
        onChanged();
      } else {
        createTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Output only. The time this occurrence was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 6;</code>
     */
    public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (createTime_ != null) {
          createTime_ =
            com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial();
        } else {
          createTime_ = value;
        }
        onChanged();
      } else {
        createTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Output only. The time this occurrence was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 6;</code>
     */
    public Builder clearCreateTime() {
      if (createTimeBuilder_ == null) {
        createTime_ = null;
        onChanged();
      } else {
        createTime_ = null;
        createTimeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Output only. The time this occurrence was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 6;</code>
     */
    public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
      
      onChanged();
      return getCreateTimeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Output only. The time this occurrence was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 6;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
      if (createTimeBuilder_ != null) {
        return createTimeBuilder_.getMessageOrBuilder();
      } else {
        return createTime_ == null ?
            com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
      }
    }
    /**
     * <pre>
     * Output only. The time this occurrence was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 6;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 
        getCreateTimeFieldBuilder() {
      if (createTimeBuilder_ == null) {
        createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                getCreateTime(),
                getParentForChildren(),
                isClean());
        createTime_ = null;
      }
      return createTimeBuilder_;
    }

    private com.google.protobuf.Timestamp updateTime_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_;
    /**
     * <pre>
     * Output only. The time this occurrence was last updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 7;</code>
     */
    public boolean hasUpdateTime() {
      return updateTimeBuilder_ != null || updateTime_ != null;
    }
    /**
     * <pre>
     * Output only. The time this occurrence was last updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 7;</code>
     */
    public com.google.protobuf.Timestamp getUpdateTime() {
      if (updateTimeBuilder_ == null) {
        return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
      } else {
        return updateTimeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Output only. The time this occurrence was last updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 7;</code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        updateTime_ = value;
        onChanged();
      } else {
        updateTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Output only. The time this occurrence was last updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 7;</code>
     */
    public Builder setUpdateTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      if (updateTimeBuilder_ == null) {
        updateTime_ = builderForValue.build();
        onChanged();
      } else {
        updateTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Output only. The time this occurrence was last updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 7;</code>
     */
    public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (updateTime_ != null) {
          updateTime_ =
            com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial();
        } else {
          updateTime_ = value;
        }
        onChanged();
      } else {
        updateTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Output only. The time this occurrence was last updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 7;</code>
     */
    public Builder clearUpdateTime() {
      if (updateTimeBuilder_ == null) {
        updateTime_ = null;
        onChanged();
      } else {
        updateTime_ = null;
        updateTimeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Output only. The time this occurrence was last updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 7;</code>
     */
    public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
      
      onChanged();
      return getUpdateTimeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Output only. The time this occurrence was last updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 7;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
      if (updateTimeBuilder_ != null) {
        return updateTimeBuilder_.getMessageOrBuilder();
      } else {
        return updateTime_ == null ?
            com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
      }
    }
    /**
     * <pre>
     * Output only. The time this occurrence was last updated.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp update_time = 7;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 
        getUpdateTimeFieldBuilder() {
      if (updateTimeBuilder_ == null) {
        updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                getUpdateTime(),
                getParentForChildren(),
                isClean());
        updateTime_ = null;
      }
      return updateTimeBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.vulnerability.Details, io.grafeas.v1beta1.vulnerability.Details.Builder, io.grafeas.v1beta1.vulnerability.DetailsOrBuilder> vulnerabilityBuilder_;
    /**
     * <pre>
     * Describes a security vulnerability.
     * </pre>
     *
     * <code>.grafeas.v1beta1.vulnerability.Details vulnerability = 8;</code>
     */
    public boolean hasVulnerability() {
      return detailsCase_ == 8;
    }
    /**
     * <pre>
     * Describes a security vulnerability.
     * </pre>
     *
     * <code>.grafeas.v1beta1.vulnerability.Details vulnerability = 8;</code>
     */
    public io.grafeas.v1beta1.vulnerability.Details getVulnerability() {
      if (vulnerabilityBuilder_ == null) {
        if (detailsCase_ == 8) {
          return (io.grafeas.v1beta1.vulnerability.Details) details_;
        }
        return io.grafeas.v1beta1.vulnerability.Details.getDefaultInstance();
      } else {
        if (detailsCase_ == 8) {
          return vulnerabilityBuilder_.getMessage();
        }
        return io.grafeas.v1beta1.vulnerability.Details.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Describes a security vulnerability.
     * </pre>
     *
     * <code>.grafeas.v1beta1.vulnerability.Details vulnerability = 8;</code>
     */
    public Builder setVulnerability(io.grafeas.v1beta1.vulnerability.Details value) {
      if (vulnerabilityBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        details_ = value;
        onChanged();
      } else {
        vulnerabilityBuilder_.setMessage(value);
      }
      detailsCase_ = 8;
      return this;
    }
    /**
     * <pre>
     * Describes a security vulnerability.
     * </pre>
     *
     * <code>.grafeas.v1beta1.vulnerability.Details vulnerability = 8;</code>
     */
    public Builder setVulnerability(
        io.grafeas.v1beta1.vulnerability.Details.Builder builderForValue) {
      if (vulnerabilityBuilder_ == null) {
        details_ = builderForValue.build();
        onChanged();
      } else {
        vulnerabilityBuilder_.setMessage(builderForValue.build());
      }
      detailsCase_ = 8;
      return this;
    }
    /**
     * <pre>
     * Describes a security vulnerability.
     * </pre>
     *
     * <code>.grafeas.v1beta1.vulnerability.Details vulnerability = 8;</code>
     */
    public Builder mergeVulnerability(io.grafeas.v1beta1.vulnerability.Details value) {
      if (vulnerabilityBuilder_ == null) {
        if (detailsCase_ == 8 &&
            details_ != io.grafeas.v1beta1.vulnerability.Details.getDefaultInstance()) {
          details_ = io.grafeas.v1beta1.vulnerability.Details.newBuilder((io.grafeas.v1beta1.vulnerability.Details) details_)
              .mergeFrom(value).buildPartial();
        } else {
          details_ = value;
        }
        onChanged();
      } else {
        if (detailsCase_ == 8) {
          vulnerabilityBuilder_.mergeFrom(value);
        }
        vulnerabilityBuilder_.setMessage(value);
      }
      detailsCase_ = 8;
      return this;
    }
    /**
     * <pre>
     * Describes a security vulnerability.
     * </pre>
     *
     * <code>.grafeas.v1beta1.vulnerability.Details vulnerability = 8;</code>
     */
    public Builder clearVulnerability() {
      if (vulnerabilityBuilder_ == null) {
        if (detailsCase_ == 8) {
          detailsCase_ = 0;
          details_ = null;
          onChanged();
        }
      } else {
        if (detailsCase_ == 8) {
          detailsCase_ = 0;
          details_ = null;
        }
        vulnerabilityBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Describes a security vulnerability.
     * </pre>
     *
     * <code>.grafeas.v1beta1.vulnerability.Details vulnerability = 8;</code>
     */
    public io.grafeas.v1beta1.vulnerability.Details.Builder getVulnerabilityBuilder() {
      return getVulnerabilityFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Describes a security vulnerability.
     * </pre>
     *
     * <code>.grafeas.v1beta1.vulnerability.Details vulnerability = 8;</code>
     */
    public io.grafeas.v1beta1.vulnerability.DetailsOrBuilder getVulnerabilityOrBuilder() {
      if ((detailsCase_ == 8) && (vulnerabilityBuilder_ != null)) {
        return vulnerabilityBuilder_.getMessageOrBuilder();
      } else {
        if (detailsCase_ == 8) {
          return (io.grafeas.v1beta1.vulnerability.Details) details_;
        }
        return io.grafeas.v1beta1.vulnerability.Details.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Describes a security vulnerability.
     * </pre>
     *
     * <code>.grafeas.v1beta1.vulnerability.Details vulnerability = 8;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.vulnerability.Details, io.grafeas.v1beta1.vulnerability.Details.Builder, io.grafeas.v1beta1.vulnerability.DetailsOrBuilder> 
        getVulnerabilityFieldBuilder() {
      if (vulnerabilityBuilder_ == null) {
        if (!(detailsCase_ == 8)) {
          details_ = io.grafeas.v1beta1.vulnerability.Details.getDefaultInstance();
        }
        vulnerabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.grafeas.v1beta1.vulnerability.Details, io.grafeas.v1beta1.vulnerability.Details.Builder, io.grafeas.v1beta1.vulnerability.DetailsOrBuilder>(
                (io.grafeas.v1beta1.vulnerability.Details) details_,
                getParentForChildren(),
                isClean());
        details_ = null;
      }
      detailsCase_ = 8;
      onChanged();;
      return vulnerabilityBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.build.Details, io.grafeas.v1beta1.build.Details.Builder, io.grafeas.v1beta1.build.DetailsOrBuilder> buildBuilder_;
    /**
     * <pre>
     * Describes a verifiable build.
     * </pre>
     *
     * <code>.grafeas.v1beta1.build.Details build = 9;</code>
     */
    public boolean hasBuild() {
      return detailsCase_ == 9;
    }
    /**
     * <pre>
     * Describes a verifiable build.
     * </pre>
     *
     * <code>.grafeas.v1beta1.build.Details build = 9;</code>
     */
    public io.grafeas.v1beta1.build.Details getBuild() {
      if (buildBuilder_ == null) {
        if (detailsCase_ == 9) {
          return (io.grafeas.v1beta1.build.Details) details_;
        }
        return io.grafeas.v1beta1.build.Details.getDefaultInstance();
      } else {
        if (detailsCase_ == 9) {
          return buildBuilder_.getMessage();
        }
        return io.grafeas.v1beta1.build.Details.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Describes a verifiable build.
     * </pre>
     *
     * <code>.grafeas.v1beta1.build.Details build = 9;</code>
     */
    public Builder setBuild(io.grafeas.v1beta1.build.Details value) {
      if (buildBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        details_ = value;
        onChanged();
      } else {
        buildBuilder_.setMessage(value);
      }
      detailsCase_ = 9;
      return this;
    }
    /**
     * <pre>
     * Describes a verifiable build.
     * </pre>
     *
     * <code>.grafeas.v1beta1.build.Details build = 9;</code>
     */
    public Builder setBuild(
        io.grafeas.v1beta1.build.Details.Builder builderForValue) {
      if (buildBuilder_ == null) {
        details_ = builderForValue.build();
        onChanged();
      } else {
        buildBuilder_.setMessage(builderForValue.build());
      }
      detailsCase_ = 9;
      return this;
    }
    /**
     * <pre>
     * Describes a verifiable build.
     * </pre>
     *
     * <code>.grafeas.v1beta1.build.Details build = 9;</code>
     */
    public Builder mergeBuild(io.grafeas.v1beta1.build.Details value) {
      if (buildBuilder_ == null) {
        if (detailsCase_ == 9 &&
            details_ != io.grafeas.v1beta1.build.Details.getDefaultInstance()) {
          details_ = io.grafeas.v1beta1.build.Details.newBuilder((io.grafeas.v1beta1.build.Details) details_)
              .mergeFrom(value).buildPartial();
        } else {
          details_ = value;
        }
        onChanged();
      } else {
        if (detailsCase_ == 9) {
          buildBuilder_.mergeFrom(value);
        }
        buildBuilder_.setMessage(value);
      }
      detailsCase_ = 9;
      return this;
    }
    /**
     * <pre>
     * Describes a verifiable build.
     * </pre>
     *
     * <code>.grafeas.v1beta1.build.Details build = 9;</code>
     */
    public Builder clearBuild() {
      if (buildBuilder_ == null) {
        if (detailsCase_ == 9) {
          detailsCase_ = 0;
          details_ = null;
          onChanged();
        }
      } else {
        if (detailsCase_ == 9) {
          detailsCase_ = 0;
          details_ = null;
        }
        buildBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Describes a verifiable build.
     * </pre>
     *
     * <code>.grafeas.v1beta1.build.Details build = 9;</code>
     */
    public io.grafeas.v1beta1.build.Details.Builder getBuildBuilder() {
      return getBuildFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Describes a verifiable build.
     * </pre>
     *
     * <code>.grafeas.v1beta1.build.Details build = 9;</code>
     */
    public io.grafeas.v1beta1.build.DetailsOrBuilder getBuildOrBuilder() {
      if ((detailsCase_ == 9) && (buildBuilder_ != null)) {
        return buildBuilder_.getMessageOrBuilder();
      } else {
        if (detailsCase_ == 9) {
          return (io.grafeas.v1beta1.build.Details) details_;
        }
        return io.grafeas.v1beta1.build.Details.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Describes a verifiable build.
     * </pre>
     *
     * <code>.grafeas.v1beta1.build.Details build = 9;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.build.Details, io.grafeas.v1beta1.build.Details.Builder, io.grafeas.v1beta1.build.DetailsOrBuilder> 
        getBuildFieldBuilder() {
      if (buildBuilder_ == null) {
        if (!(detailsCase_ == 9)) {
          details_ = io.grafeas.v1beta1.build.Details.getDefaultInstance();
        }
        buildBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.grafeas.v1beta1.build.Details, io.grafeas.v1beta1.build.Details.Builder, io.grafeas.v1beta1.build.DetailsOrBuilder>(
                (io.grafeas.v1beta1.build.Details) details_,
                getParentForChildren(),
                isClean());
        details_ = null;
      }
      detailsCase_ = 9;
      onChanged();;
      return buildBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.image.Details, io.grafeas.v1beta1.image.Details.Builder, io.grafeas.v1beta1.image.DetailsOrBuilder> derivedImageBuilder_;
    /**
     * <pre>
     * Describes how this resource derives from the basis in the associated
     * note.
     * </pre>
     *
     * <code>.grafeas.v1beta1.image.Details derived_image = 10;</code>
     */
    public boolean hasDerivedImage() {
      return detailsCase_ == 10;
    }
    /**
     * <pre>
     * Describes how this resource derives from the basis in the associated
     * note.
     * </pre>
     *
     * <code>.grafeas.v1beta1.image.Details derived_image = 10;</code>
     */
    public io.grafeas.v1beta1.image.Details getDerivedImage() {
      if (derivedImageBuilder_ == null) {
        if (detailsCase_ == 10) {
          return (io.grafeas.v1beta1.image.Details) details_;
        }
        return io.grafeas.v1beta1.image.Details.getDefaultInstance();
      } else {
        if (detailsCase_ == 10) {
          return derivedImageBuilder_.getMessage();
        }
        return io.grafeas.v1beta1.image.Details.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Describes how this resource derives from the basis in the associated
     * note.
     * </pre>
     *
     * <code>.grafeas.v1beta1.image.Details derived_image = 10;</code>
     */
    public Builder setDerivedImage(io.grafeas.v1beta1.image.Details value) {
      if (derivedImageBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        details_ = value;
        onChanged();
      } else {
        derivedImageBuilder_.setMessage(value);
      }
      detailsCase_ = 10;
      return this;
    }
    /**
     * <pre>
     * Describes how this resource derives from the basis in the associated
     * note.
     * </pre>
     *
     * <code>.grafeas.v1beta1.image.Details derived_image = 10;</code>
     */
    public Builder setDerivedImage(
        io.grafeas.v1beta1.image.Details.Builder builderForValue) {
      if (derivedImageBuilder_ == null) {
        details_ = builderForValue.build();
        onChanged();
      } else {
        derivedImageBuilder_.setMessage(builderForValue.build());
      }
      detailsCase_ = 10;
      return this;
    }
    /**
     * <pre>
     * Describes how this resource derives from the basis in the associated
     * note.
     * </pre>
     *
     * <code>.grafeas.v1beta1.image.Details derived_image = 10;</code>
     */
    public Builder mergeDerivedImage(io.grafeas.v1beta1.image.Details value) {
      if (derivedImageBuilder_ == null) {
        if (detailsCase_ == 10 &&
            details_ != io.grafeas.v1beta1.image.Details.getDefaultInstance()) {
          details_ = io.grafeas.v1beta1.image.Details.newBuilder((io.grafeas.v1beta1.image.Details) details_)
              .mergeFrom(value).buildPartial();
        } else {
          details_ = value;
        }
        onChanged();
      } else {
        if (detailsCase_ == 10) {
          derivedImageBuilder_.mergeFrom(value);
        }
        derivedImageBuilder_.setMessage(value);
      }
      detailsCase_ = 10;
      return this;
    }
    /**
     * <pre>
     * Describes how this resource derives from the basis in the associated
     * note.
     * </pre>
     *
     * <code>.grafeas.v1beta1.image.Details derived_image = 10;</code>
     */
    public Builder clearDerivedImage() {
      if (derivedImageBuilder_ == null) {
        if (detailsCase_ == 10) {
          detailsCase_ = 0;
          details_ = null;
          onChanged();
        }
      } else {
        if (detailsCase_ == 10) {
          detailsCase_ = 0;
          details_ = null;
        }
        derivedImageBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Describes how this resource derives from the basis in the associated
     * note.
     * </pre>
     *
     * <code>.grafeas.v1beta1.image.Details derived_image = 10;</code>
     */
    public io.grafeas.v1beta1.image.Details.Builder getDerivedImageBuilder() {
      return getDerivedImageFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Describes how this resource derives from the basis in the associated
     * note.
     * </pre>
     *
     * <code>.grafeas.v1beta1.image.Details derived_image = 10;</code>
     */
    public io.grafeas.v1beta1.image.DetailsOrBuilder getDerivedImageOrBuilder() {
      if ((detailsCase_ == 10) && (derivedImageBuilder_ != null)) {
        return derivedImageBuilder_.getMessageOrBuilder();
      } else {
        if (detailsCase_ == 10) {
          return (io.grafeas.v1beta1.image.Details) details_;
        }
        return io.grafeas.v1beta1.image.Details.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Describes how this resource derives from the basis in the associated
     * note.
     * </pre>
     *
     * <code>.grafeas.v1beta1.image.Details derived_image = 10;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.image.Details, io.grafeas.v1beta1.image.Details.Builder, io.grafeas.v1beta1.image.DetailsOrBuilder> 
        getDerivedImageFieldBuilder() {
      if (derivedImageBuilder_ == null) {
        if (!(detailsCase_ == 10)) {
          details_ = io.grafeas.v1beta1.image.Details.getDefaultInstance();
        }
        derivedImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.grafeas.v1beta1.image.Details, io.grafeas.v1beta1.image.Details.Builder, io.grafeas.v1beta1.image.DetailsOrBuilder>(
                (io.grafeas.v1beta1.image.Details) details_,
                getParentForChildren(),
                isClean());
        details_ = null;
      }
      detailsCase_ = 10;
      onChanged();;
      return derivedImageBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.pkg.Details, io.grafeas.v1beta1.pkg.Details.Builder, io.grafeas.v1beta1.pkg.DetailsOrBuilder> installationBuilder_;
    /**
     * <pre>
     * Describes the installation of a package on the linked resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.package.Details installation = 11;</code>
     */
    public boolean hasInstallation() {
      return detailsCase_ == 11;
    }
    /**
     * <pre>
     * Describes the installation of a package on the linked resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.package.Details installation = 11;</code>
     */
    public io.grafeas.v1beta1.pkg.Details getInstallation() {
      if (installationBuilder_ == null) {
        if (detailsCase_ == 11) {
          return (io.grafeas.v1beta1.pkg.Details) details_;
        }
        return io.grafeas.v1beta1.pkg.Details.getDefaultInstance();
      } else {
        if (detailsCase_ == 11) {
          return installationBuilder_.getMessage();
        }
        return io.grafeas.v1beta1.pkg.Details.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Describes the installation of a package on the linked resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.package.Details installation = 11;</code>
     */
    public Builder setInstallation(io.grafeas.v1beta1.pkg.Details value) {
      if (installationBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        details_ = value;
        onChanged();
      } else {
        installationBuilder_.setMessage(value);
      }
      detailsCase_ = 11;
      return this;
    }
    /**
     * <pre>
     * Describes the installation of a package on the linked resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.package.Details installation = 11;</code>
     */
    public Builder setInstallation(
        io.grafeas.v1beta1.pkg.Details.Builder builderForValue) {
      if (installationBuilder_ == null) {
        details_ = builderForValue.build();
        onChanged();
      } else {
        installationBuilder_.setMessage(builderForValue.build());
      }
      detailsCase_ = 11;
      return this;
    }
    /**
     * <pre>
     * Describes the installation of a package on the linked resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.package.Details installation = 11;</code>
     */
    public Builder mergeInstallation(io.grafeas.v1beta1.pkg.Details value) {
      if (installationBuilder_ == null) {
        if (detailsCase_ == 11 &&
            details_ != io.grafeas.v1beta1.pkg.Details.getDefaultInstance()) {
          details_ = io.grafeas.v1beta1.pkg.Details.newBuilder((io.grafeas.v1beta1.pkg.Details) details_)
              .mergeFrom(value).buildPartial();
        } else {
          details_ = value;
        }
        onChanged();
      } else {
        if (detailsCase_ == 11) {
          installationBuilder_.mergeFrom(value);
        }
        installationBuilder_.setMessage(value);
      }
      detailsCase_ = 11;
      return this;
    }
    /**
     * <pre>
     * Describes the installation of a package on the linked resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.package.Details installation = 11;</code>
     */
    public Builder clearInstallation() {
      if (installationBuilder_ == null) {
        if (detailsCase_ == 11) {
          detailsCase_ = 0;
          details_ = null;
          onChanged();
        }
      } else {
        if (detailsCase_ == 11) {
          detailsCase_ = 0;
          details_ = null;
        }
        installationBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Describes the installation of a package on the linked resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.package.Details installation = 11;</code>
     */
    public io.grafeas.v1beta1.pkg.Details.Builder getInstallationBuilder() {
      return getInstallationFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Describes the installation of a package on the linked resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.package.Details installation = 11;</code>
     */
    public io.grafeas.v1beta1.pkg.DetailsOrBuilder getInstallationOrBuilder() {
      if ((detailsCase_ == 11) && (installationBuilder_ != null)) {
        return installationBuilder_.getMessageOrBuilder();
      } else {
        if (detailsCase_ == 11) {
          return (io.grafeas.v1beta1.pkg.Details) details_;
        }
        return io.grafeas.v1beta1.pkg.Details.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Describes the installation of a package on the linked resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.package.Details installation = 11;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.pkg.Details, io.grafeas.v1beta1.pkg.Details.Builder, io.grafeas.v1beta1.pkg.DetailsOrBuilder> 
        getInstallationFieldBuilder() {
      if (installationBuilder_ == null) {
        if (!(detailsCase_ == 11)) {
          details_ = io.grafeas.v1beta1.pkg.Details.getDefaultInstance();
        }
        installationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.grafeas.v1beta1.pkg.Details, io.grafeas.v1beta1.pkg.Details.Builder, io.grafeas.v1beta1.pkg.DetailsOrBuilder>(
                (io.grafeas.v1beta1.pkg.Details) details_,
                getParentForChildren(),
                isClean());
        details_ = null;
      }
      detailsCase_ = 11;
      onChanged();;
      return installationBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.deployment.Details, io.grafeas.v1beta1.deployment.Details.Builder, io.grafeas.v1beta1.deployment.DetailsOrBuilder> deploymentBuilder_;
    /**
     * <pre>
     * Describes the deployment of an artifact on a runtime.
     * </pre>
     *
     * <code>.grafeas.v1beta1.deployment.Details deployment = 12;</code>
     */
    public boolean hasDeployment() {
      return detailsCase_ == 12;
    }
    /**
     * <pre>
     * Describes the deployment of an artifact on a runtime.
     * </pre>
     *
     * <code>.grafeas.v1beta1.deployment.Details deployment = 12;</code>
     */
    public io.grafeas.v1beta1.deployment.Details getDeployment() {
      if (deploymentBuilder_ == null) {
        if (detailsCase_ == 12) {
          return (io.grafeas.v1beta1.deployment.Details) details_;
        }
        return io.grafeas.v1beta1.deployment.Details.getDefaultInstance();
      } else {
        if (detailsCase_ == 12) {
          return deploymentBuilder_.getMessage();
        }
        return io.grafeas.v1beta1.deployment.Details.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Describes the deployment of an artifact on a runtime.
     * </pre>
     *
     * <code>.grafeas.v1beta1.deployment.Details deployment = 12;</code>
     */
    public Builder setDeployment(io.grafeas.v1beta1.deployment.Details value) {
      if (deploymentBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        details_ = value;
        onChanged();
      } else {
        deploymentBuilder_.setMessage(value);
      }
      detailsCase_ = 12;
      return this;
    }
    /**
     * <pre>
     * Describes the deployment of an artifact on a runtime.
     * </pre>
     *
     * <code>.grafeas.v1beta1.deployment.Details deployment = 12;</code>
     */
    public Builder setDeployment(
        io.grafeas.v1beta1.deployment.Details.Builder builderForValue) {
      if (deploymentBuilder_ == null) {
        details_ = builderForValue.build();
        onChanged();
      } else {
        deploymentBuilder_.setMessage(builderForValue.build());
      }
      detailsCase_ = 12;
      return this;
    }
    /**
     * <pre>
     * Describes the deployment of an artifact on a runtime.
     * </pre>
     *
     * <code>.grafeas.v1beta1.deployment.Details deployment = 12;</code>
     */
    public Builder mergeDeployment(io.grafeas.v1beta1.deployment.Details value) {
      if (deploymentBuilder_ == null) {
        if (detailsCase_ == 12 &&
            details_ != io.grafeas.v1beta1.deployment.Details.getDefaultInstance()) {
          details_ = io.grafeas.v1beta1.deployment.Details.newBuilder((io.grafeas.v1beta1.deployment.Details) details_)
              .mergeFrom(value).buildPartial();
        } else {
          details_ = value;
        }
        onChanged();
      } else {
        if (detailsCase_ == 12) {
          deploymentBuilder_.mergeFrom(value);
        }
        deploymentBuilder_.setMessage(value);
      }
      detailsCase_ = 12;
      return this;
    }
    /**
     * <pre>
     * Describes the deployment of an artifact on a runtime.
     * </pre>
     *
     * <code>.grafeas.v1beta1.deployment.Details deployment = 12;</code>
     */
    public Builder clearDeployment() {
      if (deploymentBuilder_ == null) {
        if (detailsCase_ == 12) {
          detailsCase_ = 0;
          details_ = null;
          onChanged();
        }
      } else {
        if (detailsCase_ == 12) {
          detailsCase_ = 0;
          details_ = null;
        }
        deploymentBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Describes the deployment of an artifact on a runtime.
     * </pre>
     *
     * <code>.grafeas.v1beta1.deployment.Details deployment = 12;</code>
     */
    public io.grafeas.v1beta1.deployment.Details.Builder getDeploymentBuilder() {
      return getDeploymentFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Describes the deployment of an artifact on a runtime.
     * </pre>
     *
     * <code>.grafeas.v1beta1.deployment.Details deployment = 12;</code>
     */
    public io.grafeas.v1beta1.deployment.DetailsOrBuilder getDeploymentOrBuilder() {
      if ((detailsCase_ == 12) && (deploymentBuilder_ != null)) {
        return deploymentBuilder_.getMessageOrBuilder();
      } else {
        if (detailsCase_ == 12) {
          return (io.grafeas.v1beta1.deployment.Details) details_;
        }
        return io.grafeas.v1beta1.deployment.Details.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Describes the deployment of an artifact on a runtime.
     * </pre>
     *
     * <code>.grafeas.v1beta1.deployment.Details deployment = 12;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.deployment.Details, io.grafeas.v1beta1.deployment.Details.Builder, io.grafeas.v1beta1.deployment.DetailsOrBuilder> 
        getDeploymentFieldBuilder() {
      if (deploymentBuilder_ == null) {
        if (!(detailsCase_ == 12)) {
          details_ = io.grafeas.v1beta1.deployment.Details.getDefaultInstance();
        }
        deploymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.grafeas.v1beta1.deployment.Details, io.grafeas.v1beta1.deployment.Details.Builder, io.grafeas.v1beta1.deployment.DetailsOrBuilder>(
                (io.grafeas.v1beta1.deployment.Details) details_,
                getParentForChildren(),
                isClean());
        details_ = null;
      }
      detailsCase_ = 12;
      onChanged();;
      return deploymentBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.discovery.Details, io.grafeas.v1beta1.discovery.Details.Builder, io.grafeas.v1beta1.discovery.DetailsOrBuilder> discoveredBuilder_;
    /**
     * <pre>
     * Describes when a resource was discovered.
     * </pre>
     *
     * <code>.grafeas.v1beta1.discovery.Details discovered = 13;</code>
     */
    public boolean hasDiscovered() {
      return detailsCase_ == 13;
    }
    /**
     * <pre>
     * Describes when a resource was discovered.
     * </pre>
     *
     * <code>.grafeas.v1beta1.discovery.Details discovered = 13;</code>
     */
    public io.grafeas.v1beta1.discovery.Details getDiscovered() {
      if (discoveredBuilder_ == null) {
        if (detailsCase_ == 13) {
          return (io.grafeas.v1beta1.discovery.Details) details_;
        }
        return io.grafeas.v1beta1.discovery.Details.getDefaultInstance();
      } else {
        if (detailsCase_ == 13) {
          return discoveredBuilder_.getMessage();
        }
        return io.grafeas.v1beta1.discovery.Details.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Describes when a resource was discovered.
     * </pre>
     *
     * <code>.grafeas.v1beta1.discovery.Details discovered = 13;</code>
     */
    public Builder setDiscovered(io.grafeas.v1beta1.discovery.Details value) {
      if (discoveredBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        details_ = value;
        onChanged();
      } else {
        discoveredBuilder_.setMessage(value);
      }
      detailsCase_ = 13;
      return this;
    }
    /**
     * <pre>
     * Describes when a resource was discovered.
     * </pre>
     *
     * <code>.grafeas.v1beta1.discovery.Details discovered = 13;</code>
     */
    public Builder setDiscovered(
        io.grafeas.v1beta1.discovery.Details.Builder builderForValue) {
      if (discoveredBuilder_ == null) {
        details_ = builderForValue.build();
        onChanged();
      } else {
        discoveredBuilder_.setMessage(builderForValue.build());
      }
      detailsCase_ = 13;
      return this;
    }
    /**
     * <pre>
     * Describes when a resource was discovered.
     * </pre>
     *
     * <code>.grafeas.v1beta1.discovery.Details discovered = 13;</code>
     */
    public Builder mergeDiscovered(io.grafeas.v1beta1.discovery.Details value) {
      if (discoveredBuilder_ == null) {
        if (detailsCase_ == 13 &&
            details_ != io.grafeas.v1beta1.discovery.Details.getDefaultInstance()) {
          details_ = io.grafeas.v1beta1.discovery.Details.newBuilder((io.grafeas.v1beta1.discovery.Details) details_)
              .mergeFrom(value).buildPartial();
        } else {
          details_ = value;
        }
        onChanged();
      } else {
        if (detailsCase_ == 13) {
          discoveredBuilder_.mergeFrom(value);
        }
        discoveredBuilder_.setMessage(value);
      }
      detailsCase_ = 13;
      return this;
    }
    /**
     * <pre>
     * Describes when a resource was discovered.
     * </pre>
     *
     * <code>.grafeas.v1beta1.discovery.Details discovered = 13;</code>
     */
    public Builder clearDiscovered() {
      if (discoveredBuilder_ == null) {
        if (detailsCase_ == 13) {
          detailsCase_ = 0;
          details_ = null;
          onChanged();
        }
      } else {
        if (detailsCase_ == 13) {
          detailsCase_ = 0;
          details_ = null;
        }
        discoveredBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Describes when a resource was discovered.
     * </pre>
     *
     * <code>.grafeas.v1beta1.discovery.Details discovered = 13;</code>
     */
    public io.grafeas.v1beta1.discovery.Details.Builder getDiscoveredBuilder() {
      return getDiscoveredFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Describes when a resource was discovered.
     * </pre>
     *
     * <code>.grafeas.v1beta1.discovery.Details discovered = 13;</code>
     */
    public io.grafeas.v1beta1.discovery.DetailsOrBuilder getDiscoveredOrBuilder() {
      if ((detailsCase_ == 13) && (discoveredBuilder_ != null)) {
        return discoveredBuilder_.getMessageOrBuilder();
      } else {
        if (detailsCase_ == 13) {
          return (io.grafeas.v1beta1.discovery.Details) details_;
        }
        return io.grafeas.v1beta1.discovery.Details.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Describes when a resource was discovered.
     * </pre>
     *
     * <code>.grafeas.v1beta1.discovery.Details discovered = 13;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.discovery.Details, io.grafeas.v1beta1.discovery.Details.Builder, io.grafeas.v1beta1.discovery.DetailsOrBuilder> 
        getDiscoveredFieldBuilder() {
      if (discoveredBuilder_ == null) {
        if (!(detailsCase_ == 13)) {
          details_ = io.grafeas.v1beta1.discovery.Details.getDefaultInstance();
        }
        discoveredBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.grafeas.v1beta1.discovery.Details, io.grafeas.v1beta1.discovery.Details.Builder, io.grafeas.v1beta1.discovery.DetailsOrBuilder>(
                (io.grafeas.v1beta1.discovery.Details) details_,
                getParentForChildren(),
                isClean());
        details_ = null;
      }
      detailsCase_ = 13;
      onChanged();;
      return discoveredBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.attestation.Details, io.grafeas.v1beta1.attestation.Details.Builder, io.grafeas.v1beta1.attestation.DetailsOrBuilder> attestationBuilder_;
    /**
     * <pre>
     * Describes an attestation of an artifact.
     * </pre>
     *
     * <code>.grafeas.v1beta1.attestation.Details attestation = 14;</code>
     */
    public boolean hasAttestation() {
      return detailsCase_ == 14;
    }
    /**
     * <pre>
     * Describes an attestation of an artifact.
     * </pre>
     *
     * <code>.grafeas.v1beta1.attestation.Details attestation = 14;</code>
     */
    public io.grafeas.v1beta1.attestation.Details getAttestation() {
      if (attestationBuilder_ == null) {
        if (detailsCase_ == 14) {
          return (io.grafeas.v1beta1.attestation.Details) details_;
        }
        return io.grafeas.v1beta1.attestation.Details.getDefaultInstance();
      } else {
        if (detailsCase_ == 14) {
          return attestationBuilder_.getMessage();
        }
        return io.grafeas.v1beta1.attestation.Details.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Describes an attestation of an artifact.
     * </pre>
     *
     * <code>.grafeas.v1beta1.attestation.Details attestation = 14;</code>
     */
    public Builder setAttestation(io.grafeas.v1beta1.attestation.Details value) {
      if (attestationBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        details_ = value;
        onChanged();
      } else {
        attestationBuilder_.setMessage(value);
      }
      detailsCase_ = 14;
      return this;
    }
    /**
     * <pre>
     * Describes an attestation of an artifact.
     * </pre>
     *
     * <code>.grafeas.v1beta1.attestation.Details attestation = 14;</code>
     */
    public Builder setAttestation(
        io.grafeas.v1beta1.attestation.Details.Builder builderForValue) {
      if (attestationBuilder_ == null) {
        details_ = builderForValue.build();
        onChanged();
      } else {
        attestationBuilder_.setMessage(builderForValue.build());
      }
      detailsCase_ = 14;
      return this;
    }
    /**
     * <pre>
     * Describes an attestation of an artifact.
     * </pre>
     *
     * <code>.grafeas.v1beta1.attestation.Details attestation = 14;</code>
     */
    public Builder mergeAttestation(io.grafeas.v1beta1.attestation.Details value) {
      if (attestationBuilder_ == null) {
        if (detailsCase_ == 14 &&
            details_ != io.grafeas.v1beta1.attestation.Details.getDefaultInstance()) {
          details_ = io.grafeas.v1beta1.attestation.Details.newBuilder((io.grafeas.v1beta1.attestation.Details) details_)
              .mergeFrom(value).buildPartial();
        } else {
          details_ = value;
        }
        onChanged();
      } else {
        if (detailsCase_ == 14) {
          attestationBuilder_.mergeFrom(value);
        }
        attestationBuilder_.setMessage(value);
      }
      detailsCase_ = 14;
      return this;
    }
    /**
     * <pre>
     * Describes an attestation of an artifact.
     * </pre>
     *
     * <code>.grafeas.v1beta1.attestation.Details attestation = 14;</code>
     */
    public Builder clearAttestation() {
      if (attestationBuilder_ == null) {
        if (detailsCase_ == 14) {
          detailsCase_ = 0;
          details_ = null;
          onChanged();
        }
      } else {
        if (detailsCase_ == 14) {
          detailsCase_ = 0;
          details_ = null;
        }
        attestationBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Describes an attestation of an artifact.
     * </pre>
     *
     * <code>.grafeas.v1beta1.attestation.Details attestation = 14;</code>
     */
    public io.grafeas.v1beta1.attestation.Details.Builder getAttestationBuilder() {
      return getAttestationFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Describes an attestation of an artifact.
     * </pre>
     *
     * <code>.grafeas.v1beta1.attestation.Details attestation = 14;</code>
     */
    public io.grafeas.v1beta1.attestation.DetailsOrBuilder getAttestationOrBuilder() {
      if ((detailsCase_ == 14) && (attestationBuilder_ != null)) {
        return attestationBuilder_.getMessageOrBuilder();
      } else {
        if (detailsCase_ == 14) {
          return (io.grafeas.v1beta1.attestation.Details) details_;
        }
        return io.grafeas.v1beta1.attestation.Details.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Describes an attestation of an artifact.
     * </pre>
     *
     * <code>.grafeas.v1beta1.attestation.Details attestation = 14;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grafeas.v1beta1.attestation.Details, io.grafeas.v1beta1.attestation.Details.Builder, io.grafeas.v1beta1.attestation.DetailsOrBuilder> 
        getAttestationFieldBuilder() {
      if (attestationBuilder_ == null) {
        if (!(detailsCase_ == 14)) {
          details_ = io.grafeas.v1beta1.attestation.Details.getDefaultInstance();
        }
        attestationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.grafeas.v1beta1.attestation.Details, io.grafeas.v1beta1.attestation.Details.Builder, io.grafeas.v1beta1.attestation.DetailsOrBuilder>(
                (io.grafeas.v1beta1.attestation.Details) details_,
                getParentForChildren(),
                isClean());
        details_ = null;
      }
      detailsCase_ = 14;
      onChanged();;
      return attestationBuilder_;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:grafeas.v1beta1.Occurrence)
  }

  // @@protoc_insertion_point(class_scope:grafeas.v1beta1.Occurrence)
  private static final io.grafeas.v1beta1.Occurrence DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new io.grafeas.v1beta1.Occurrence();
  }

  public static io.grafeas.v1beta1.Occurrence getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<Occurrence>
      PARSER = new com.google.protobuf.AbstractParser<Occurrence>() {
    @java.lang.Override
    public Occurrence parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new Occurrence(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<Occurrence> parser() {
    return PARSER;
  }

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

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

}

