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

namespace Google\Cloud\AppEngine\V1;

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

/**
 * Request message for `Versions.UpdateVersion`.
 *
 * Generated from protobuf message <code>google.appengine.v1.UpdateVersionRequest</code>
 */
class UpdateVersionRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of the resource to update. Example:
     * `apps/myapp/services/default/versions/1`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * A Version containing the updated resource. Only fields set in the field
     * mask will be updated.
     *
     * Generated from protobuf field <code>.google.appengine.v1.Version version = 2;</code>
     */
    private $version = null;
    /**
     * Standard field mask for the set of fields to be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 3;</code>
     */
    private $update_mask = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Name of the resource to update. Example:
     *           `apps/myapp/services/default/versions/1`.
     *     @type \Google\Cloud\AppEngine\V1\Version $version
     *           A Version containing the updated resource. Only fields set in the field
     *           mask will be updated.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Standard field mask for the set of fields to be updated.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Appengine\V1\Appengine::initOnce();
        parent::__construct($data);
    }

    /**
     * Name of the resource to update. Example:
     * `apps/myapp/services/default/versions/1`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Name of the resource to update. Example:
     * `apps/myapp/services/default/versions/1`.
     *
     * 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;
    }

    /**
     * A Version containing the updated resource. Only fields set in the field
     * mask will be updated.
     *
     * Generated from protobuf field <code>.google.appengine.v1.Version version = 2;</code>
     * @return \Google\Cloud\AppEngine\V1\Version|null
     */
    public function getVersion()
    {
        return $this->version;
    }

    public function hasVersion()
    {
        return isset($this->version);
    }

    public function clearVersion()
    {
        unset($this->version);
    }

    /**
     * A Version containing the updated resource. Only fields set in the field
     * mask will be updated.
     *
     * Generated from protobuf field <code>.google.appengine.v1.Version version = 2;</code>
     * @param \Google\Cloud\AppEngine\V1\Version $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AppEngine\V1\Version::class);
        $this->version = $var;

        return $this;
    }

    /**
     * Standard field mask for the set of fields to be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 3;</code>
     * @return \Google\Protobuf\FieldMask|null
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

    public function hasUpdateMask()
    {
        return isset($this->update_mask);
    }

    public function clearUpdateMask()
    {
        unset($this->update_mask);
    }

    /**
     * Standard field mask for the set of fields to be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 3;</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setUpdateMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->update_mask = $var;

        return $this;
    }

}

