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

namespace Google\Cloud\Spanner\V1;

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

/**
 * Information returned for each partition returned in a
 * PartitionResponse.
 *
 * Generated from protobuf message <code>google.spanner.v1.Partition</code>
 */
class Partition extends \Google\Protobuf\Internal\Message
{
    /**
     * This token can be passed to Read, StreamingRead, ExecuteSql, or
     * ExecuteStreamingSql requests to restrict the results to those identified by
     * this partition token.
     *
     * Generated from protobuf field <code>bytes partition_token = 1;</code>
     */
    private $partition_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $partition_token
     *           This token can be passed to Read, StreamingRead, ExecuteSql, or
     *           ExecuteStreamingSql requests to restrict the results to those identified by
     *           this partition token.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Spanner\V1\Spanner::initOnce();
        parent::__construct($data);
    }

    /**
     * This token can be passed to Read, StreamingRead, ExecuteSql, or
     * ExecuteStreamingSql requests to restrict the results to those identified by
     * this partition token.
     *
     * Generated from protobuf field <code>bytes partition_token = 1;</code>
     * @return string
     */
    public function getPartitionToken()
    {
        return $this->partition_token;
    }

    /**
     * This token can be passed to Read, StreamingRead, ExecuteSql, or
     * ExecuteStreamingSql requests to restrict the results to those identified by
     * this partition token.
     *
     * Generated from protobuf field <code>bytes partition_token = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setPartitionToken($var)
    {
        GPBUtil::checkString($var, False);
        $this->partition_token = $var;

        return $this;
    }

}

