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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Response message for
 * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile].
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.UploadRagFileResponse</code>
 */
class UploadRagFileResponse extends \Google\Protobuf\Internal\Message
{
    protected $result;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\RagFile $rag_file
     *           The RagFile that had been uploaded into the RagCorpus.
     *     @type \Google\Rpc\Status $error
     *           The error that occurred while processing the RagFile.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce();
        parent::__construct($data);
    }

    /**
     * The RagFile that had been uploaded into the RagCorpus.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagFile rag_file = 1;</code>
     * @return \Google\Cloud\AIPlatform\V1\RagFile|null
     */
    public function getRagFile()
    {
        return $this->readOneof(1);
    }

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

    /**
     * The RagFile that had been uploaded into the RagCorpus.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagFile rag_file = 1;</code>
     * @param \Google\Cloud\AIPlatform\V1\RagFile $var
     * @return $this
     */
    public function setRagFile($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagFile::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * The error that occurred while processing the RagFile.
     *
     * Generated from protobuf field <code>.google.rpc.Status error = 4;</code>
     * @return \Google\Rpc\Status|null
     */
    public function getError()
    {
        return $this->readOneof(4);
    }

    public function hasError()
    {
        return $this->hasOneof(4);
    }

    /**
     * The error that occurred while processing the RagFile.
     *
     * Generated from protobuf field <code>.google.rpc.Status error = 4;</code>
     * @param \Google\Rpc\Status $var
     * @return $this
     */
    public function setError($var)
    {
        GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
        $this->writeOneof(4, $var);

        return $this;
    }

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

}

