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

namespace Google\Cloud\DocumentAI\V1\Document\Provenance;

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

/**
 * Structure for referencing parent provenances.  When an element replaces
 * one of more other elements parent references identify the elements that
 * are replaced.
 *
 * Generated from protobuf message <code>google.cloud.documentai.v1.Document.Provenance.Parent</code>
 */
class PBParent extends \Google\Protobuf\Internal\Message
{
    /**
     * The index of the [Document.revisions] identifying the parent revision.
     *
     * Generated from protobuf field <code>int32 revision = 1;</code>
     */
    private $revision = 0;
    /**
     * The index of the parent revisions corresponding collection of items
     * (eg. list of entities, properties within entities, etc.)
     *
     * Generated from protobuf field <code>int32 index = 3;</code>
     */
    private $index = 0;
    /**
     * The id of the parent provenance.
     *
     * Generated from protobuf field <code>int32 id = 2 [deprecated = true];</code>
     * @deprecated
     */
    protected $id = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $revision
     *           The index of the [Document.revisions] identifying the parent revision.
     *     @type int $index
     *           The index of the parent revisions corresponding collection of items
     *           (eg. list of entities, properties within entities, etc.)
     *     @type int $id
     *           The id of the parent provenance.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce();
        parent::__construct($data);
    }

    /**
     * The index of the [Document.revisions] identifying the parent revision.
     *
     * Generated from protobuf field <code>int32 revision = 1;</code>
     * @return int
     */
    public function getRevision()
    {
        return $this->revision;
    }

    /**
     * The index of the [Document.revisions] identifying the parent revision.
     *
     * Generated from protobuf field <code>int32 revision = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setRevision($var)
    {
        GPBUtil::checkInt32($var);
        $this->revision = $var;

        return $this;
    }

    /**
     * The index of the parent revisions corresponding collection of items
     * (eg. list of entities, properties within entities, etc.)
     *
     * Generated from protobuf field <code>int32 index = 3;</code>
     * @return int
     */
    public function getIndex()
    {
        return $this->index;
    }

    /**
     * The index of the parent revisions corresponding collection of items
     * (eg. list of entities, properties within entities, etc.)
     *
     * Generated from protobuf field <code>int32 index = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setIndex($var)
    {
        GPBUtil::checkInt32($var);
        $this->index = $var;

        return $this;
    }

    /**
     * The id of the parent provenance.
     *
     * Generated from protobuf field <code>int32 id = 2 [deprecated = true];</code>
     * @return int
     * @deprecated
     */
    public function getId()
    {
        @trigger_error('id is deprecated.', E_USER_DEPRECATED);
        return $this->id;
    }

    /**
     * The id of the parent provenance.
     *
     * Generated from protobuf field <code>int32 id = 2 [deprecated = true];</code>
     * @param int $var
     * @return $this
     * @deprecated
     */
    public function setId($var)
    {
        @trigger_error('id is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkInt32($var);
        $this->id = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PBParent::class, \Google\Cloud\DocumentAI\V1\Document_Provenance_Parent::class);

