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

namespace Google\Cloud\Bigtable\V2;

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

/**
 * NOTE: This API is intended to be used by Apache Beam BigtableIO.
 * A partition of a change stream.
 *
 * Generated from protobuf message <code>google.bigtable.v2.StreamPartition</code>
 */
class StreamPartition extends \Google\Protobuf\Internal\Message
{
    /**
     * The row range covered by this partition and is specified by
     * [`start_key_closed`, `end_key_open`).
     *
     * Generated from protobuf field <code>.google.bigtable.v2.RowRange row_range = 1;</code>
     */
    private $row_range = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Bigtable\V2\RowRange $row_range
     *           The row range covered by this partition and is specified by
     *           [`start_key_closed`, `end_key_open`).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\V2\Data::initOnce();
        parent::__construct($data);
    }

    /**
     * The row range covered by this partition and is specified by
     * [`start_key_closed`, `end_key_open`).
     *
     * Generated from protobuf field <code>.google.bigtable.v2.RowRange row_range = 1;</code>
     * @return \Google\Cloud\Bigtable\V2\RowRange|null
     */
    public function getRowRange()
    {
        return $this->row_range;
    }

    public function hasRowRange()
    {
        return isset($this->row_range);
    }

    public function clearRowRange()
    {
        unset($this->row_range);
    }

    /**
     * The row range covered by this partition and is specified by
     * [`start_key_closed`, `end_key_open`).
     *
     * Generated from protobuf field <code>.google.bigtable.v2.RowRange row_range = 1;</code>
     * @param \Google\Cloud\Bigtable\V2\RowRange $var
     * @return $this
     */
    public function setRowRange($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowRange::class);
        $this->row_range = $var;

        return $this;
    }

}

