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

namespace Google\Cloud\Ces\V1;

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

/**
 * Model settings contains various configurations for the LLM model.
 *
 * Generated from protobuf message <code>google.cloud.ces.v1.ModelSettings</code>
 */
class ModelSettings extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The LLM model that the agent should use.
     * If not set, the agent will inherit the model from its parent agent.
     *
     * Generated from protobuf field <code>string model = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $model = '';
    /**
     * Optional. If set, this temperature will be used for the LLM model.
     * Temperature controls the randomness of the model's responses. Lower
     * temperatures produce responses that are more predictable. Higher
     * temperatures produce responses that are more creative.
     *
     * Generated from protobuf field <code>optional double temperature = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $temperature = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $model
     *           Optional. The LLM model that the agent should use.
     *           If not set, the agent will inherit the model from its parent agent.
     *     @type float $temperature
     *           Optional. If set, this temperature will be used for the LLM model.
     *           Temperature controls the randomness of the model's responses. Lower
     *           temperatures produce responses that are more predictable. Higher
     *           temperatures produce responses that are more creative.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Ces\V1\Common::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The LLM model that the agent should use.
     * If not set, the agent will inherit the model from its parent agent.
     *
     * Generated from protobuf field <code>string model = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getModel()
    {
        return $this->model;
    }

    /**
     * Optional. The LLM model that the agent should use.
     * If not set, the agent will inherit the model from its parent agent.
     *
     * Generated from protobuf field <code>string model = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setModel($var)
    {
        GPBUtil::checkString($var, True);
        $this->model = $var;

        return $this;
    }

    /**
     * Optional. If set, this temperature will be used for the LLM model.
     * Temperature controls the randomness of the model's responses. Lower
     * temperatures produce responses that are more predictable. Higher
     * temperatures produce responses that are more creative.
     *
     * Generated from protobuf field <code>optional double temperature = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return float
     */
    public function getTemperature()
    {
        return isset($this->temperature) ? $this->temperature : 0.0;
    }

    public function hasTemperature()
    {
        return isset($this->temperature);
    }

    public function clearTemperature()
    {
        unset($this->temperature);
    }

    /**
     * Optional. If set, this temperature will be used for the LLM model.
     * Temperature controls the randomness of the model's responses. Lower
     * temperatures produce responses that are more predictable. Higher
     * temperatures produce responses that are more creative.
     *
     * Generated from protobuf field <code>optional double temperature = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param float $var
     * @return $this
     */
    public function setTemperature($var)
    {
        GPBUtil::checkDouble($var);
        $this->temperature = $var;

        return $this;
    }

}

