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

namespace Grafeas\V1\VulnerabilityOccurrence;

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

/**
 * The CVSS v3 score for this vulnerability.
 *
 * Generated from protobuf message <code>grafeas.v1.VulnerabilityOccurrence.CVSSV3</code>
 */
class CVSSV3 extends \Google\Protobuf\Internal\Message
{
    /**
     * The base score for for this vulnerability according to cvss v3.
     *
     * Generated from protobuf field <code>float base_score = 1;</code>
     */
    private $base_score = 0.0;
    /**
     * The severity rating assigned to this vulnerability by vulnerability
     * provider.
     *
     * Generated from protobuf field <code>.grafeas.v1.Severity severity = 2;</code>
     */
    private $severity = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $base_score
     *           The base score for for this vulnerability according to cvss v3.
     *     @type int $severity
     *           The severity rating assigned to this vulnerability by vulnerability
     *           provider.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Grafeas\V1\Vulnerability::initOnce();
        parent::__construct($data);
    }

    /**
     * The base score for for this vulnerability according to cvss v3.
     *
     * Generated from protobuf field <code>float base_score = 1;</code>
     * @return float
     */
    public function getBaseScore()
    {
        return $this->base_score;
    }

    /**
     * The base score for for this vulnerability according to cvss v3.
     *
     * Generated from protobuf field <code>float base_score = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setBaseScore($var)
    {
        GPBUtil::checkFloat($var);
        $this->base_score = $var;

        return $this;
    }

    /**
     * The severity rating assigned to this vulnerability by vulnerability
     * provider.
     *
     * Generated from protobuf field <code>.grafeas.v1.Severity severity = 2;</code>
     * @return int
     */
    public function getSeverity()
    {
        return $this->severity;
    }

    /**
     * The severity rating assigned to this vulnerability by vulnerability
     * provider.
     *
     * Generated from protobuf field <code>.grafeas.v1.Severity severity = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setSeverity($var)
    {
        GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class);
        $this->severity = $var;

        return $this;
    }

}


