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

namespace Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk;

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

/**
 * Information about the chunking of this mutation.
 * Only `SetCell` mutations can be chunked, and all chunks for a `SetCell`
 * will be delivered contiguously with no other mutation types interleaved.
 *
 * Generated from protobuf message <code>google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo</code>
 */
class ChunkInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * The total value size of all the chunks that make up the `SetCell`.
     *
     * Generated from protobuf field <code>int32 chunked_value_size = 1;</code>
     */
    private $chunked_value_size = 0;
    /**
     * The byte offset of this chunk into the total value size of the
     * mutation.
     *
     * Generated from protobuf field <code>int32 chunked_value_offset = 2;</code>
     */
    private $chunked_value_offset = 0;
    /**
     * When true, this is the last chunk of a chunked `SetCell`.
     *
     * Generated from protobuf field <code>bool last_chunk = 3;</code>
     */
    private $last_chunk = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $chunked_value_size
     *           The total value size of all the chunks that make up the `SetCell`.
     *     @type int $chunked_value_offset
     *           The byte offset of this chunk into the total value size of the
     *           mutation.
     *     @type bool $last_chunk
     *           When true, this is the last chunk of a chunked `SetCell`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce();
        parent::__construct($data);
    }

    /**
     * The total value size of all the chunks that make up the `SetCell`.
     *
     * Generated from protobuf field <code>int32 chunked_value_size = 1;</code>
     * @return int
     */
    public function getChunkedValueSize()
    {
        return $this->chunked_value_size;
    }

    /**
     * The total value size of all the chunks that make up the `SetCell`.
     *
     * Generated from protobuf field <code>int32 chunked_value_size = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setChunkedValueSize($var)
    {
        GPBUtil::checkInt32($var);
        $this->chunked_value_size = $var;

        return $this;
    }

    /**
     * The byte offset of this chunk into the total value size of the
     * mutation.
     *
     * Generated from protobuf field <code>int32 chunked_value_offset = 2;</code>
     * @return int
     */
    public function getChunkedValueOffset()
    {
        return $this->chunked_value_offset;
    }

    /**
     * The byte offset of this chunk into the total value size of the
     * mutation.
     *
     * Generated from protobuf field <code>int32 chunked_value_offset = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setChunkedValueOffset($var)
    {
        GPBUtil::checkInt32($var);
        $this->chunked_value_offset = $var;

        return $this;
    }

    /**
     * When true, this is the last chunk of a chunked `SetCell`.
     *
     * Generated from protobuf field <code>bool last_chunk = 3;</code>
     * @return bool
     */
    public function getLastChunk()
    {
        return $this->last_chunk;
    }

    /**
     * When true, this is the last chunk of a chunked `SetCell`.
     *
     * Generated from protobuf field <code>bool last_chunk = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setLastChunk($var)
    {
        GPBUtil::checkBool($var);
        $this->last_chunk = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ChunkInfo::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_MutationChunk_ChunkInfo::class);

