<?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.GetVersion`.
 *
 * Generated from protobuf message <code>google.appengine.v1.GetVersionRequest</code>
 */
class GetVersionRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of the resource requested. Example:
     * `apps/myapp/services/default/versions/v1`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Controls the set of fields returned in the `Get` response.
     *
     * Generated from protobuf field <code>.google.appengine.v1.VersionView view = 2;</code>
     */
    private $view = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Name of the resource requested. Example:
     *           `apps/myapp/services/default/versions/v1`.
     *     @type int $view
     *           Controls the set of fields returned in the `Get` response.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Appengine\V1\Appengine::initOnce();
        parent::__construct($data);
    }

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

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

    /**
     * Controls the set of fields returned in the `Get` response.
     *
     * Generated from protobuf field <code>.google.appengine.v1.VersionView view = 2;</code>
     * @return int
     */
    public function getView()
    {
        return $this->view;
    }

    /**
     * Controls the set of fields returned in the `Get` response.
     *
     * Generated from protobuf field <code>.google.appengine.v1.VersionView view = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setView($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AppEngine\V1\VersionView::class);
        $this->view = $var;

        return $this;
    }

}

