<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: grafeas/v1/intoto_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.InTotoProvenance</code>
 */
class InTotoProvenance extends \Google\Protobuf\Internal\Message
{
    /**
     * required
     *
     * Generated from protobuf field <code>.grafeas.v1.BuilderConfig builder_config = 1;</code>
     */
    private $builder_config = 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.Recipe recipe = 2;</code>
     */
    private $recipe = null;
    /**
     * Generated from protobuf field <code>.grafeas.v1.Metadata metadata = 3;</code>
     */
    private $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 string materials = 4;</code>
     */
    private $materials;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Grafeas\V1\BuilderConfig $builder_config
     *           required
     *     @type \Grafeas\V1\Recipe $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\Metadata $metadata
     *     @type array<string>|\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\IntotoProvenance::initOnce();
        parent::__construct($data);
    }

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

    public function hasBuilderConfig()
    {
        return isset($this->builder_config);
    }

    public function clearBuilderConfig()
    {
        unset($this->builder_config);
    }

    /**
     * required
     *
     * Generated from protobuf field <code>.grafeas.v1.BuilderConfig builder_config = 1;</code>
     * @param \Grafeas\V1\BuilderConfig $var
     * @return $this
     */
    public function setBuilderConfig($var)
    {
        GPBUtil::checkMessage($var, \Grafeas\V1\BuilderConfig::class);
        $this->builder_config = $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.Recipe recipe = 2;</code>
     * @return \Grafeas\V1\Recipe|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.Recipe recipe = 2;</code>
     * @param \Grafeas\V1\Recipe $var
     * @return $this
     */
    public function setRecipe($var)
    {
        GPBUtil::checkMessage($var, \Grafeas\V1\Recipe::class);
        $this->recipe = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.grafeas.v1.Metadata metadata = 3;</code>
     * @return \Grafeas\V1\Metadata|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.Metadata metadata = 3;</code>
     * @param \Grafeas\V1\Metadata $var
     * @return $this
     */
    public function setMetadata($var)
    {
        GPBUtil::checkMessage($var, \Grafeas\V1\Metadata::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 string 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 string materials = 4;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMaterials($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->materials = $arr;

        return $this;
    }

}

