<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/v2/conversation_model.proto

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * The configuration for model evaluation.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.EvaluationConfig</code>
 */
class EvaluationConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Datasets used for evaluation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.InputDataset datasets = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $datasets;
    protected $model_specific_config;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Dialogflow\V2\InputDataset>|\Google\Protobuf\Internal\RepeatedField $datasets
     *           Required. Datasets used for evaluation.
     *     @type \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartReplyConfig $smart_reply_config
     *           Configuration for smart reply model evalution.
     *     @type \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartComposeConfig $smart_compose_config
     *           Configuration for smart compose model evalution.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Datasets used for evaluation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.InputDataset datasets = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDatasets()
    {
        return $this->datasets;
    }

    /**
     * Required. Datasets used for evaluation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.InputDataset datasets = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Cloud\Dialogflow\V2\InputDataset>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDatasets($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\InputDataset::class);
        $this->datasets = $arr;

        return $this;
    }

    /**
     * Configuration for smart reply model evalution.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig smart_reply_config = 2;</code>
     * @return \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartReplyConfig|null
     */
    public function getSmartReplyConfig()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Configuration for smart reply model evalution.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig smart_reply_config = 2;</code>
     * @param \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartReplyConfig $var
     * @return $this
     */
    public function setSmartReplyConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartReplyConfig::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Configuration for smart compose model evalution.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig smart_compose_config = 4;</code>
     * @return \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartComposeConfig|null
     */
    public function getSmartComposeConfig()
    {
        return $this->readOneof(4);
    }

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

    /**
     * Configuration for smart compose model evalution.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig smart_compose_config = 4;</code>
     * @param \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartComposeConfig $var
     * @return $this
     */
    public function setSmartComposeConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\EvaluationConfig\SmartComposeConfig::class);
        $this->writeOneof(4, $var);

        return $this;
    }

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

}

