<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/devtools/containeranalysis/v1/containeranalysis.proto

namespace Google\Cloud\ContainerAnalysis\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * A summary of how many vulnerability occurrences there are per resource and
 * severity type.
 *
 * Generated from protobuf message <code>google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary</code>
 */
class VulnerabilityOccurrencesSummary extends \Google\Protobuf\Internal\Message
{
    /**
     * A listing by resource of the number of fixable and total vulnerabilities.
     *
     * Generated from protobuf field <code>repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     */
    private $counts;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\ContainerAnalysis\V1\VulnerabilityOccurrencesSummary\FixableTotalByDigest>|\Google\Protobuf\Internal\RepeatedField $counts
     *           A listing by resource of the number of fixable and total vulnerabilities.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Devtools\Containeranalysis\V1\Containeranalysis::initOnce();
        parent::__construct($data);
    }

    /**
     * A listing by resource of the number of fixable and total vulnerabilities.
     *
     * Generated from protobuf field <code>repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCounts()
    {
        return $this->counts;
    }

    /**
     * A listing by resource of the number of fixable and total vulnerabilities.
     *
     * Generated from protobuf field <code>repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;</code>
     * @param array<\Google\Cloud\ContainerAnalysis\V1\VulnerabilityOccurrencesSummary\FixableTotalByDigest>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCounts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ContainerAnalysis\V1\VulnerabilityOccurrencesSummary\FixableTotalByDigest::class);
        $this->counts = $arr;

        return $this;
    }

}

