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

namespace Google\Cloud\Firestore\V1;

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

/**
 * Explain options for the query.
 *
 * Generated from protobuf message <code>google.firestore.v1.ExplainOptions</code>
 */
class ExplainOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Whether to execute this query.
     * When false (the default), the query will be planned, returning only
     * metrics from the planning stages.
     * When true, the query will be planned and executed, returning the full
     * query results along with both planning and execution stage metrics.
     *
     * Generated from protobuf field <code>bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $analyze = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $analyze
     *           Optional. Whether to execute this query.
     *           When false (the default), the query will be planned, returning only
     *           metrics from the planning stages.
     *           When true, the query will be planned and executed, returning the full
     *           query results along with both planning and execution stage metrics.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Whether to execute this query.
     * When false (the default), the query will be planned, returning only
     * metrics from the planning stages.
     * When true, the query will be planned and executed, returning the full
     * query results along with both planning and execution stage metrics.
     *
     * Generated from protobuf field <code>bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getAnalyze()
    {
        return $this->analyze;
    }

    /**
     * Optional. Whether to execute this query.
     * When false (the default), the query will be planned, returning only
     * metrics from the planning stages.
     * When true, the query will be planned and executed, returning the full
     * query results along with both planning and execution stage metrics.
     *
     * Generated from protobuf field <code>bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setAnalyze($var)
    {
        GPBUtil::checkBool($var);
        $this->analyze = $var;

        return $this;
    }

}

