<?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\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Spec for pairwise question answering quality result.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityResult</code>
 */
class PairwiseQuestionAnsweringQualityResult extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Pairwise question answering prediction choice.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.PairwiseChoice pairwise_choice = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $pairwise_choice = 0;
    /**
     * Output only. Explanation for question answering quality score.
     *
     * Generated from protobuf field <code>string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $explanation = '';
    /**
     * Output only. Confidence for question answering quality score.
     *
     * Generated from protobuf field <code>optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $confidence = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $pairwise_choice
     *           Output only. Pairwise question answering prediction choice.
     *     @type string $explanation
     *           Output only. Explanation for question answering quality score.
     *     @type float $confidence
     *           Output only. Confidence for question answering quality score.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Pairwise question answering prediction choice.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.PairwiseChoice pairwise_choice = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getPairwiseChoice()
    {
        return $this->pairwise_choice;
    }

    /**
     * Output only. Pairwise question answering prediction choice.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.PairwiseChoice pairwise_choice = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setPairwiseChoice($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\PairwiseChoice::class);
        $this->pairwise_choice = $var;

        return $this;
    }

    /**
     * Output only. Explanation for question answering quality score.
     *
     * Generated from protobuf field <code>string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getExplanation()
    {
        return $this->explanation;
    }

    /**
     * Output only. Explanation for question answering quality score.
     *
     * Generated from protobuf field <code>string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setExplanation($var)
    {
        GPBUtil::checkString($var, True);
        $this->explanation = $var;

        return $this;
    }

    /**
     * Output only. Confidence for question answering quality score.
     *
     * Generated from protobuf field <code>optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return float
     */
    public function getConfidence()
    {
        return isset($this->confidence) ? $this->confidence : 0.0;
    }

    public function hasConfidence()
    {
        return isset($this->confidence);
    }

    public function clearConfidence()
    {
        unset($this->confidence);
    }

    /**
     * Output only. Confidence for question answering quality score.
     *
     * Generated from protobuf field <code>optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param float $var
     * @return $this
     */
    public function setConfidence($var)
    {
        GPBUtil::checkFloat($var);
        $this->confidence = $var;

        return $this;
    }

}

