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

namespace Google\Cloud\AIPlatform\V1\GenerationConfig\RoutingConfig;

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

/**
 * When automated routing is specified, the routing will be determined by
 * the pretrained routing model and customer provided model routing
 * preference.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingMode</code>
 */
class AutoRoutingMode extends \Google\Protobuf\Internal\Message
{
    /**
     * The model routing preference.
     *
     * Generated from protobuf field <code>optional .google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1;</code>
     */
    protected $model_routing_preference = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $model_routing_preference
     *           The model routing preference.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Content::initOnce();
        parent::__construct($data);
    }

    /**
     * The model routing preference.
     *
     * Generated from protobuf field <code>optional .google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1;</code>
     * @return int
     */
    public function getModelRoutingPreference()
    {
        return isset($this->model_routing_preference) ? $this->model_routing_preference : 0;
    }

    public function hasModelRoutingPreference()
    {
        return isset($this->model_routing_preference);
    }

    public function clearModelRoutingPreference()
    {
        unset($this->model_routing_preference);
    }

    /**
     * The model routing preference.
     *
     * Generated from protobuf field <code>optional .google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference model_routing_preference = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setModelRoutingPreference($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\GenerationConfig\RoutingConfig\AutoRoutingMode\ModelRoutingPreference::class);
        $this->model_routing_preference = $var;

        return $this;
    }

}


