<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/bigtable/v2/session.proto

namespace Google\Cloud\Bigtable\V2;

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

/**
 * Internal usage only.
 *
 * Generated from protobuf message <code>google.bigtable.v2.SessionParametersResponse</code>
 */
class SessionParametersResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Maximum time between messages that the AFE will send to the client. The
     * client may use this information to determine its control-flow in relation
     * to pruning black-holed or otherwise non-responsive sessions. Must be set
     * and positive.
     * See also Heartbeats.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration keep_alive = 1;</code>
     */
    protected $keep_alive = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Duration $keep_alive
     *           Maximum time between messages that the AFE will send to the client. The
     *           client may use this information to determine its control-flow in relation
     *           to pruning black-holed or otherwise non-responsive sessions. Must be set
     *           and positive.
     *           See also Heartbeats.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\V2\Session::initOnce();
        parent::__construct($data);
    }

    /**
     * Maximum time between messages that the AFE will send to the client. The
     * client may use this information to determine its control-flow in relation
     * to pruning black-holed or otherwise non-responsive sessions. Must be set
     * and positive.
     * See also Heartbeats.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration keep_alive = 1;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getKeepAlive()
    {
        return $this->keep_alive;
    }

    public function hasKeepAlive()
    {
        return isset($this->keep_alive);
    }

    public function clearKeepAlive()
    {
        unset($this->keep_alive);
    }

    /**
     * Maximum time between messages that the AFE will send to the client. The
     * client may use this information to determine its control-flow in relation
     * to pruning black-holed or otherwise non-responsive sessions. Must be set
     * and positive.
     * See also Heartbeats.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration keep_alive = 1;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setKeepAlive($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->keep_alive = $var;

        return $this;
    }

}

