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

namespace Google\Cloud\Ces\V1;

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

/**
 * Configurations for authentication with a bearer token.
 *
 * Generated from protobuf message <code>google.cloud.ces.v1.BearerTokenConfig</code>
 */
class BearerTokenConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The bearer token.
     * Must be in the format `$context.variables.<name_of_variable>`.
     *
     * Generated from protobuf field <code>string token = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $token
     *           Required. The bearer token.
     *           Must be in the format `$context.variables.<name_of_variable>`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Ces\V1\Auth::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The bearer token.
     * Must be in the format `$context.variables.<name_of_variable>`.
     *
     * Generated from protobuf field <code>string token = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getToken()
    {
        return $this->token;
    }

    /**
     * Required. The bearer token.
     * Must be in the format `$context.variables.<name_of_variable>`.
     *
     * Generated from protobuf field <code>string token = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->token = $var;

        return $this;
    }

}

