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

package io.grafeas.v1beta1;

/**
 * <pre>
 * A summary of how many vulnerability occurrences there are per resource and
 * severity type.
 * </pre>
 *
 * Protobuf type {@code grafeas.v1beta1.VulnerabilityOccurrencesSummary}
 */
public  final class VulnerabilityOccurrencesSummary extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:grafeas.v1beta1.VulnerabilityOccurrencesSummary)
    VulnerabilityOccurrencesSummaryOrBuilder {
private static final long serialVersionUID = 0L;
  // Use VulnerabilityOccurrencesSummary.newBuilder() to construct.
  private VulnerabilityOccurrencesSummary(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private VulnerabilityOccurrencesSummary() {
    counts_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private VulnerabilityOccurrencesSummary(
      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: {
            if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
              counts_ = new java.util.ArrayList<io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest>();
              mutable_bitField0_ |= 0x00000001;
            }
            counts_.add(
                input.readMessage(io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.parser(), extensionRegistry));
            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 {
      if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
        counts_ = java.util.Collections.unmodifiableList(counts_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.grafeas.v1beta1.Grafeas.internal_static_grafeas_v1beta1_VulnerabilityOccurrencesSummary_descriptor;
  }

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

  public interface FixableTotalByDigestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The affected resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 1;</code>
     */
    boolean hasResource();
    /**
     * <pre>
     * The affected resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 1;</code>
     */
    io.grafeas.v1beta1.Resource getResource();
    /**
     * <pre>
     * The affected resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 1;</code>
     */
    io.grafeas.v1beta1.ResourceOrBuilder getResourceOrBuilder();

    /**
     * <pre>
     * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
     * all severities.
     * </pre>
     *
     * <code>.grafeas.v1beta1.vulnerability.Severity severity = 2;</code>
     */
    int getSeverityValue();
    /**
     * <pre>
     * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
     * all severities.
     * </pre>
     *
     * <code>.grafeas.v1beta1.vulnerability.Severity severity = 2;</code>
     */
    io.grafeas.v1beta1.vulnerability.Severity getSeverity();

    /**
     * <pre>
     * The number of fixable vulnerabilities associated with this resource.
     * </pre>
     *
     * <code>int64 fixable_count = 3;</code>
     */
    long getFixableCount();

    /**
     * <pre>
     * The total number of vulnerabilities associated with this resource.
     * </pre>
     *
     * <code>int64 total_count = 4;</code>
     */
    long getTotalCount();
  }
  /**
   * <pre>
   * Per resource and severity counts of fixable and total vulnerabilites.
   * </pre>
   *
   * Protobuf type {@code grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest}
   */
  public  static final class FixableTotalByDigest extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest)
      FixableTotalByDigestOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use FixableTotalByDigest.newBuilder() to construct.
    private FixableTotalByDigest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private FixableTotalByDigest() {
      severity_ = 0;
      fixableCount_ = 0L;
      totalCount_ = 0L;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private FixableTotalByDigest(
        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: {
              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 16: {
              int rawValue = input.readEnum();

              severity_ = rawValue;
              break;
            }
            case 24: {

              fixableCount_ = input.readInt64();
              break;
            }
            case 32: {

              totalCount_ = input.readInt64();
              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_VulnerabilityOccurrencesSummary_FixableTotalByDigest_descriptor;
    }

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

    public static final int RESOURCE_FIELD_NUMBER = 1;
    private io.grafeas.v1beta1.Resource resource_;
    /**
     * <pre>
     * The affected resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 1;</code>
     */
    public boolean hasResource() {
      return resource_ != null;
    }
    /**
     * <pre>
     * The affected resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 1;</code>
     */
    public io.grafeas.v1beta1.Resource getResource() {
      return resource_ == null ? io.grafeas.v1beta1.Resource.getDefaultInstance() : resource_;
    }
    /**
     * <pre>
     * The affected resource.
     * </pre>
     *
     * <code>.grafeas.v1beta1.Resource resource = 1;</code>
     */
    public io.grafeas.v1beta1.ResourceOrBuilder getResourceOrBuilder() {
      return getResource();
    }

    public static final int SEVERITY_FIELD_NUMBER = 2;
    private int severity_;
    /**
     * <pre>
     * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
     * all severities.
     * </pre>
     *
     * <code>.grafeas.v1beta1.vulnerability.Severity severity = 2;</code>
     */
    public int getSeverityValue() {
      return severity_;
    }
    /**
     * <pre>
     * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
     * all severities.
     * </pre>
     *
     * <code>.grafeas.v1beta1.vulnerability.Severity severity = 2;</code>
     */
    public io.grafeas.v1beta1.vulnerability.Severity getSeverity() {
      @SuppressWarnings("deprecation")
      io.grafeas.v1beta1.vulnerability.Severity result = io.grafeas.v1beta1.vulnerability.Severity.valueOf(severity_);
      return result == null ? io.grafeas.v1beta1.vulnerability.Severity.UNRECOGNIZED : result;
    }

    public static final int FIXABLE_COUNT_FIELD_NUMBER = 3;
    private long fixableCount_;
    /**
     * <pre>
     * The number of fixable vulnerabilities associated with this resource.
     * </pre>
     *
     * <code>int64 fixable_count = 3;</code>
     */
    public long getFixableCount() {
      return fixableCount_;
    }

    public static final int TOTAL_COUNT_FIELD_NUMBER = 4;
    private long totalCount_;
    /**
     * <pre>
     * The total number of vulnerabilities associated with this resource.
     * </pre>
     *
     * <code>int64 total_count = 4;</code>
     */
    public long getTotalCount() {
      return totalCount_;
    }

    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 (resource_ != null) {
        output.writeMessage(1, getResource());
      }
      if (severity_ != io.grafeas.v1beta1.vulnerability.Severity.SEVERITY_UNSPECIFIED.getNumber()) {
        output.writeEnum(2, severity_);
      }
      if (fixableCount_ != 0L) {
        output.writeInt64(3, fixableCount_);
      }
      if (totalCount_ != 0L) {
        output.writeInt64(4, totalCount_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (resource_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getResource());
      }
      if (severity_ != io.grafeas.v1beta1.vulnerability.Severity.SEVERITY_UNSPECIFIED.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(2, severity_);
      }
      if (fixableCount_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(3, fixableCount_);
      }
      if (totalCount_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(4, totalCount_);
      }
      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.VulnerabilityOccurrencesSummary.FixableTotalByDigest)) {
        return super.equals(obj);
      }
      io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest other = (io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest) obj;

      boolean result = true;
      result = result && (hasResource() == other.hasResource());
      if (hasResource()) {
        result = result && getResource()
            .equals(other.getResource());
      }
      result = result && severity_ == other.severity_;
      result = result && (getFixableCount()
          == other.getFixableCount());
      result = result && (getTotalCount()
          == other.getTotalCount());
      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();
      if (hasResource()) {
        hash = (37 * hash) + RESOURCE_FIELD_NUMBER;
        hash = (53 * hash) + getResource().hashCode();
      }
      hash = (37 * hash) + SEVERITY_FIELD_NUMBER;
      hash = (53 * hash) + severity_;
      hash = (37 * hash) + FIXABLE_COUNT_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getFixableCount());
      hash = (37 * hash) + TOTAL_COUNT_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getTotalCount());
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest 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.VulnerabilityOccurrencesSummary.FixableTotalByDigest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest 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.VulnerabilityOccurrencesSummary.FixableTotalByDigest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest 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.VulnerabilityOccurrencesSummary.FixableTotalByDigest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest 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.VulnerabilityOccurrencesSummary.FixableTotalByDigest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest 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.VulnerabilityOccurrencesSummary.FixableTotalByDigest 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>
     * Per resource and severity counts of fixable and total vulnerabilites.
     * </pre>
     *
     * Protobuf type {@code grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest)
        io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return io.grafeas.v1beta1.Grafeas.internal_static_grafeas_v1beta1_VulnerabilityOccurrencesSummary_FixableTotalByDigest_descriptor;
      }

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

      // Construct using io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.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();
        if (resourceBuilder_ == null) {
          resource_ = null;
        } else {
          resource_ = null;
          resourceBuilder_ = null;
        }
        severity_ = 0;

        fixableCount_ = 0L;

        totalCount_ = 0L;

        return this;
      }

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

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

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

      @java.lang.Override
      public io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest buildPartial() {
        io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest result = new io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest(this);
        if (resourceBuilder_ == null) {
          result.resource_ = resource_;
        } else {
          result.resource_ = resourceBuilder_.build();
        }
        result.severity_ = severity_;
        result.fixableCount_ = fixableCount_;
        result.totalCount_ = totalCount_;
        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.VulnerabilityOccurrencesSummary.FixableTotalByDigest) {
          return mergeFrom((io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest other) {
        if (other == io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.getDefaultInstance()) return this;
        if (other.hasResource()) {
          mergeResource(other.getResource());
        }
        if (other.severity_ != 0) {
          setSeverityValue(other.getSeverityValue());
        }
        if (other.getFixableCount() != 0L) {
          setFixableCount(other.getFixableCount());
        }
        if (other.getTotalCount() != 0L) {
          setTotalCount(other.getTotalCount());
        }
        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.VulnerabilityOccurrencesSummary.FixableTotalByDigest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        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>
       * The affected resource.
       * </pre>
       *
       * <code>.grafeas.v1beta1.Resource resource = 1;</code>
       */
      public boolean hasResource() {
        return resourceBuilder_ != null || resource_ != null;
      }
      /**
       * <pre>
       * The affected resource.
       * </pre>
       *
       * <code>.grafeas.v1beta1.Resource resource = 1;</code>
       */
      public io.grafeas.v1beta1.Resource getResource() {
        if (resourceBuilder_ == null) {
          return resource_ == null ? io.grafeas.v1beta1.Resource.getDefaultInstance() : resource_;
        } else {
          return resourceBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * The affected resource.
       * </pre>
       *
       * <code>.grafeas.v1beta1.Resource resource = 1;</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>
       * The affected resource.
       * </pre>
       *
       * <code>.grafeas.v1beta1.Resource resource = 1;</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>
       * The affected resource.
       * </pre>
       *
       * <code>.grafeas.v1beta1.Resource resource = 1;</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>
       * The affected resource.
       * </pre>
       *
       * <code>.grafeas.v1beta1.Resource resource = 1;</code>
       */
      public Builder clearResource() {
        if (resourceBuilder_ == null) {
          resource_ = null;
          onChanged();
        } else {
          resource_ = null;
          resourceBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * The affected resource.
       * </pre>
       *
       * <code>.grafeas.v1beta1.Resource resource = 1;</code>
       */
      public io.grafeas.v1beta1.Resource.Builder getResourceBuilder() {
        
        onChanged();
        return getResourceFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * The affected resource.
       * </pre>
       *
       * <code>.grafeas.v1beta1.Resource resource = 1;</code>
       */
      public io.grafeas.v1beta1.ResourceOrBuilder getResourceOrBuilder() {
        if (resourceBuilder_ != null) {
          return resourceBuilder_.getMessageOrBuilder();
        } else {
          return resource_ == null ?
              io.grafeas.v1beta1.Resource.getDefaultInstance() : resource_;
        }
      }
      /**
       * <pre>
       * The affected resource.
       * </pre>
       *
       * <code>.grafeas.v1beta1.Resource resource = 1;</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 int severity_ = 0;
      /**
       * <pre>
       * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
       * all severities.
       * </pre>
       *
       * <code>.grafeas.v1beta1.vulnerability.Severity severity = 2;</code>
       */
      public int getSeverityValue() {
        return severity_;
      }
      /**
       * <pre>
       * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
       * all severities.
       * </pre>
       *
       * <code>.grafeas.v1beta1.vulnerability.Severity severity = 2;</code>
       */
      public Builder setSeverityValue(int value) {
        severity_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
       * all severities.
       * </pre>
       *
       * <code>.grafeas.v1beta1.vulnerability.Severity severity = 2;</code>
       */
      public io.grafeas.v1beta1.vulnerability.Severity getSeverity() {
        @SuppressWarnings("deprecation")
        io.grafeas.v1beta1.vulnerability.Severity result = io.grafeas.v1beta1.vulnerability.Severity.valueOf(severity_);
        return result == null ? io.grafeas.v1beta1.vulnerability.Severity.UNRECOGNIZED : result;
      }
      /**
       * <pre>
       * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
       * all severities.
       * </pre>
       *
       * <code>.grafeas.v1beta1.vulnerability.Severity severity = 2;</code>
       */
      public Builder setSeverity(io.grafeas.v1beta1.vulnerability.Severity value) {
        if (value == null) {
          throw new NullPointerException();
        }
        
        severity_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
       * all severities.
       * </pre>
       *
       * <code>.grafeas.v1beta1.vulnerability.Severity severity = 2;</code>
       */
      public Builder clearSeverity() {
        
        severity_ = 0;
        onChanged();
        return this;
      }

      private long fixableCount_ ;
      /**
       * <pre>
       * The number of fixable vulnerabilities associated with this resource.
       * </pre>
       *
       * <code>int64 fixable_count = 3;</code>
       */
      public long getFixableCount() {
        return fixableCount_;
      }
      /**
       * <pre>
       * The number of fixable vulnerabilities associated with this resource.
       * </pre>
       *
       * <code>int64 fixable_count = 3;</code>
       */
      public Builder setFixableCount(long value) {
        
        fixableCount_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The number of fixable vulnerabilities associated with this resource.
       * </pre>
       *
       * <code>int64 fixable_count = 3;</code>
       */
      public Builder clearFixableCount() {
        
        fixableCount_ = 0L;
        onChanged();
        return this;
      }

      private long totalCount_ ;
      /**
       * <pre>
       * The total number of vulnerabilities associated with this resource.
       * </pre>
       *
       * <code>int64 total_count = 4;</code>
       */
      public long getTotalCount() {
        return totalCount_;
      }
      /**
       * <pre>
       * The total number of vulnerabilities associated with this resource.
       * </pre>
       *
       * <code>int64 total_count = 4;</code>
       */
      public Builder setTotalCount(long value) {
        
        totalCount_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The total number of vulnerabilities associated with this resource.
       * </pre>
       *
       * <code>int64 total_count = 4;</code>
       */
      public Builder clearTotalCount() {
        
        totalCount_ = 0L;
        onChanged();
        return this;
      }
      @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.VulnerabilityOccurrencesSummary.FixableTotalByDigest)
    }

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

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

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

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

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

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

  }

  public static final int COUNTS_FIELD_NUMBER = 1;
  private java.util.List<io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest> counts_;
  /**
   * <pre>
   * A listing by resource of the number of fixable and total vulnerabilities.
   * </pre>
   *
   * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
   */
  public java.util.List<io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest> getCountsList() {
    return counts_;
  }
  /**
   * <pre>
   * A listing by resource of the number of fixable and total vulnerabilities.
   * </pre>
   *
   * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
   */
  public java.util.List<? extends io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigestOrBuilder> 
      getCountsOrBuilderList() {
    return counts_;
  }
  /**
   * <pre>
   * A listing by resource of the number of fixable and total vulnerabilities.
   * </pre>
   *
   * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
   */
  public int getCountsCount() {
    return counts_.size();
  }
  /**
   * <pre>
   * A listing by resource of the number of fixable and total vulnerabilities.
   * </pre>
   *
   * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
   */
  public io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest getCounts(int index) {
    return counts_.get(index);
  }
  /**
   * <pre>
   * A listing by resource of the number of fixable and total vulnerabilities.
   * </pre>
   *
   * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
   */
  public io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigestOrBuilder getCountsOrBuilder(
      int index) {
    return counts_.get(index);
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    for (int i = 0; i < counts_.size(); i++) {
      output.writeMessage(1, counts_.get(i));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    for (int i = 0; i < counts_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, counts_.get(i));
    }
    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.VulnerabilityOccurrencesSummary)) {
      return super.equals(obj);
    }
    io.grafeas.v1beta1.VulnerabilityOccurrencesSummary other = (io.grafeas.v1beta1.VulnerabilityOccurrencesSummary) obj;

    boolean result = true;
    result = result && getCountsList()
        .equals(other.getCountsList());
    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();
    if (getCountsCount() > 0) {
      hash = (37 * hash) + COUNTS_FIELD_NUMBER;
      hash = (53 * hash) + getCountsList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary 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.VulnerabilityOccurrencesSummary parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary 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.VulnerabilityOccurrencesSummary parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary 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.VulnerabilityOccurrencesSummary parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary 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.VulnerabilityOccurrencesSummary parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.grafeas.v1beta1.VulnerabilityOccurrencesSummary 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.VulnerabilityOccurrencesSummary 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>
   * A summary of how many vulnerability occurrences there are per resource and
   * severity type.
   * </pre>
   *
   * Protobuf type {@code grafeas.v1beta1.VulnerabilityOccurrencesSummary}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:grafeas.v1beta1.VulnerabilityOccurrencesSummary)
      io.grafeas.v1beta1.VulnerabilityOccurrencesSummaryOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.grafeas.v1beta1.Grafeas.internal_static_grafeas_v1beta1_VulnerabilityOccurrencesSummary_descriptor;
    }

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

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

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getCountsFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (countsBuilder_ == null) {
        counts_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        countsBuilder_.clear();
      }
      return this;
    }

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

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

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

    @java.lang.Override
    public io.grafeas.v1beta1.VulnerabilityOccurrencesSummary buildPartial() {
      io.grafeas.v1beta1.VulnerabilityOccurrencesSummary result = new io.grafeas.v1beta1.VulnerabilityOccurrencesSummary(this);
      int from_bitField0_ = bitField0_;
      if (countsBuilder_ == null) {
        if (((bitField0_ & 0x00000001) == 0x00000001)) {
          counts_ = java.util.Collections.unmodifiableList(counts_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.counts_ = counts_;
      } else {
        result.counts_ = countsBuilder_.build();
      }
      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.VulnerabilityOccurrencesSummary) {
        return mergeFrom((io.grafeas.v1beta1.VulnerabilityOccurrencesSummary)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.grafeas.v1beta1.VulnerabilityOccurrencesSummary other) {
      if (other == io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.getDefaultInstance()) return this;
      if (countsBuilder_ == null) {
        if (!other.counts_.isEmpty()) {
          if (counts_.isEmpty()) {
            counts_ = other.counts_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureCountsIsMutable();
            counts_.addAll(other.counts_);
          }
          onChanged();
        }
      } else {
        if (!other.counts_.isEmpty()) {
          if (countsBuilder_.isEmpty()) {
            countsBuilder_.dispose();
            countsBuilder_ = null;
            counts_ = other.counts_;
            bitField0_ = (bitField0_ & ~0x00000001);
            countsBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getCountsFieldBuilder() : null;
          } else {
            countsBuilder_.addAllMessages(other.counts_);
          }
        }
      }
      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.VulnerabilityOccurrencesSummary parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (io.grafeas.v1beta1.VulnerabilityOccurrencesSummary) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.util.List<io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest> counts_ =
      java.util.Collections.emptyList();
    private void ensureCountsIsMutable() {
      if (!((bitField0_ & 0x00000001) == 0x00000001)) {
        counts_ = new java.util.ArrayList<io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest>(counts_);
        bitField0_ |= 0x00000001;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest, io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.Builder, io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigestOrBuilder> countsBuilder_;

    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public java.util.List<io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest> getCountsList() {
      if (countsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(counts_);
      } else {
        return countsBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public int getCountsCount() {
      if (countsBuilder_ == null) {
        return counts_.size();
      } else {
        return countsBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest getCounts(int index) {
      if (countsBuilder_ == null) {
        return counts_.get(index);
      } else {
        return countsBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public Builder setCounts(
        int index, io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest value) {
      if (countsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureCountsIsMutable();
        counts_.set(index, value);
        onChanged();
      } else {
        countsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public Builder setCounts(
        int index, io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.Builder builderForValue) {
      if (countsBuilder_ == null) {
        ensureCountsIsMutable();
        counts_.set(index, builderForValue.build());
        onChanged();
      } else {
        countsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public Builder addCounts(io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest value) {
      if (countsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureCountsIsMutable();
        counts_.add(value);
        onChanged();
      } else {
        countsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public Builder addCounts(
        int index, io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest value) {
      if (countsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureCountsIsMutable();
        counts_.add(index, value);
        onChanged();
      } else {
        countsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public Builder addCounts(
        io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.Builder builderForValue) {
      if (countsBuilder_ == null) {
        ensureCountsIsMutable();
        counts_.add(builderForValue.build());
        onChanged();
      } else {
        countsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public Builder addCounts(
        int index, io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.Builder builderForValue) {
      if (countsBuilder_ == null) {
        ensureCountsIsMutable();
        counts_.add(index, builderForValue.build());
        onChanged();
      } else {
        countsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public Builder addAllCounts(
        java.lang.Iterable<? extends io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest> values) {
      if (countsBuilder_ == null) {
        ensureCountsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, counts_);
        onChanged();
      } else {
        countsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public Builder clearCounts() {
      if (countsBuilder_ == null) {
        counts_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        countsBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public Builder removeCounts(int index) {
      if (countsBuilder_ == null) {
        ensureCountsIsMutable();
        counts_.remove(index);
        onChanged();
      } else {
        countsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.Builder getCountsBuilder(
        int index) {
      return getCountsFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigestOrBuilder getCountsOrBuilder(
        int index) {
      if (countsBuilder_ == null) {
        return counts_.get(index);  } else {
        return countsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public java.util.List<? extends io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigestOrBuilder> 
         getCountsOrBuilderList() {
      if (countsBuilder_ != null) {
        return countsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(counts_);
      }
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.Builder addCountsBuilder() {
      return getCountsFieldBuilder().addBuilder(
          io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.getDefaultInstance());
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.Builder addCountsBuilder(
        int index) {
      return getCountsFieldBuilder().addBuilder(
          index, io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.getDefaultInstance());
    }
    /**
     * <pre>
     * A listing by resource of the number of fixable and total vulnerabilities.
     * </pre>
     *
     * <code>repeated .grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    public java.util.List<io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.Builder> 
         getCountsBuilderList() {
      return getCountsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest, io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.Builder, io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigestOrBuilder> 
        getCountsFieldBuilder() {
      if (countsBuilder_ == null) {
        countsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest, io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.Builder, io.grafeas.v1beta1.VulnerabilityOccurrencesSummary.FixableTotalByDigestOrBuilder>(
                counts_,
                ((bitField0_ & 0x00000001) == 0x00000001),
                getParentForChildren(),
                isClean());
        counts_ = null;
      }
      return countsBuilder_;
    }
    @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.VulnerabilityOccurrencesSummary)
  }

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

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

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

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

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

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

}

