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

namespace Google\Cloud\Dataplex\V1\Environment;

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

/**
 * Configuration for sessions created for this environment.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.Environment.SessionSpec</code>
 */
class SessionSpec extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The idle time configuration of the session. The session will be
     * auto-terminated at the end of this period.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration max_idle_duration = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $max_idle_duration = null;
    /**
     * Optional. If True, this causes sessions to be pre-created and available
     * for faster startup to enable interactive exploration use-cases. This
     * defaults to False to avoid additional billed charges. These can only be
     * set to True for the environment with name set to "default", and with
     * default configuration.
     *
     * Generated from protobuf field <code>bool enable_fast_startup = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $enable_fast_startup = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Duration $max_idle_duration
     *           Optional. The idle time configuration of the session. The session will be
     *           auto-terminated at the end of this period.
     *     @type bool $enable_fast_startup
     *           Optional. If True, this causes sessions to be pre-created and available
     *           for faster startup to enable interactive exploration use-cases. This
     *           defaults to False to avoid additional billed charges. These can only be
     *           set to True for the environment with name set to "default", and with
     *           default configuration.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The idle time configuration of the session. The session will be
     * auto-terminated at the end of this period.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration max_idle_duration = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getMaxIdleDuration()
    {
        return $this->max_idle_duration;
    }

    public function hasMaxIdleDuration()
    {
        return isset($this->max_idle_duration);
    }

    public function clearMaxIdleDuration()
    {
        unset($this->max_idle_duration);
    }

    /**
     * Optional. The idle time configuration of the session. The session will be
     * auto-terminated at the end of this period.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration max_idle_duration = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setMaxIdleDuration($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->max_idle_duration = $var;

        return $this;
    }

    /**
     * Optional. If True, this causes sessions to be pre-created and available
     * for faster startup to enable interactive exploration use-cases. This
     * defaults to False to avoid additional billed charges. These can only be
     * set to True for the environment with name set to "default", and with
     * default configuration.
     *
     * Generated from protobuf field <code>bool enable_fast_startup = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getEnableFastStartup()
    {
        return $this->enable_fast_startup;
    }

    /**
     * Optional. If True, this causes sessions to be pre-created and available
     * for faster startup to enable interactive exploration use-cases. This
     * defaults to False to avoid additional billed charges. These can only be
     * set to True for the environment with name set to "default", and with
     * default configuration.
     *
     * Generated from protobuf field <code>bool enable_fast_startup = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setEnableFastStartup($var)
    {
        GPBUtil::checkBool($var);
        $this->enable_fast_startup = $var;

        return $this;
    }

}


