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

namespace Google\Cloud\AIPlatform\V1\GenerationConfig;

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

/**
 * The configuration for routing the request to a specific model.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig</code>
 */
class RoutingConfig extends \Google\Protobuf\Internal\Message
{
    protected $routing_config;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\GenerationConfig\RoutingConfig\AutoRoutingMode $auto_mode
     *           Automated routing.
     *     @type \Google\Cloud\AIPlatform\V1\GenerationConfig\RoutingConfig\ManualRoutingMode $manual_mode
     *           Manual routing.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Content::initOnce();
        parent::__construct($data);
    }

    /**
     * Automated routing.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1;</code>
     * @return \Google\Cloud\AIPlatform\V1\GenerationConfig\RoutingConfig\AutoRoutingMode|null
     */
    public function getAutoMode()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Automated routing.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingMode auto_mode = 1;</code>
     * @param \Google\Cloud\AIPlatform\V1\GenerationConfig\RoutingConfig\AutoRoutingMode $var
     * @return $this
     */
    public function setAutoMode($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenerationConfig\RoutingConfig\AutoRoutingMode::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Manual routing.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2;</code>
     * @return \Google\Cloud\AIPlatform\V1\GenerationConfig\RoutingConfig\ManualRoutingMode|null
     */
    public function getManualMode()
    {
        return $this->readOneof(2);
    }

    public function hasManualMode()
    {
        return $this->hasOneof(2);
    }

    /**
     * Manual routing.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.ManualRoutingMode manual_mode = 2;</code>
     * @param \Google\Cloud\AIPlatform\V1\GenerationConfig\RoutingConfig\ManualRoutingMode $var
     * @return $this
     */
    public function setManualMode($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenerationConfig\RoutingConfig\ManualRoutingMode::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}


