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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Relevant contexts for one query.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.RagContexts</code>
 */
class RagContexts extends \Google\Protobuf\Internal\Message
{
    /**
     * All its contexts.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.RagContexts.Context contexts = 1;</code>
     */
    private $contexts;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\AIPlatform\V1\RagContexts\Context>|\Google\Protobuf\Internal\RepeatedField $contexts
     *           All its contexts.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce();
        parent::__construct($data);
    }

    /**
     * All its contexts.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.RagContexts.Context contexts = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getContexts()
    {
        return $this->contexts;
    }

    /**
     * All its contexts.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.RagContexts.Context contexts = 1;</code>
     * @param array<\Google\Cloud\AIPlatform\V1\RagContexts\Context>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setContexts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\RagContexts\Context::class);
        $this->contexts = $arr;

        return $this;
    }

}

