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

namespace Google\Cloud\AIPlatform\V1\RagChunk;

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

/**
 * Represents where the chunk starts and ends in the document.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.RagChunk.PageSpan</code>
 */
class PageSpan extends \Google\Protobuf\Internal\Message
{
    /**
     * Page where chunk starts in the document. Inclusive. 1-indexed.
     *
     * Generated from protobuf field <code>int32 first_page = 1;</code>
     */
    protected $first_page = 0;
    /**
     * Page where chunk ends in the document. Inclusive. 1-indexed.
     *
     * Generated from protobuf field <code>int32 last_page = 2;</code>
     */
    protected $last_page = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $first_page
     *           Page where chunk starts in the document. Inclusive. 1-indexed.
     *     @type int $last_page
     *           Page where chunk ends in the document. Inclusive. 1-indexed.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce();
        parent::__construct($data);
    }

    /**
     * Page where chunk starts in the document. Inclusive. 1-indexed.
     *
     * Generated from protobuf field <code>int32 first_page = 1;</code>
     * @return int
     */
    public function getFirstPage()
    {
        return $this->first_page;
    }

    /**
     * Page where chunk starts in the document. Inclusive. 1-indexed.
     *
     * Generated from protobuf field <code>int32 first_page = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setFirstPage($var)
    {
        GPBUtil::checkInt32($var);
        $this->first_page = $var;

        return $this;
    }

    /**
     * Page where chunk ends in the document. Inclusive. 1-indexed.
     *
     * Generated from protobuf field <code>int32 last_page = 2;</code>
     * @return int
     */
    public function getLastPage()
    {
        return $this->last_page;
    }

    /**
     * Page where chunk ends in the document. Inclusive. 1-indexed.
     *
     * Generated from protobuf field <code>int32 last_page = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setLastPage($var)
    {
        GPBUtil::checkInt32($var);
        $this->last_page = $var;

        return $this;
    }

}


