<?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;

/**
 * Plan for the query.
 *
 * Generated from protobuf message <code>google.firestore.v1.QueryPlan</code>
 */
class QueryPlan extends \Google\Protobuf\Internal\Message
{
    /**
     * Planning phase information for the query. It will include:
     * {
     *   "indexes_used": [
     *     {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
     *     {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
     *   ]
     * }
     *
     * Generated from protobuf field <code>.google.protobuf.Struct plan_info = 1;</code>
     */
    private $plan_info = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Struct $plan_info
     *           Planning phase information for the query. It will include:
     *           {
     *             "indexes_used": [
     *               {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
     *               {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
     *             ]
     *           }
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce();
        parent::__construct($data);
    }

    /**
     * Planning phase information for the query. It will include:
     * {
     *   "indexes_used": [
     *     {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
     *     {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
     *   ]
     * }
     *
     * Generated from protobuf field <code>.google.protobuf.Struct plan_info = 1;</code>
     * @return \Google\Protobuf\Struct|null
     */
    public function getPlanInfo()
    {
        return $this->plan_info;
    }

    public function hasPlanInfo()
    {
        return isset($this->plan_info);
    }

    public function clearPlanInfo()
    {
        unset($this->plan_info);
    }

    /**
     * Planning phase information for the query. It will include:
     * {
     *   "indexes_used": [
     *     {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
     *     {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
     *   ]
     * }
     *
     * Generated from protobuf field <code>.google.protobuf.Struct plan_info = 1;</code>
     * @param \Google\Protobuf\Struct $var
     * @return $this
     */
    public function setPlanInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
        $this->plan_info = $var;

        return $this;
    }

}

