<?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;

/**
 * A RagCorpus is a RagFile container and a project can have multiple
 * RagCorpora.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.RagCorpus</code>
 */
class RagCorpus extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The resource name of the RagCorpus.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $name = '';
    /**
     * Required. The display name of the RagCorpus.
     * The name can be up to 128 characters long and can consist of any UTF-8
     * characters.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $display_name = '';
    /**
     * Optional. The description of the RagCorpus.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $description = '';
    /**
     * Output only. Timestamp when this RagCorpus was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. Timestamp when this RagCorpus was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $update_time = null;
    /**
     * Output only. RagCorpus state.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $corpus_status = null;
    protected $backend_config;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\RagVectorDbConfig $vector_db_config
     *           Optional. Immutable. The config for the Vector DBs.
     *     @type \Google\Cloud\AIPlatform\V1\VertexAiSearchConfig $vertex_ai_search_config
     *           Optional. Immutable. The config for the Vertex AI Search.
     *     @type string $name
     *           Output only. The resource name of the RagCorpus.
     *     @type string $display_name
     *           Required. The display name of the RagCorpus.
     *           The name can be up to 128 characters long and can consist of any UTF-8
     *           characters.
     *     @type string $description
     *           Optional. The description of the RagCorpus.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Timestamp when this RagCorpus was created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. Timestamp when this RagCorpus was last updated.
     *     @type \Google\Cloud\AIPlatform\V1\CorpusStatus $corpus_status
     *           Output only. RagCorpus state.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Immutable. The config for the Vector DBs.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return \Google\Cloud\AIPlatform\V1\RagVectorDbConfig|null
     */
    public function getVectorDbConfig()
    {
        return $this->readOneof(9);
    }

    public function hasVectorDbConfig()
    {
        return $this->hasOneof(9);
    }

    /**
     * Optional. Immutable. The config for the Vector DBs.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param \Google\Cloud\AIPlatform\V1\RagVectorDbConfig $var
     * @return $this
     */
    public function setVectorDbConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagVectorDbConfig::class);
        $this->writeOneof(9, $var);

        return $this;
    }

    /**
     * Optional. Immutable. The config for the Vertex AI Search.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return \Google\Cloud\AIPlatform\V1\VertexAiSearchConfig|null
     */
    public function getVertexAiSearchConfig()
    {
        return $this->readOneof(10);
    }

    public function hasVertexAiSearchConfig()
    {
        return $this->hasOneof(10);
    }

    /**
     * Optional. Immutable. The config for the Vertex AI Search.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.VertexAiSearchConfig vertex_ai_search_config = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param \Google\Cloud\AIPlatform\V1\VertexAiSearchConfig $var
     * @return $this
     */
    public function setVertexAiSearchConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\VertexAiSearchConfig::class);
        $this->writeOneof(10, $var);

        return $this;
    }

    /**
     * Output only. The resource name of the RagCorpus.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. The resource name of the RagCorpus.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The display name of the RagCorpus.
     * The name can be up to 128 characters long and can consist of any UTF-8
     * characters.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Required. The display name of the RagCorpus.
     * The name can be up to 128 characters long and can consist of any UTF-8
     * characters.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Optional. The description of the RagCorpus.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Optional. The description of the RagCorpus.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Output only. Timestamp when this RagCorpus was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. Timestamp when this RagCorpus was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. Timestamp when this RagCorpus was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. Timestamp when this RagCorpus was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * Output only. RagCorpus state.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\AIPlatform\V1\CorpusStatus|null
     */
    public function getCorpusStatus()
    {
        return $this->corpus_status;
    }

    public function hasCorpusStatus()
    {
        return isset($this->corpus_status);
    }

    public function clearCorpusStatus()
    {
        unset($this->corpus_status);
    }

    /**
     * Output only. RagCorpus state.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\AIPlatform\V1\CorpusStatus $var
     * @return $this
     */
    public function setCorpusStatus($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\CorpusStatus::class);
        $this->corpus_status = $var;

        return $this;
    }

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

}

