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

namespace Grafeas\V1;

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

/**
 * The actual payload that contains the SBOM Reference data.
 * The payload follows the intoto statement specification. See
 * https://github.com/in-toto/attestation/blob/main/spec/v1.0/statement.md
 * for more details.
 *
 * Generated from protobuf message <code>grafeas.v1.SbomReferenceIntotoPayload</code>
 */
class SbomReferenceIntotoPayload extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier for the schema of the Statement.
     *
     * Generated from protobuf field <code>string type = 1 [json_name = "_type"];</code>
     */
    protected $type = '';
    /**
     * URI identifying the type of the Predicate.
     *
     * Generated from protobuf field <code>string predicate_type = 2;</code>
     */
    protected $predicate_type = '';
    /**
     * Set of software artifacts that the attestation applies to. Each element
     * represents a single software artifact.
     *
     * Generated from protobuf field <code>repeated .grafeas.v1.Subject subject = 3;</code>
     */
    private $subject;
    /**
     * Additional parameters of the Predicate. Includes the actual data about the
     * SBOM.
     *
     * Generated from protobuf field <code>.grafeas.v1.SbomReferenceIntotoPredicate predicate = 4;</code>
     */
    protected $predicate = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $type
     *           Identifier for the schema of the Statement.
     *     @type string $predicate_type
     *           URI identifying the type of the Predicate.
     *     @type array<\Grafeas\V1\Subject>|\Google\Protobuf\Internal\RepeatedField $subject
     *           Set of software artifacts that the attestation applies to. Each element
     *           represents a single software artifact.
     *     @type \Grafeas\V1\SbomReferenceIntotoPredicate $predicate
     *           Additional parameters of the Predicate. Includes the actual data about the
     *           SBOM.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Grafeas\V1\Sbom::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier for the schema of the Statement.
     *
     * Generated from protobuf field <code>string type = 1 [json_name = "_type"];</code>
     * @return string
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Identifier for the schema of the Statement.
     *
     * Generated from protobuf field <code>string type = 1 [json_name = "_type"];</code>
     * @param string $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkString($var, True);
        $this->type = $var;

        return $this;
    }

    /**
     * URI identifying the type of the Predicate.
     *
     * Generated from protobuf field <code>string predicate_type = 2;</code>
     * @return string
     */
    public function getPredicateType()
    {
        return $this->predicate_type;
    }

    /**
     * URI identifying the type of the Predicate.
     *
     * Generated from protobuf field <code>string predicate_type = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setPredicateType($var)
    {
        GPBUtil::checkString($var, True);
        $this->predicate_type = $var;

        return $this;
    }

    /**
     * Set of software artifacts that the attestation applies to. Each element
     * represents a single software artifact.
     *
     * Generated from protobuf field <code>repeated .grafeas.v1.Subject subject = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSubject()
    {
        return $this->subject;
    }

    /**
     * Set of software artifacts that the attestation applies to. Each element
     * represents a single software artifact.
     *
     * Generated from protobuf field <code>repeated .grafeas.v1.Subject subject = 3;</code>
     * @param array<\Grafeas\V1\Subject>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSubject($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Subject::class);
        $this->subject = $arr;

        return $this;
    }

    /**
     * Additional parameters of the Predicate. Includes the actual data about the
     * SBOM.
     *
     * Generated from protobuf field <code>.grafeas.v1.SbomReferenceIntotoPredicate predicate = 4;</code>
     * @return \Grafeas\V1\SbomReferenceIntotoPredicate|null
     */
    public function getPredicate()
    {
        return $this->predicate;
    }

    public function hasPredicate()
    {
        return isset($this->predicate);
    }

    public function clearPredicate()
    {
        unset($this->predicate);
    }

    /**
     * Additional parameters of the Predicate. Includes the actual data about the
     * SBOM.
     *
     * Generated from protobuf field <code>.grafeas.v1.SbomReferenceIntotoPredicate predicate = 4;</code>
     * @param \Grafeas\V1\SbomReferenceIntotoPredicate $var
     * @return $this
     */
    public function setPredicate($var)
    {
        GPBUtil::checkMessage($var, \Grafeas\V1\SbomReferenceIntotoPredicate::class);
        $this->predicate = $var;

        return $this;
    }

}

