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

namespace Google\Cloud\Bigtable\V2;

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

/**
 * Response message for Bigtable.ReadRows.
 *
 * Generated from protobuf message <code>google.bigtable.v2.ReadRowsResponse</code>
 */
class ReadRowsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1;</code>
     */
    private $chunks;
    /**
     * Optionally the server might return the row key of the last row it
     * has scanned.  The client can use this to construct a more
     * efficient retry request if needed: any row keys or portions of
     * ranges less than this row key can be dropped from the request.
     * This is primarily useful for cases where the server has read a
     * lot of data that was filtered out since the last committed row
     * key, allowing the client to skip that work on a retry.
     *
     * Generated from protobuf field <code>bytes last_scanned_row_key = 2;</code>
     */
    private $last_scanned_row_key = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Bigtable\V2\ReadRowsResponse\CellChunk[]|\Google\Protobuf\Internal\RepeatedField $chunks
     *     @type string $last_scanned_row_key
     *           Optionally the server might return the row key of the last row it
     *           has scanned.  The client can use this to construct a more
     *           efficient retry request if needed: any row keys or portions of
     *           ranges less than this row key can be dropped from the request.
     *           This is primarily useful for cases where the server has read a
     *           lot of data that was filtered out since the last committed row
     *           key, allowing the client to skip that work on a retry.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getChunks()
    {
        return $this->chunks;
    }

    /**
     * Generated from protobuf field <code>repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1;</code>
     * @param \Google\Cloud\Bigtable\V2\ReadRowsResponse\CellChunk[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setChunks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\ReadRowsResponse\CellChunk::class);
        $this->chunks = $arr;

        return $this;
    }

    /**
     * Optionally the server might return the row key of the last row it
     * has scanned.  The client can use this to construct a more
     * efficient retry request if needed: any row keys or portions of
     * ranges less than this row key can be dropped from the request.
     * This is primarily useful for cases where the server has read a
     * lot of data that was filtered out since the last committed row
     * key, allowing the client to skip that work on a retry.
     *
     * Generated from protobuf field <code>bytes last_scanned_row_key = 2;</code>
     * @return string
     */
    public function getLastScannedRowKey()
    {
        return $this->last_scanned_row_key;
    }

    /**
     * Optionally the server might return the row key of the last row it
     * has scanned.  The client can use this to construct a more
     * efficient retry request if needed: any row keys or portions of
     * ranges less than this row key can be dropped from the request.
     * This is primarily useful for cases where the server has read a
     * lot of data that was filtered out since the last committed row
     * key, allowing the client to skip that work on a retry.
     *
     * Generated from protobuf field <code>bytes last_scanned_row_key = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setLastScannedRowKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->last_scanned_row_key = $var;

        return $this;
    }

}

