<?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\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Specifies the size and overlap of chunks for RagFiles.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.RagFileChunkingConfig</code>
 */
class RagFileChunkingConfig extends \Google\Protobuf\Internal\Message
{
    protected $chunking_config;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\RagFileChunkingConfig\FixedLengthChunking $fixed_length_chunking
     *           Specifies the fixed length chunking config.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce();
        parent::__construct($data);
    }

    /**
     * Specifies the fixed length chunking config.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3;</code>
     * @return \Google\Cloud\AIPlatform\V1\RagFileChunkingConfig\FixedLengthChunking|null
     */
    public function getFixedLengthChunking()
    {
        return $this->readOneof(3);
    }

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

    /**
     * Specifies the fixed length chunking config.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3;</code>
     * @param \Google\Cloud\AIPlatform\V1\RagFileChunkingConfig\FixedLengthChunking $var
     * @return $this
     */
    public function setFixedLengthChunking($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagFileChunkingConfig\FixedLengthChunking::class);
        $this->writeOneof(3, $var);

        return $this;
    }

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

}

