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

namespace Google\Cloud\BigQuery\Storage\V1;

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

/**
 * Request message for `ReadRows`.
 *
 * Generated from protobuf message <code>google.cloud.bigquery.storage.v1.ReadRowsRequest</code>
 */
class ReadRowsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Stream to read rows from.
     *
     * Generated from protobuf field <code>string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $read_stream = '';
    /**
     * The offset requested must be less than the last row read from Read.
     * Requesting a larger offset is undefined. If not specified, start reading
     * from offset zero.
     *
     * Generated from protobuf field <code>int64 offset = 2;</code>
     */
    private $offset = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $read_stream
     *           Required. Stream to read rows from.
     *     @type int|string $offset
     *           The offset requested must be less than the last row read from Read.
     *           Requesting a larger offset is undefined. If not specified, start reading
     *           from offset zero.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Stream to read rows from.
     *
     * Generated from protobuf field <code>string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getReadStream()
    {
        return $this->read_stream;
    }

    /**
     * Required. Stream to read rows from.
     *
     * Generated from protobuf field <code>string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setReadStream($var)
    {
        GPBUtil::checkString($var, True);
        $this->read_stream = $var;

        return $this;
    }

    /**
     * The offset requested must be less than the last row read from Read.
     * Requesting a larger offset is undefined. If not specified, start reading
     * from offset zero.
     *
     * Generated from protobuf field <code>int64 offset = 2;</code>
     * @return int|string
     */
    public function getOffset()
    {
        return $this->offset;
    }

    /**
     * The offset requested must be less than the last row read from Read.
     * Requesting a larger offset is undefined. If not specified, start reading
     * from offset zero.
     *
     * Generated from protobuf field <code>int64 offset = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setOffset($var)
    {
        GPBUtil::checkInt64($var);
        $this->offset = $var;

        return $this;
    }

}

