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

namespace Google\Cloud\Functions\V1;

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

/**
 * Request of `GenerateDownloadUrl` method.
 *
 * Generated from protobuf message <code>google.cloud.functions.v1.GenerateDownloadUrlRequest</code>
 */
class GenerateDownloadUrlRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of function for which source code Google Cloud Storage signed
     * URL should be generated.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * The optional version of function. If not set, default, current version
     * is used.
     *
     * Generated from protobuf field <code>uint64 version_id = 2;</code>
     */
    private $version_id = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The name of function for which source code Google Cloud Storage signed
     *           URL should be generated.
     *     @type int|string $version_id
     *           The optional version of function. If not set, default, current version
     *           is used.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of function for which source code Google Cloud Storage signed
     * URL should be generated.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The name of function for which source code Google Cloud Storage signed
     * URL should be generated.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The optional version of function. If not set, default, current version
     * is used.
     *
     * Generated from protobuf field <code>uint64 version_id = 2;</code>
     * @return int|string
     */
    public function getVersionId()
    {
        return $this->version_id;
    }

    /**
     * The optional version of function. If not set, default, current version
     * is used.
     *
     * Generated from protobuf field <code>uint64 version_id = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setVersionId($var)
    {
        GPBUtil::checkUint64($var);
        $this->version_id = $var;

        return $this;
    }

}

