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

namespace Google\Cloud\Shell\V1;

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

/**
 * Request message for
 * [StartEnvironment][google.cloud.shell.v1.CloudShellService.StartEnvironment].
 *
 * Generated from protobuf message <code>google.cloud.shell.v1.StartEnvironmentRequest</code>
 */
class StartEnvironmentRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of the resource that should be started, for example
     * `users/me/environments/default` or
     * `users/someone&#64;example.com/environments/default`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * The initial access token passed to the environment. If this is present and
     * valid, the environment will be pre-authenticated with gcloud so that the
     * user can run gcloud commands in Cloud Shell without having to log in. This
     * code can be updated later by calling AuthorizeEnvironment.
     *
     * Generated from protobuf field <code>string access_token = 2;</code>
     */
    private $access_token = '';
    /**
     * Public keys that should be added to the environment before it is started.
     *
     * Generated from protobuf field <code>repeated string public_keys = 3;</code>
     */
    private $public_keys;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Name of the resource that should be started, for example
     *           `users/me/environments/default` or
     *           `users/someone&#64;example.com/environments/default`.
     *     @type string $access_token
     *           The initial access token passed to the environment. If this is present and
     *           valid, the environment will be pre-authenticated with gcloud so that the
     *           user can run gcloud commands in Cloud Shell without having to log in. This
     *           code can be updated later by calling AuthorizeEnvironment.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $public_keys
     *           Public keys that should be added to the environment before it is started.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Shell\V1\Cloudshell::initOnce();
        parent::__construct($data);
    }

    /**
     * Name of the resource that should be started, for example
     * `users/me/environments/default` or
     * `users/someone&#64;example.com/environments/default`.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Name of the resource that should be started, for example
     * `users/me/environments/default` or
     * `users/someone&#64;example.com/environments/default`.
     *
     * 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 initial access token passed to the environment. If this is present and
     * valid, the environment will be pre-authenticated with gcloud so that the
     * user can run gcloud commands in Cloud Shell without having to log in. This
     * code can be updated later by calling AuthorizeEnvironment.
     *
     * Generated from protobuf field <code>string access_token = 2;</code>
     * @return string
     */
    public function getAccessToken()
    {
        return $this->access_token;
    }

    /**
     * The initial access token passed to the environment. If this is present and
     * valid, the environment will be pre-authenticated with gcloud so that the
     * user can run gcloud commands in Cloud Shell without having to log in. This
     * code can be updated later by calling AuthorizeEnvironment.
     *
     * Generated from protobuf field <code>string access_token = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setAccessToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->access_token = $var;

        return $this;
    }

    /**
     * Public keys that should be added to the environment before it is started.
     *
     * Generated from protobuf field <code>repeated string public_keys = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPublicKeys()
    {
        return $this->public_keys;
    }

    /**
     * Public keys that should be added to the environment before it is started.
     *
     * Generated from protobuf field <code>repeated string public_keys = 3;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPublicKeys($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->public_keys = $arr;

        return $this;
    }

}

