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

namespace Grafeas\V1;

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

/**
 * Generated from protobuf message <code>grafeas.v1.SlsaProvenance</code>
 */
class SlsaProvenance extends \Google\Protobuf\Internal\Message
{
    /**
     * required
     *
     * Generated from protobuf field <code>.grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1;</code>
     */
    protected $builder = null;
    /**
     * Identifies the configuration used for the build.
     * When combined with materials, this SHOULD fully describe the build,
     * such that re-running this recipe results in bit-for-bit identical output
     * (if the build is reproducible).
     *
     * Generated from protobuf field <code>.grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2;</code>
     */
    protected $recipe = null;
    /**
     * Generated from protobuf field <code>.grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3;</code>
     */
    protected $metadata = null;
    /**
     * The collection of artifacts that influenced the build including sources,
     * dependencies, build tools, base images, and so on. This is considered to be
     * incomplete unless metadata.completeness.materials is true. Unset or null is
     * equivalent to empty.
     *
     * Generated from protobuf field <code>repeated .grafeas.v1.SlsaProvenance.Material materials = 4;</code>
     */
    private $materials;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Grafeas\V1\SlsaProvenance\SlsaBuilder $builder
     *           required
     *     @type \Grafeas\V1\SlsaProvenance\SlsaRecipe $recipe
     *           Identifies the configuration used for the build.
     *           When combined with materials, this SHOULD fully describe the build,
     *           such that re-running this recipe results in bit-for-bit identical output
     *           (if the build is reproducible).
     *     @type \Grafeas\V1\SlsaProvenance\SlsaMetadata $metadata
     *     @type array<\Grafeas\V1\SlsaProvenance\Material>|\Google\Protobuf\Internal\RepeatedField $materials
     *           The collection of artifacts that influenced the build including sources,
     *           dependencies, build tools, base images, and so on. This is considered to be
     *           incomplete unless metadata.completeness.materials is true. Unset or null is
     *           equivalent to empty.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce();
        parent::__construct($data);
    }

    /**
     * required
     *
     * Generated from protobuf field <code>.grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1;</code>
     * @return \Grafeas\V1\SlsaProvenance\SlsaBuilder|null
     */
    public function getBuilder()
    {
        return $this->builder;
    }

    public function hasBuilder()
    {
        return isset($this->builder);
    }

    public function clearBuilder()
    {
        unset($this->builder);
    }

    /**
     * required
     *
     * Generated from protobuf field <code>.grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1;</code>
     * @param \Grafeas\V1\SlsaProvenance\SlsaBuilder $var
     * @return $this
     */
    public function setBuilder($var)
    {
        GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaBuilder::class);
        $this->builder = $var;

        return $this;
    }

    /**
     * Identifies the configuration used for the build.
     * When combined with materials, this SHOULD fully describe the build,
     * such that re-running this recipe results in bit-for-bit identical output
     * (if the build is reproducible).
     *
     * Generated from protobuf field <code>.grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2;</code>
     * @return \Grafeas\V1\SlsaProvenance\SlsaRecipe|null
     */
    public function getRecipe()
    {
        return $this->recipe;
    }

    public function hasRecipe()
    {
        return isset($this->recipe);
    }

    public function clearRecipe()
    {
        unset($this->recipe);
    }

    /**
     * Identifies the configuration used for the build.
     * When combined with materials, this SHOULD fully describe the build,
     * such that re-running this recipe results in bit-for-bit identical output
     * (if the build is reproducible).
     *
     * Generated from protobuf field <code>.grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2;</code>
     * @param \Grafeas\V1\SlsaProvenance\SlsaRecipe $var
     * @return $this
     */
    public function setRecipe($var)
    {
        GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaRecipe::class);
        $this->recipe = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3;</code>
     * @return \Grafeas\V1\SlsaProvenance\SlsaMetadata|null
     */
    public function getMetadata()
    {
        return $this->metadata;
    }

    public function hasMetadata()
    {
        return isset($this->metadata);
    }

    public function clearMetadata()
    {
        unset($this->metadata);
    }

    /**
     * Generated from protobuf field <code>.grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3;</code>
     * @param \Grafeas\V1\SlsaProvenance\SlsaMetadata $var
     * @return $this
     */
    public function setMetadata($var)
    {
        GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaMetadata::class);
        $this->metadata = $var;

        return $this;
    }

    /**
     * The collection of artifacts that influenced the build including sources,
     * dependencies, build tools, base images, and so on. This is considered to be
     * incomplete unless metadata.completeness.materials is true. Unset or null is
     * equivalent to empty.
     *
     * Generated from protobuf field <code>repeated .grafeas.v1.SlsaProvenance.Material materials = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMaterials()
    {
        return $this->materials;
    }

    /**
     * The collection of artifacts that influenced the build including sources,
     * dependencies, build tools, base images, and so on. This is considered to be
     * incomplete unless metadata.completeness.materials is true. Unset or null is
     * equivalent to empty.
     *
     * Generated from protobuf field <code>repeated .grafeas.v1.SlsaProvenance.Material materials = 4;</code>
     * @param array<\Grafeas\V1\SlsaProvenance\Material>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMaterials($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\SlsaProvenance\Material::class);
        $this->materials = $arr;

        return $this;
    }

}

