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

namespace Grafeas\V1\DiscoveryOccurrence;

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

/**
 * The status of an SBOM generation.
 *
 * Generated from protobuf message <code>grafeas.v1.DiscoveryOccurrence.SBOMStatus</code>
 */
class SBOMStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * The progress of the SBOM generation.
     *
     * Generated from protobuf field <code>.grafeas.v1.DiscoveryOccurrence.SBOMStatus.SBOMState sbom_state = 1;</code>
     */
    protected $sbom_state = 0;
    /**
     * If there was an error generating an SBOM, this will indicate what that
     * error was.
     *
     * Generated from protobuf field <code>string error = 2;</code>
     */
    protected $error = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $sbom_state
     *           The progress of the SBOM generation.
     *     @type string $error
     *           If there was an error generating an SBOM, this will indicate what that
     *           error was.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Grafeas\V1\Discovery::initOnce();
        parent::__construct($data);
    }

    /**
     * The progress of the SBOM generation.
     *
     * Generated from protobuf field <code>.grafeas.v1.DiscoveryOccurrence.SBOMStatus.SBOMState sbom_state = 1;</code>
     * @return int
     */
    public function getSbomState()
    {
        return $this->sbom_state;
    }

    /**
     * The progress of the SBOM generation.
     *
     * Generated from protobuf field <code>.grafeas.v1.DiscoveryOccurrence.SBOMStatus.SBOMState sbom_state = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setSbomState($var)
    {
        GPBUtil::checkEnum($var, \Grafeas\V1\DiscoveryOccurrence\SBOMStatus\SBOMState::class);
        $this->sbom_state = $var;

        return $this;
    }

    /**
     * If there was an error generating an SBOM, this will indicate what that
     * error was.
     *
     * Generated from protobuf field <code>string error = 2;</code>
     * @return string
     */
    public function getError()
    {
        return $this->error;
    }

    /**
     * If there was an error generating an SBOM, this will indicate what that
     * error was.
     *
     * Generated from protobuf field <code>string error = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setError($var)
    {
        GPBUtil::checkString($var, True);
        $this->error = $var;

        return $this;
    }

}


