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

namespace Google\Cloud\AIPlatform\V1\GroundingChunk;

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

/**
 * Chunk from context retrieved by the retrieval tools.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.GroundingChunk.RetrievedContext</code>
 */
class RetrievedContext extends \Google\Protobuf\Internal\Message
{
    /**
     * URI reference of the attribution.
     *
     * Generated from protobuf field <code>optional string uri = 1;</code>
     */
    protected $uri = null;
    /**
     * Title of the attribution.
     *
     * Generated from protobuf field <code>optional string title = 2;</code>
     */
    protected $title = null;
    /**
     * Text of the attribution.
     *
     * Generated from protobuf field <code>optional string text = 3;</code>
     */
    protected $text = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $uri
     *           URI reference of the attribution.
     *     @type string $title
     *           Title of the attribution.
     *     @type string $text
     *           Text of the attribution.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Content::initOnce();
        parent::__construct($data);
    }

    /**
     * URI reference of the attribution.
     *
     * Generated from protobuf field <code>optional string uri = 1;</code>
     * @return string
     */
    public function getUri()
    {
        return isset($this->uri) ? $this->uri : '';
    }

    public function hasUri()
    {
        return isset($this->uri);
    }

    public function clearUri()
    {
        unset($this->uri);
    }

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

        return $this;
    }

    /**
     * Title of the attribution.
     *
     * Generated from protobuf field <code>optional string title = 2;</code>
     * @return string
     */
    public function getTitle()
    {
        return isset($this->title) ? $this->title : '';
    }

    public function hasTitle()
    {
        return isset($this->title);
    }

    public function clearTitle()
    {
        unset($this->title);
    }

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

        return $this;
    }

    /**
     * Text of the attribution.
     *
     * Generated from protobuf field <code>optional string text = 3;</code>
     * @return string
     */
    public function getText()
    {
        return isset($this->text) ? $this->text : '';
    }

    public function hasText()
    {
        return isset($this->text);
    }

    public function clearText()
    {
        unset($this->text);
    }

    /**
     * Text of the attribution.
     *
     * Generated from protobuf field <code>optional string text = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setText($var)
    {
        GPBUtil::checkString($var, True);
        $this->text = $var;

        return $this;
    }

}


