<?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
 * [AddPublicKey][google.cloud.shell.v1.CloudShellService.AddPublicKey].
 *
 * Generated from protobuf message <code>google.cloud.shell.v1.AddPublicKeyRequest</code>
 */
class AddPublicKeyRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Environment this key should be added to, e.g.
     * `users/me/environments/default`.
     *
     * Generated from protobuf field <code>string environment = 1;</code>
     */
    private $environment = '';
    /**
     * Key that should be added to the environment. Supported formats are
     * `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256`
     * (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and
     * `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as
     * &lt;format&gt; &lt;content&gt;, where &lt;content&gt; part is encoded with
     * Base64.
     *
     * Generated from protobuf field <code>string key = 2;</code>
     */
    private $key = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $environment
     *           Environment this key should be added to, e.g.
     *           `users/me/environments/default`.
     *     @type string $key
     *           Key that should be added to the environment. Supported formats are
     *           `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256`
     *           (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and
     *           `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as
     *           &lt;format&gt; &lt;content&gt;, where &lt;content&gt; part is encoded with
     *           Base64.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Shell\V1\Cloudshell::initOnce();
        parent::__construct($data);
    }

    /**
     * Environment this key should be added to, e.g.
     * `users/me/environments/default`.
     *
     * Generated from protobuf field <code>string environment = 1;</code>
     * @return string
     */
    public function getEnvironment()
    {
        return $this->environment;
    }

    /**
     * Environment this key should be added to, e.g.
     * `users/me/environments/default`.
     *
     * Generated from protobuf field <code>string environment = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setEnvironment($var)
    {
        GPBUtil::checkString($var, True);
        $this->environment = $var;

        return $this;
    }

    /**
     * Key that should be added to the environment. Supported formats are
     * `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256`
     * (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and
     * `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as
     * &lt;format&gt; &lt;content&gt;, where &lt;content&gt; part is encoded with
     * Base64.
     *
     * Generated from protobuf field <code>string key = 2;</code>
     * @return string
     */
    public function getKey()
    {
        return $this->key;
    }

    /**
     * Key that should be added to the environment. Supported formats are
     * `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256`
     * (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and
     * `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as
     * &lt;format&gt; &lt;content&gt;, where &lt;content&gt; part is encoded with
     * Base64.
     *
     * Generated from protobuf field <code>string key = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->key = $var;

        return $this;
    }

}

