<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/functions/v2/functions.proto

namespace Google\Cloud\Functions\V2;

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

/**
 * Provenance of the source. Ways to find the original source, or verify that
 * some source was used for this build.
 *
 * Generated from protobuf message <code>google.cloud.functions.v2.SourceProvenance</code>
 */
class SourceProvenance extends \Google\Protobuf\Internal\Message
{
    /**
     * A copy of the build's `source.storage_source`, if exists, with any
     * generations resolved.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.StorageSource resolved_storage_source = 1;</code>
     */
    private $resolved_storage_source = null;
    /**
     * A copy of the build's `source.repo_source`, if exists, with any
     * revisions resolved.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.RepoSource resolved_repo_source = 2;</code>
     */
    private $resolved_repo_source = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Functions\V2\StorageSource $resolved_storage_source
     *           A copy of the build's `source.storage_source`, if exists, with any
     *           generations resolved.
     *     @type \Google\Cloud\Functions\V2\RepoSource $resolved_repo_source
     *           A copy of the build's `source.repo_source`, if exists, with any
     *           revisions resolved.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce();
        parent::__construct($data);
    }

    /**
     * A copy of the build's `source.storage_source`, if exists, with any
     * generations resolved.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.StorageSource resolved_storage_source = 1;</code>
     * @return \Google\Cloud\Functions\V2\StorageSource|null
     */
    public function getResolvedStorageSource()
    {
        return $this->resolved_storage_source;
    }

    public function hasResolvedStorageSource()
    {
        return isset($this->resolved_storage_source);
    }

    public function clearResolvedStorageSource()
    {
        unset($this->resolved_storage_source);
    }

    /**
     * A copy of the build's `source.storage_source`, if exists, with any
     * generations resolved.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.StorageSource resolved_storage_source = 1;</code>
     * @param \Google\Cloud\Functions\V2\StorageSource $var
     * @return $this
     */
    public function setResolvedStorageSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\StorageSource::class);
        $this->resolved_storage_source = $var;

        return $this;
    }

    /**
     * A copy of the build's `source.repo_source`, if exists, with any
     * revisions resolved.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.RepoSource resolved_repo_source = 2;</code>
     * @return \Google\Cloud\Functions\V2\RepoSource|null
     */
    public function getResolvedRepoSource()
    {
        return $this->resolved_repo_source;
    }

    public function hasResolvedRepoSource()
    {
        return isset($this->resolved_repo_source);
    }

    public function clearResolvedRepoSource()
    {
        unset($this->resolved_repo_source);
    }

    /**
     * A copy of the build's `source.repo_source`, if exists, with any
     * revisions resolved.
     *
     * Generated from protobuf field <code>.google.cloud.functions.v2.RepoSource resolved_repo_source = 2;</code>
     * @param \Google\Cloud\Functions\V2\RepoSource $var
     * @return $this
     */
    public function setResolvedRepoSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\RepoSource::class);
        $this->resolved_repo_source = $var;

        return $this;
    }

}

