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

namespace Google\Cloud\DiscoveryEngine\V1\Answer\Reference\ChunkInfo;

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

/**
 * Document metadata.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1.Answer.Reference.ChunkInfo.DocumentMetadata</code>
 */
class DocumentMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Document resource name.
     *
     * Generated from protobuf field <code>string document = 1 [(.google.api.resource_reference) = {</code>
     */
    protected $document = '';
    /**
     * URI for the document.
     *
     * Generated from protobuf field <code>string uri = 2;</code>
     */
    protected $uri = '';
    /**
     * Title.
     *
     * Generated from protobuf field <code>string title = 3;</code>
     */
    protected $title = '';
    /**
     * Page identifier.
     *
     * Generated from protobuf field <code>string page_identifier = 4;</code>
     */
    protected $page_identifier = '';
    /**
     * The structured JSON metadata for the document.
     * It is populated from the struct data from the Chunk in search result.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct struct_data = 5;</code>
     */
    protected $struct_data = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $document
     *           Document resource name.
     *     @type string $uri
     *           URI for the document.
     *     @type string $title
     *           Title.
     *     @type string $page_identifier
     *           Page identifier.
     *     @type \Google\Protobuf\Struct $struct_data
     *           The structured JSON metadata for the document.
     *           It is populated from the struct data from the Chunk in search result.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1\Answer::initOnce();
        parent::__construct($data);
    }

    /**
     * Document resource name.
     *
     * Generated from protobuf field <code>string document = 1 [(.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getDocument()
    {
        return $this->document;
    }

    /**
     * Document resource name.
     *
     * Generated from protobuf field <code>string document = 1 [(.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setDocument($var)
    {
        GPBUtil::checkString($var, True);
        $this->document = $var;

        return $this;
    }

    /**
     * URI for the document.
     *
     * Generated from protobuf field <code>string uri = 2;</code>
     * @return string
     */
    public function getUri()
    {
        return $this->uri;
    }

    /**
     * URI for the document.
     *
     * Generated from protobuf field <code>string uri = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->uri = $var;

        return $this;
    }

    /**
     * Title.
     *
     * Generated from protobuf field <code>string title = 3;</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Title.
     *
     * Generated from protobuf field <code>string title = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setTitle($var)
    {
        GPBUtil::checkString($var, True);
        $this->title = $var;

        return $this;
    }

    /**
     * Page identifier.
     *
     * Generated from protobuf field <code>string page_identifier = 4;</code>
     * @return string
     */
    public function getPageIdentifier()
    {
        return $this->page_identifier;
    }

    /**
     * Page identifier.
     *
     * Generated from protobuf field <code>string page_identifier = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setPageIdentifier($var)
    {
        GPBUtil::checkString($var, True);
        $this->page_identifier = $var;

        return $this;
    }

    /**
     * The structured JSON metadata for the document.
     * It is populated from the struct data from the Chunk in search result.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct struct_data = 5;</code>
     * @return \Google\Protobuf\Struct|null
     */
    public function getStructData()
    {
        return $this->struct_data;
    }

    public function hasStructData()
    {
        return isset($this->struct_data);
    }

    public function clearStructData()
    {
        unset($this->struct_data);
    }

    /**
     * The structured JSON metadata for the document.
     * It is populated from the struct data from the Chunk in search result.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct struct_data = 5;</code>
     * @param \Google\Protobuf\Struct $var
     * @return $this
     */
    public function setStructData($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
        $this->struct_data = $var;

        return $this;
    }

}


