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

namespace Grafeas\V1;

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

/**
 * See full explanation of fields at slsa.dev/provenance/v0.2.
 *
 * Generated from protobuf message <code>grafeas.v1.SlsaProvenanceZeroTwo</code>
 */
class SlsaProvenanceZeroTwo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1;</code>
     */
    private $builder = null;
    /**
     * Generated from protobuf field <code>string build_type = 2;</code>
     */
    private $build_type = '';
    /**
     * Generated from protobuf field <code>.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3;</code>
     */
    private $invocation = null;
    /**
     * Generated from protobuf field <code>.google.protobuf.Struct build_config = 4;</code>
     */
    private $build_config = null;
    /**
     * Generated from protobuf field <code>.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5;</code>
     */
    private $metadata = null;
    /**
     * Generated from protobuf field <code>repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6;</code>
     */
    private $materials;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaBuilder $builder
     *     @type string $build_type
     *     @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaInvocation $invocation
     *     @type \Google\Protobuf\Struct $build_config
     *     @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMetadata $metadata
     *     @type array<\Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMaterial>|\Google\Protobuf\Internal\RepeatedField $materials
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce();
        parent::__construct($data);
    }

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

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

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string build_type = 2;</code>
     * @return string
     */
    public function getBuildType()
    {
        return $this->build_type;
    }

    /**
     * Generated from protobuf field <code>string build_type = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setBuildType($var)
    {
        GPBUtil::checkString($var, True);
        $this->build_type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3;</code>
     * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaInvocation|null
     */
    public function getInvocation()
    {
        return $this->invocation;
    }

    public function hasInvocation()
    {
        return isset($this->invocation);
    }

    public function clearInvocation()
    {
        unset($this->invocation);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Struct build_config = 4;</code>
     * @return \Google\Protobuf\Struct|null
     */
    public function getBuildConfig()
    {
        return $this->build_config;
    }

    public function hasBuildConfig()
    {
        return isset($this->build_config);
    }

    public function clearBuildConfig()
    {
        unset($this->build_config);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Struct build_config = 4;</code>
     * @param \Google\Protobuf\Struct $var
     * @return $this
     */
    public function setBuildConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
        $this->build_config = $var;

        return $this;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMaterials()
    {
        return $this->materials;
    }

    /**
     * Generated from protobuf field <code>repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6;</code>
     * @param array<\Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMaterial>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMaterials($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMaterial::class);
        $this->materials = $arr;

        return $this;
    }

}

