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

namespace Grafeas\V1\VulnerabilityNote;

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

/**
 * A detail for a distro and package affected by this vulnerability and its
 * associated fix (if one is available).
 *
 * Generated from protobuf message <code>grafeas.v1.VulnerabilityNote.Detail</code>
 */
class Detail extends \Google\Protobuf\Internal\Message
{
    /**
     * The distro assigned severity of this vulnerability.
     *
     * Generated from protobuf field <code>string severity_name = 1;</code>
     */
    private $severity_name = '';
    /**
     * A vendor-specific description of this vulnerability.
     *
     * Generated from protobuf field <code>string description = 2;</code>
     */
    private $description = '';
    /**
     * The type of package; whether native or non native (e.g., ruby gems,
     * node.js packages, etc.).
     *
     * Generated from protobuf field <code>string package_type = 3;</code>
     */
    private $package_type = '';
    /**
     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
     * vulnerability affects.
     *
     * Generated from protobuf field <code>string affected_cpe_uri = 4;</code>
     */
    private $affected_cpe_uri = '';
    /**
     * Required. The package this vulnerability affects.
     *
     * Generated from protobuf field <code>string affected_package = 5;</code>
     */
    private $affected_package = '';
    /**
     * The version number at the start of an interval in which this
     * vulnerability exists. A vulnerability can affect a package between
     * version numbers that are disjoint sets of intervals (example:
     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
     * represented in its own Detail. If a specific affected version is provided
     * by a vulnerability database, affected_version_start and
     * affected_version_end will be the same in that Detail.
     *
     * Generated from protobuf field <code>.grafeas.v1.Version affected_version_start = 6;</code>
     */
    private $affected_version_start = null;
    /**
     * The version number at the end of an interval in which this vulnerability
     * exists. A vulnerability can affect a package between version numbers
     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
     * own Detail. If a specific affected version is provided by a vulnerability
     * database, affected_version_start and affected_version_end will be the
     * same in that Detail.
     *
     * Generated from protobuf field <code>.grafeas.v1.Version affected_version_end = 7;</code>
     */
    private $affected_version_end = null;
    /**
     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
     * to update to that contains a fix for this vulnerability. It is possible
     * for this to be different from the affected_cpe_uri.
     *
     * Generated from protobuf field <code>string fixed_cpe_uri = 8;</code>
     */
    private $fixed_cpe_uri = '';
    /**
     * The distro recommended package to update to that contains a fix for this
     * vulnerability. It is possible for this to be different from the
     * affected_package.
     *
     * Generated from protobuf field <code>string fixed_package = 9;</code>
     */
    private $fixed_package = '';
    /**
     * The distro recommended version to update to that contains a
     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
     * such version is yet available.
     *
     * Generated from protobuf field <code>.grafeas.v1.Version fixed_version = 10;</code>
     */
    private $fixed_version = null;
    /**
     * Whether this detail is obsolete. Occurrences are expected not to point to
     * obsolete details.
     *
     * Generated from protobuf field <code>bool is_obsolete = 11;</code>
     */
    private $is_obsolete = false;
    /**
     * The time this information was last changed at the source. This is an
     * upstream timestamp from the underlying information source - e.g. Ubuntu
     * security tracker.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp source_update_time = 12;</code>
     */
    private $source_update_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $severity_name
     *           The distro assigned severity of this vulnerability.
     *     @type string $description
     *           A vendor-specific description of this vulnerability.
     *     @type string $package_type
     *           The type of package; whether native or non native (e.g., ruby gems,
     *           node.js packages, etc.).
     *     @type string $affected_cpe_uri
     *           Required. The [CPE URI](https://cpe.mitre.org/specification/) this
     *           vulnerability affects.
     *     @type string $affected_package
     *           Required. The package this vulnerability affects.
     *     @type \Grafeas\V1\Version $affected_version_start
     *           The version number at the start of an interval in which this
     *           vulnerability exists. A vulnerability can affect a package between
     *           version numbers that are disjoint sets of intervals (example:
     *           [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
     *           represented in its own Detail. If a specific affected version is provided
     *           by a vulnerability database, affected_version_start and
     *           affected_version_end will be the same in that Detail.
     *     @type \Grafeas\V1\Version $affected_version_end
     *           The version number at the end of an interval in which this vulnerability
     *           exists. A vulnerability can affect a package between version numbers
     *           that are disjoint sets of intervals (example: [1.0.0-1.1.0],
     *           [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
     *           own Detail. If a specific affected version is provided by a vulnerability
     *           database, affected_version_start and affected_version_end will be the
     *           same in that Detail.
     *     @type string $fixed_cpe_uri
     *           The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
     *           to update to that contains a fix for this vulnerability. It is possible
     *           for this to be different from the affected_cpe_uri.
     *     @type string $fixed_package
     *           The distro recommended package to update to that contains a fix for this
     *           vulnerability. It is possible for this to be different from the
     *           affected_package.
     *     @type \Grafeas\V1\Version $fixed_version
     *           The distro recommended version to update to that contains a
     *           fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
     *           such version is yet available.
     *     @type bool $is_obsolete
     *           Whether this detail is obsolete. Occurrences are expected not to point to
     *           obsolete details.
     *     @type \Google\Protobuf\Timestamp $source_update_time
     *           The time this information was last changed at the source. This is an
     *           upstream timestamp from the underlying information source - e.g. Ubuntu
     *           security tracker.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Grafeas\V1\Vulnerability::initOnce();
        parent::__construct($data);
    }

    /**
     * The distro assigned severity of this vulnerability.
     *
     * Generated from protobuf field <code>string severity_name = 1;</code>
     * @return string
     */
    public function getSeverityName()
    {
        return $this->severity_name;
    }

    /**
     * The distro assigned severity of this vulnerability.
     *
     * Generated from protobuf field <code>string severity_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setSeverityName($var)
    {
        GPBUtil::checkString($var, True);
        $this->severity_name = $var;

        return $this;
    }

    /**
     * A vendor-specific description of this vulnerability.
     *
     * Generated from protobuf field <code>string description = 2;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * A vendor-specific description of this vulnerability.
     *
     * Generated from protobuf field <code>string description = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * The type of package; whether native or non native (e.g., ruby gems,
     * node.js packages, etc.).
     *
     * Generated from protobuf field <code>string package_type = 3;</code>
     * @return string
     */
    public function getPackageType()
    {
        return $this->package_type;
    }

    /**
     * The type of package; whether native or non native (e.g., ruby gems,
     * node.js packages, etc.).
     *
     * Generated from protobuf field <code>string package_type = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setPackageType($var)
    {
        GPBUtil::checkString($var, True);
        $this->package_type = $var;

        return $this;
    }

    /**
     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
     * vulnerability affects.
     *
     * Generated from protobuf field <code>string affected_cpe_uri = 4;</code>
     * @return string
     */
    public function getAffectedCpeUri()
    {
        return $this->affected_cpe_uri;
    }

    /**
     * Required. The [CPE URI](https://cpe.mitre.org/specification/) this
     * vulnerability affects.
     *
     * Generated from protobuf field <code>string affected_cpe_uri = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setAffectedCpeUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->affected_cpe_uri = $var;

        return $this;
    }

    /**
     * Required. The package this vulnerability affects.
     *
     * Generated from protobuf field <code>string affected_package = 5;</code>
     * @return string
     */
    public function getAffectedPackage()
    {
        return $this->affected_package;
    }

    /**
     * Required. The package this vulnerability affects.
     *
     * Generated from protobuf field <code>string affected_package = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setAffectedPackage($var)
    {
        GPBUtil::checkString($var, True);
        $this->affected_package = $var;

        return $this;
    }

    /**
     * The version number at the start of an interval in which this
     * vulnerability exists. A vulnerability can affect a package between
     * version numbers that are disjoint sets of intervals (example:
     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
     * represented in its own Detail. If a specific affected version is provided
     * by a vulnerability database, affected_version_start and
     * affected_version_end will be the same in that Detail.
     *
     * Generated from protobuf field <code>.grafeas.v1.Version affected_version_start = 6;</code>
     * @return \Grafeas\V1\Version|null
     */
    public function getAffectedVersionStart()
    {
        return isset($this->affected_version_start) ? $this->affected_version_start : null;
    }

    public function hasAffectedVersionStart()
    {
        return isset($this->affected_version_start);
    }

    public function clearAffectedVersionStart()
    {
        unset($this->affected_version_start);
    }

    /**
     * The version number at the start of an interval in which this
     * vulnerability exists. A vulnerability can affect a package between
     * version numbers that are disjoint sets of intervals (example:
     * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be
     * represented in its own Detail. If a specific affected version is provided
     * by a vulnerability database, affected_version_start and
     * affected_version_end will be the same in that Detail.
     *
     * Generated from protobuf field <code>.grafeas.v1.Version affected_version_start = 6;</code>
     * @param \Grafeas\V1\Version $var
     * @return $this
     */
    public function setAffectedVersionStart($var)
    {
        GPBUtil::checkMessage($var, \Grafeas\V1\Version::class);
        $this->affected_version_start = $var;

        return $this;
    }

    /**
     * The version number at the end of an interval in which this vulnerability
     * exists. A vulnerability can affect a package between version numbers
     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
     * own Detail. If a specific affected version is provided by a vulnerability
     * database, affected_version_start and affected_version_end will be the
     * same in that Detail.
     *
     * Generated from protobuf field <code>.grafeas.v1.Version affected_version_end = 7;</code>
     * @return \Grafeas\V1\Version|null
     */
    public function getAffectedVersionEnd()
    {
        return isset($this->affected_version_end) ? $this->affected_version_end : null;
    }

    public function hasAffectedVersionEnd()
    {
        return isset($this->affected_version_end);
    }

    public function clearAffectedVersionEnd()
    {
        unset($this->affected_version_end);
    }

    /**
     * The version number at the end of an interval in which this vulnerability
     * exists. A vulnerability can affect a package between version numbers
     * that are disjoint sets of intervals (example: [1.0.0-1.1.0],
     * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its
     * own Detail. If a specific affected version is provided by a vulnerability
     * database, affected_version_start and affected_version_end will be the
     * same in that Detail.
     *
     * Generated from protobuf field <code>.grafeas.v1.Version affected_version_end = 7;</code>
     * @param \Grafeas\V1\Version $var
     * @return $this
     */
    public function setAffectedVersionEnd($var)
    {
        GPBUtil::checkMessage($var, \Grafeas\V1\Version::class);
        $this->affected_version_end = $var;

        return $this;
    }

    /**
     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
     * to update to that contains a fix for this vulnerability. It is possible
     * for this to be different from the affected_cpe_uri.
     *
     * Generated from protobuf field <code>string fixed_cpe_uri = 8;</code>
     * @return string
     */
    public function getFixedCpeUri()
    {
        return $this->fixed_cpe_uri;
    }

    /**
     * The distro recommended [CPE URI](https://cpe.mitre.org/specification/)
     * to update to that contains a fix for this vulnerability. It is possible
     * for this to be different from the affected_cpe_uri.
     *
     * Generated from protobuf field <code>string fixed_cpe_uri = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setFixedCpeUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->fixed_cpe_uri = $var;

        return $this;
    }

    /**
     * The distro recommended package to update to that contains a fix for this
     * vulnerability. It is possible for this to be different from the
     * affected_package.
     *
     * Generated from protobuf field <code>string fixed_package = 9;</code>
     * @return string
     */
    public function getFixedPackage()
    {
        return $this->fixed_package;
    }

    /**
     * The distro recommended package to update to that contains a fix for this
     * vulnerability. It is possible for this to be different from the
     * affected_package.
     *
     * Generated from protobuf field <code>string fixed_package = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setFixedPackage($var)
    {
        GPBUtil::checkString($var, True);
        $this->fixed_package = $var;

        return $this;
    }

    /**
     * The distro recommended version to update to that contains a
     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
     * such version is yet available.
     *
     * Generated from protobuf field <code>.grafeas.v1.Version fixed_version = 10;</code>
     * @return \Grafeas\V1\Version|null
     */
    public function getFixedVersion()
    {
        return isset($this->fixed_version) ? $this->fixed_version : null;
    }

    public function hasFixedVersion()
    {
        return isset($this->fixed_version);
    }

    public function clearFixedVersion()
    {
        unset($this->fixed_version);
    }

    /**
     * The distro recommended version to update to that contains a
     * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no
     * such version is yet available.
     *
     * Generated from protobuf field <code>.grafeas.v1.Version fixed_version = 10;</code>
     * @param \Grafeas\V1\Version $var
     * @return $this
     */
    public function setFixedVersion($var)
    {
        GPBUtil::checkMessage($var, \Grafeas\V1\Version::class);
        $this->fixed_version = $var;

        return $this;
    }

    /**
     * Whether this detail is obsolete. Occurrences are expected not to point to
     * obsolete details.
     *
     * Generated from protobuf field <code>bool is_obsolete = 11;</code>
     * @return bool
     */
    public function getIsObsolete()
    {
        return $this->is_obsolete;
    }

    /**
     * Whether this detail is obsolete. Occurrences are expected not to point to
     * obsolete details.
     *
     * Generated from protobuf field <code>bool is_obsolete = 11;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsObsolete($var)
    {
        GPBUtil::checkBool($var);
        $this->is_obsolete = $var;

        return $this;
    }

    /**
     * The time this information was last changed at the source. This is an
     * upstream timestamp from the underlying information source - e.g. Ubuntu
     * security tracker.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp source_update_time = 12;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getSourceUpdateTime()
    {
        return isset($this->source_update_time) ? $this->source_update_time : null;
    }

    public function hasSourceUpdateTime()
    {
        return isset($this->source_update_time);
    }

    public function clearSourceUpdateTime()
    {
        unset($this->source_update_time);
    }

    /**
     * The time this information was last changed at the source. This is an
     * upstream timestamp from the underlying information source - e.g. Ubuntu
     * security tracker.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp source_update_time = 12;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setSourceUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->source_update_time = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Detail::class, \Grafeas\V1\VulnerabilityNote_Detail::class);

