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

namespace Google\Cloud\DiscoveryEngine\V1\SearchResponse\Summary;

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

/**
 * Citation source.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1.SearchResponse.Summary.CitationSource</code>
 */
class CitationSource extends \Google\Protobuf\Internal\Message
{
    /**
     * Document reference index from SummaryWithMetadata.references.
     * It is 0-indexed and the value will be zero if the reference_index is
     * not set explicitly.
     *
     * Generated from protobuf field <code>int64 reference_index = 4;</code>
     */
    protected $reference_index = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $reference_index
     *           Document reference index from SummaryWithMetadata.references.
     *           It is 0-indexed and the value will be zero if the reference_index is
     *           not set explicitly.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce();
        parent::__construct($data);
    }

    /**
     * Document reference index from SummaryWithMetadata.references.
     * It is 0-indexed and the value will be zero if the reference_index is
     * not set explicitly.
     *
     * Generated from protobuf field <code>int64 reference_index = 4;</code>
     * @return int|string
     */
    public function getReferenceIndex()
    {
        return $this->reference_index;
    }

    /**
     * Document reference index from SummaryWithMetadata.references.
     * It is 0-indexed and the value will be zero if the reference_index is
     * not set explicitly.
     *
     * Generated from protobuf field <code>int64 reference_index = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setReferenceIndex($var)
    {
        GPBUtil::checkInt64($var);
        $this->reference_index = $var;

        return $this;
    }

}


