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

namespace Google\Cloud\AlloyDb\V1\Instance;

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

/**
 * Observability Instance specific configuration.
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1.Instance.ObservabilityInstanceConfig</code>
 */
class ObservabilityInstanceConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Observability feature status for an instance.
     * This flag is turned "off" by default.
     *
     * Generated from protobuf field <code>optional bool enabled = 1;</code>
     */
    protected $enabled = null;
    /**
     * Preserve comments in query string for an instance.
     * This flag is turned "off" by default.
     *
     * Generated from protobuf field <code>optional bool preserve_comments = 2;</code>
     */
    protected $preserve_comments = null;
    /**
     * Track wait events during query execution for an instance.
     * This flag is turned "on" by default but tracking is enabled only after
     * observability enabled flag is also turned on.
     *
     * Generated from protobuf field <code>optional bool track_wait_events = 3;</code>
     */
    protected $track_wait_events = null;
    /**
     * Output only. Track wait event types during query execution for an
     * instance. This flag is turned "on" by default but tracking is enabled
     * only after observability enabled flag is also turned on. This is
     * read-only flag and only modifiable by internal API.
     *
     * Generated from protobuf field <code>optional bool track_wait_event_types = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $track_wait_event_types = null;
    /**
     * Query string length. The default value is 10k.
     *
     * Generated from protobuf field <code>optional int32 max_query_string_length = 5;</code>
     */
    protected $max_query_string_length = null;
    /**
     * Record application tags for an instance.
     * This flag is turned "off" by default.
     *
     * Generated from protobuf field <code>optional bool record_application_tags = 6;</code>
     */
    protected $record_application_tags = null;
    /**
     * Number of query execution plans captured by Insights per minute
     * for all queries combined. The default value is 200.
     * Any integer between 0 to 200 is considered valid.
     *
     * Generated from protobuf field <code>optional int32 query_plans_per_minute = 7;</code>
     */
    protected $query_plans_per_minute = null;
    /**
     * Track actively running queries on the instance.
     * If not set, this flag is "off" by default.
     *
     * Generated from protobuf field <code>optional bool track_active_queries = 8;</code>
     */
    protected $track_active_queries = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $enabled
     *           Observability feature status for an instance.
     *           This flag is turned "off" by default.
     *     @type bool $preserve_comments
     *           Preserve comments in query string for an instance.
     *           This flag is turned "off" by default.
     *     @type bool $track_wait_events
     *           Track wait events during query execution for an instance.
     *           This flag is turned "on" by default but tracking is enabled only after
     *           observability enabled flag is also turned on.
     *     @type bool $track_wait_event_types
     *           Output only. Track wait event types during query execution for an
     *           instance. This flag is turned "on" by default but tracking is enabled
     *           only after observability enabled flag is also turned on. This is
     *           read-only flag and only modifiable by internal API.
     *     @type int $max_query_string_length
     *           Query string length. The default value is 10k.
     *     @type bool $record_application_tags
     *           Record application tags for an instance.
     *           This flag is turned "off" by default.
     *     @type int $query_plans_per_minute
     *           Number of query execution plans captured by Insights per minute
     *           for all queries combined. The default value is 200.
     *           Any integer between 0 to 200 is considered valid.
     *     @type bool $track_active_queries
     *           Track actively running queries on the instance.
     *           If not set, this flag is "off" by default.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Observability feature status for an instance.
     * This flag is turned "off" by default.
     *
     * Generated from protobuf field <code>optional bool enabled = 1;</code>
     * @return bool
     */
    public function getEnabled()
    {
        return isset($this->enabled) ? $this->enabled : false;
    }

    public function hasEnabled()
    {
        return isset($this->enabled);
    }

    public function clearEnabled()
    {
        unset($this->enabled);
    }

    /**
     * Observability feature status for an instance.
     * This flag is turned "off" by default.
     *
     * Generated from protobuf field <code>optional bool enabled = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->enabled = $var;

        return $this;
    }

    /**
     * Preserve comments in query string for an instance.
     * This flag is turned "off" by default.
     *
     * Generated from protobuf field <code>optional bool preserve_comments = 2;</code>
     * @return bool
     */
    public function getPreserveComments()
    {
        return isset($this->preserve_comments) ? $this->preserve_comments : false;
    }

    public function hasPreserveComments()
    {
        return isset($this->preserve_comments);
    }

    public function clearPreserveComments()
    {
        unset($this->preserve_comments);
    }

    /**
     * Preserve comments in query string for an instance.
     * This flag is turned "off" by default.
     *
     * Generated from protobuf field <code>optional bool preserve_comments = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setPreserveComments($var)
    {
        GPBUtil::checkBool($var);
        $this->preserve_comments = $var;

        return $this;
    }

    /**
     * Track wait events during query execution for an instance.
     * This flag is turned "on" by default but tracking is enabled only after
     * observability enabled flag is also turned on.
     *
     * Generated from protobuf field <code>optional bool track_wait_events = 3;</code>
     * @return bool
     */
    public function getTrackWaitEvents()
    {
        return isset($this->track_wait_events) ? $this->track_wait_events : false;
    }

    public function hasTrackWaitEvents()
    {
        return isset($this->track_wait_events);
    }

    public function clearTrackWaitEvents()
    {
        unset($this->track_wait_events);
    }

    /**
     * Track wait events during query execution for an instance.
     * This flag is turned "on" by default but tracking is enabled only after
     * observability enabled flag is also turned on.
     *
     * Generated from protobuf field <code>optional bool track_wait_events = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setTrackWaitEvents($var)
    {
        GPBUtil::checkBool($var);
        $this->track_wait_events = $var;

        return $this;
    }

    /**
     * Output only. Track wait event types during query execution for an
     * instance. This flag is turned "on" by default but tracking is enabled
     * only after observability enabled flag is also turned on. This is
     * read-only flag and only modifiable by internal API.
     *
     * Generated from protobuf field <code>optional bool track_wait_event_types = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getTrackWaitEventTypes()
    {
        return isset($this->track_wait_event_types) ? $this->track_wait_event_types : false;
    }

    public function hasTrackWaitEventTypes()
    {
        return isset($this->track_wait_event_types);
    }

    public function clearTrackWaitEventTypes()
    {
        unset($this->track_wait_event_types);
    }

    /**
     * Output only. Track wait event types during query execution for an
     * instance. This flag is turned "on" by default but tracking is enabled
     * only after observability enabled flag is also turned on. This is
     * read-only flag and only modifiable by internal API.
     *
     * Generated from protobuf field <code>optional bool track_wait_event_types = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setTrackWaitEventTypes($var)
    {
        GPBUtil::checkBool($var);
        $this->track_wait_event_types = $var;

        return $this;
    }

    /**
     * Query string length. The default value is 10k.
     *
     * Generated from protobuf field <code>optional int32 max_query_string_length = 5;</code>
     * @return int
     */
    public function getMaxQueryStringLength()
    {
        return isset($this->max_query_string_length) ? $this->max_query_string_length : 0;
    }

    public function hasMaxQueryStringLength()
    {
        return isset($this->max_query_string_length);
    }

    public function clearMaxQueryStringLength()
    {
        unset($this->max_query_string_length);
    }

    /**
     * Query string length. The default value is 10k.
     *
     * Generated from protobuf field <code>optional int32 max_query_string_length = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setMaxQueryStringLength($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_query_string_length = $var;

        return $this;
    }

    /**
     * Record application tags for an instance.
     * This flag is turned "off" by default.
     *
     * Generated from protobuf field <code>optional bool record_application_tags = 6;</code>
     * @return bool
     */
    public function getRecordApplicationTags()
    {
        return isset($this->record_application_tags) ? $this->record_application_tags : false;
    }

    public function hasRecordApplicationTags()
    {
        return isset($this->record_application_tags);
    }

    public function clearRecordApplicationTags()
    {
        unset($this->record_application_tags);
    }

    /**
     * Record application tags for an instance.
     * This flag is turned "off" by default.
     *
     * Generated from protobuf field <code>optional bool record_application_tags = 6;</code>
     * @param bool $var
     * @return $this
     */
    public function setRecordApplicationTags($var)
    {
        GPBUtil::checkBool($var);
        $this->record_application_tags = $var;

        return $this;
    }

    /**
     * Number of query execution plans captured by Insights per minute
     * for all queries combined. The default value is 200.
     * Any integer between 0 to 200 is considered valid.
     *
     * Generated from protobuf field <code>optional int32 query_plans_per_minute = 7;</code>
     * @return int
     */
    public function getQueryPlansPerMinute()
    {
        return isset($this->query_plans_per_minute) ? $this->query_plans_per_minute : 0;
    }

    public function hasQueryPlansPerMinute()
    {
        return isset($this->query_plans_per_minute);
    }

    public function clearQueryPlansPerMinute()
    {
        unset($this->query_plans_per_minute);
    }

    /**
     * Number of query execution plans captured by Insights per minute
     * for all queries combined. The default value is 200.
     * Any integer between 0 to 200 is considered valid.
     *
     * Generated from protobuf field <code>optional int32 query_plans_per_minute = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setQueryPlansPerMinute($var)
    {
        GPBUtil::checkInt32($var);
        $this->query_plans_per_minute = $var;

        return $this;
    }

    /**
     * Track actively running queries on the instance.
     * If not set, this flag is "off" by default.
     *
     * Generated from protobuf field <code>optional bool track_active_queries = 8;</code>
     * @return bool
     */
    public function getTrackActiveQueries()
    {
        return isset($this->track_active_queries) ? $this->track_active_queries : false;
    }

    public function hasTrackActiveQueries()
    {
        return isset($this->track_active_queries);
    }

    public function clearTrackActiveQueries()
    {
        unset($this->track_active_queries);
    }

    /**
     * Track actively running queries on the instance.
     * If not set, this flag is "off" by default.
     *
     * Generated from protobuf field <code>optional bool track_active_queries = 8;</code>
     * @param bool $var
     * @return $this
     */
    public function setTrackActiveQueries($var)
    {
        GPBUtil::checkBool($var);
        $this->track_active_queries = $var;

        return $this;
    }

}


