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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Spec for pairwise metric.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.PairwiseMetricSpec</code>
 */
class PairwiseMetricSpec extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Metric prompt template for pairwise metric.
     *
     * Generated from protobuf field <code>optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $metric_prompt_template = null;
    /**
     * Optional. The field name of the candidate response.
     *
     * Generated from protobuf field <code>string candidate_response_field_name = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $candidate_response_field_name = '';
    /**
     * Optional. The field name of the baseline response.
     *
     * Generated from protobuf field <code>string baseline_response_field_name = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $baseline_response_field_name = '';
    /**
     * Optional. System instructions for pairwise metric.
     *
     * Generated from protobuf field <code>optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $system_instruction = null;
    /**
     * Optional. CustomOutputFormatConfig allows customization of metric output.
     * When this config is set, the default output is replaced with
     * the raw output string.
     * If a custom format is chosen, the `pairwise_choice` and `explanation`
     * fields in the corresponding metric result will be empty.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $custom_output_format_config = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $metric_prompt_template
     *           Required. Metric prompt template for pairwise metric.
     *     @type string $candidate_response_field_name
     *           Optional. The field name of the candidate response.
     *     @type string $baseline_response_field_name
     *           Optional. The field name of the baseline response.
     *     @type string $system_instruction
     *           Optional. System instructions for pairwise metric.
     *     @type \Google\Cloud\AIPlatform\V1\CustomOutputFormatConfig $custom_output_format_config
     *           Optional. CustomOutputFormatConfig allows customization of metric output.
     *           When this config is set, the default output is replaced with
     *           the raw output string.
     *           If a custom format is chosen, the `pairwise_choice` and `explanation`
     *           fields in the corresponding metric result will be empty.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Metric prompt template for pairwise metric.
     *
     * Generated from protobuf field <code>optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getMetricPromptTemplate()
    {
        return isset($this->metric_prompt_template) ? $this->metric_prompt_template : '';
    }

    public function hasMetricPromptTemplate()
    {
        return isset($this->metric_prompt_template);
    }

    public function clearMetricPromptTemplate()
    {
        unset($this->metric_prompt_template);
    }

    /**
     * Required. Metric prompt template for pairwise metric.
     *
     * Generated from protobuf field <code>optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setMetricPromptTemplate($var)
    {
        GPBUtil::checkString($var, True);
        $this->metric_prompt_template = $var;

        return $this;
    }

    /**
     * Optional. The field name of the candidate response.
     *
     * Generated from protobuf field <code>string candidate_response_field_name = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getCandidateResponseFieldName()
    {
        return $this->candidate_response_field_name;
    }

    /**
     * Optional. The field name of the candidate response.
     *
     * Generated from protobuf field <code>string candidate_response_field_name = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setCandidateResponseFieldName($var)
    {
        GPBUtil::checkString($var, True);
        $this->candidate_response_field_name = $var;

        return $this;
    }

    /**
     * Optional. The field name of the baseline response.
     *
     * Generated from protobuf field <code>string baseline_response_field_name = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getBaselineResponseFieldName()
    {
        return $this->baseline_response_field_name;
    }

    /**
     * Optional. The field name of the baseline response.
     *
     * Generated from protobuf field <code>string baseline_response_field_name = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setBaselineResponseFieldName($var)
    {
        GPBUtil::checkString($var, True);
        $this->baseline_response_field_name = $var;

        return $this;
    }

    /**
     * Optional. System instructions for pairwise metric.
     *
     * Generated from protobuf field <code>optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getSystemInstruction()
    {
        return isset($this->system_instruction) ? $this->system_instruction : '';
    }

    public function hasSystemInstruction()
    {
        return isset($this->system_instruction);
    }

    public function clearSystemInstruction()
    {
        unset($this->system_instruction);
    }

    /**
     * Optional. System instructions for pairwise metric.
     *
     * Generated from protobuf field <code>optional string system_instruction = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setSystemInstruction($var)
    {
        GPBUtil::checkString($var, True);
        $this->system_instruction = $var;

        return $this;
    }

    /**
     * Optional. CustomOutputFormatConfig allows customization of metric output.
     * When this config is set, the default output is replaced with
     * the raw output string.
     * If a custom format is chosen, the `pairwise_choice` and `explanation`
     * fields in the corresponding metric result will be empty.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\AIPlatform\V1\CustomOutputFormatConfig|null
     */
    public function getCustomOutputFormatConfig()
    {
        return $this->custom_output_format_config;
    }

    public function hasCustomOutputFormatConfig()
    {
        return isset($this->custom_output_format_config);
    }

    public function clearCustomOutputFormatConfig()
    {
        unset($this->custom_output_format_config);
    }

    /**
     * Optional. CustomOutputFormatConfig allows customization of metric output.
     * When this config is set, the default output is replaced with
     * the raw output string.
     * If a custom format is chosen, the `pairwise_choice` and `explanation`
     * fields in the corresponding metric result will be empty.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.CustomOutputFormatConfig custom_output_format_config = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\AIPlatform\V1\CustomOutputFormatConfig $var
     * @return $this
     */
    public function setCustomOutputFormatConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\CustomOutputFormatConfig::class);
        $this->custom_output_format_config = $var;

        return $this;
    }

}

