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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Config for the Vector DB to use for RAG.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.RagVectorDbConfig</code>
 */
class RagVectorDbConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Authentication config for the chosen Vector DB.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ApiAuth api_auth = 5;</code>
     */
    protected $api_auth = null;
    /**
     * Optional. Immutable. The embedding model config of the Vector DB.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $rag_embedding_model_config = null;
    protected $vector_db;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\RagManagedDb $rag_managed_db
     *           The config for the RAG-managed Vector DB.
     *     @type \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\Pinecone $pinecone
     *           The config for the Pinecone.
     *     @type \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\VertexVectorSearch $vertex_vector_search
     *           The config for the Vertex Vector Search.
     *     @type \Google\Cloud\AIPlatform\V1\ApiAuth $api_auth
     *           Authentication config for the chosen Vector DB.
     *     @type \Google\Cloud\AIPlatform\V1\RagEmbeddingModelConfig $rag_embedding_model_config
     *           Optional. Immutable. The embedding model config of the Vector DB.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce();
        parent::__construct($data);
    }

    /**
     * The config for the RAG-managed Vector DB.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1;</code>
     * @return \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\RagManagedDb|null
     */
    public function getRagManagedDb()
    {
        return $this->readOneof(1);
    }

    public function hasRagManagedDb()
    {
        return $this->hasOneof(1);
    }

    /**
     * The config for the RAG-managed Vector DB.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1;</code>
     * @param \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\RagManagedDb $var
     * @return $this
     */
    public function setRagManagedDb($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\RagManagedDb::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * The config for the Pinecone.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagVectorDbConfig.Pinecone pinecone = 3;</code>
     * @return \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\Pinecone|null
     */
    public function getPinecone()
    {
        return $this->readOneof(3);
    }

    public function hasPinecone()
    {
        return $this->hasOneof(3);
    }

    /**
     * The config for the Pinecone.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagVectorDbConfig.Pinecone pinecone = 3;</code>
     * @param \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\Pinecone $var
     * @return $this
     */
    public function setPinecone($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\Pinecone::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * The config for the Vertex Vector Search.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6;</code>
     * @return \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\VertexVectorSearch|null
     */
    public function getVertexVectorSearch()
    {
        return $this->readOneof(6);
    }

    public function hasVertexVectorSearch()
    {
        return $this->hasOneof(6);
    }

    /**
     * The config for the Vertex Vector Search.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6;</code>
     * @param \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\VertexVectorSearch $var
     * @return $this
     */
    public function setVertexVectorSearch($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\VertexVectorSearch::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Authentication config for the chosen Vector DB.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ApiAuth api_auth = 5;</code>
     * @return \Google\Cloud\AIPlatform\V1\ApiAuth|null
     */
    public function getApiAuth()
    {
        return $this->api_auth;
    }

    public function hasApiAuth()
    {
        return isset($this->api_auth);
    }

    public function clearApiAuth()
    {
        unset($this->api_auth);
    }

    /**
     * Authentication config for the chosen Vector DB.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ApiAuth api_auth = 5;</code>
     * @param \Google\Cloud\AIPlatform\V1\ApiAuth $var
     * @return $this
     */
    public function setApiAuth($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ApiAuth::class);
        $this->api_auth = $var;

        return $this;
    }

    /**
     * Optional. Immutable. The embedding model config of the Vector DB.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return \Google\Cloud\AIPlatform\V1\RagEmbeddingModelConfig|null
     */
    public function getRagEmbeddingModelConfig()
    {
        return $this->rag_embedding_model_config;
    }

    public function hasRagEmbeddingModelConfig()
    {
        return isset($this->rag_embedding_model_config);
    }

    public function clearRagEmbeddingModelConfig()
    {
        unset($this->rag_embedding_model_config);
    }

    /**
     * Optional. Immutable. The embedding model config of the Vector DB.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param \Google\Cloud\AIPlatform\V1\RagEmbeddingModelConfig $var
     * @return $this
     */
    public function setRagEmbeddingModelConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagEmbeddingModelConfig::class);
        $this->rag_embedding_model_config = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getVectorDb()
    {
        return $this->whichOneof("vector_db");
    }

}

