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

namespace Google\Cloud\GkeMultiCloud\V1;

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

/**
 * Response message for `AwsClusters.GenerateAwsAccessToken` method.
 *
 * Generated from protobuf message <code>google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse</code>
 */
class GenerateAwsAccessTokenResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Access token to authenticate to k8s api-server.
     *
     * Generated from protobuf field <code>string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $access_token = '';
    /**
     * Output only. Timestamp at which the token will expire.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $expiration_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $access_token
     *           Output only. Access token to authenticate to k8s api-server.
     *     @type \Google\Protobuf\Timestamp $expiration_time
     *           Output only. Timestamp at which the token will expire.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsService::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Access token to authenticate to k8s api-server.
     *
     * Generated from protobuf field <code>string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getAccessToken()
    {
        return $this->access_token;
    }

    /**
     * Output only. Access token to authenticate to k8s api-server.
     *
     * Generated from protobuf field <code>string access_token = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setAccessToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->access_token = $var;

        return $this;
    }

    /**
     * Output only. Timestamp at which the token will expire.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getExpirationTime()
    {
        return $this->expiration_time;
    }

    public function hasExpirationTime()
    {
        return isset($this->expiration_time);
    }

    public function clearExpirationTime()
    {
        unset($this->expiration_time);
    }

    /**
     * Output only. Timestamp at which the token will expire.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp expiration_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setExpirationTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->expiration_time = $var;

        return $this;
    }

}

