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

namespace Google\Cloud\Spanner\V1\PlanNode;

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

/**
 * Condensed representation of a node and its subtree. Only present for
 * `SCALAR` [PlanNode(s)][google.spanner.v1.PlanNode].
 *
 * Generated from protobuf message <code>google.spanner.v1.PlanNode.ShortRepresentation</code>
 */
class ShortRepresentation extends \Google\Protobuf\Internal\Message
{
    /**
     * A string representation of the expression subtree rooted at this node.
     *
     * Generated from protobuf field <code>string description = 1;</code>
     */
    private $description = '';
    /**
     * A mapping of (subquery variable name) -> (subquery node id) for cases
     * where the `description` string of this node references a `SCALAR`
     * subquery contained in the expression subtree rooted at this node. The
     * referenced `SCALAR` subquery may not necessarily be a direct child of
     * this node.
     *
     * Generated from protobuf field <code>map<string, int32> subqueries = 2;</code>
     */
    private $subqueries;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $description
     *           A string representation of the expression subtree rooted at this node.
     *     @type array|\Google\Protobuf\Internal\MapField $subqueries
     *           A mapping of (subquery variable name) -> (subquery node id) for cases
     *           where the `description` string of this node references a `SCALAR`
     *           subquery contained in the expression subtree rooted at this node. The
     *           referenced `SCALAR` subquery may not necessarily be a direct child of
     *           this node.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Spanner\V1\QueryPlan::initOnce();
        parent::__construct($data);
    }

    /**
     * A string representation of the expression subtree rooted at this node.
     *
     * Generated from protobuf field <code>string description = 1;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * A string representation of the expression subtree rooted at this node.
     *
     * Generated from protobuf field <code>string description = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * A mapping of (subquery variable name) -> (subquery node id) for cases
     * where the `description` string of this node references a `SCALAR`
     * subquery contained in the expression subtree rooted at this node. The
     * referenced `SCALAR` subquery may not necessarily be a direct child of
     * this node.
     *
     * Generated from protobuf field <code>map<string, int32> subqueries = 2;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getSubqueries()
    {
        return $this->subqueries;
    }

    /**
     * A mapping of (subquery variable name) -> (subquery node id) for cases
     * where the `description` string of this node references a `SCALAR`
     * subquery contained in the expression subtree rooted at this node. The
     * referenced `SCALAR` subquery may not necessarily be a direct child of
     * this node.
     *
     * Generated from protobuf field <code>map<string, int32> subqueries = 2;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setSubqueries($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT32);
        $this->subqueries = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ShortRepresentation::class, \Google\Cloud\Spanner\V1\PlanNode_ShortRepresentation::class);

