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

namespace Google\Cloud\Dialogflow\V2\SummarizationEvaluationMetrics\ConversationDetail\MetricDetail;

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

/**
 * Section level result.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.SummarizationEvaluationMetrics.ConversationDetail.MetricDetail.SectionDetail</code>
 */
class SectionDetail extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The name of the summary instruction.
     *
     * Generated from protobuf field <code>string section = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $section = '';
    /**
     * Output only. Aggregated(average) score on this section across all
     * evaluation results. Either decompositions or rubrics.
     *
     * Generated from protobuf field <code>optional float score = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $score = null;
    /**
     * Output only. Summary for this section
     *
     * Generated from protobuf field <code>string section_summary = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $section_summary = '';
    /**
     * Output only. List of evaluation result. The list only contains one
     * kind of the evaluation result.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.SummarizationEvaluationMetrics.EvaluationResult evaluation_results = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $evaluation_results;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $section
     *           Output only. The name of the summary instruction.
     *     @type float $score
     *           Output only. Aggregated(average) score on this section across all
     *           evaluation results. Either decompositions or rubrics.
     *     @type string $section_summary
     *           Output only. Summary for this section
     *     @type \Google\Cloud\Dialogflow\V2\SummarizationEvaluationMetrics\EvaluationResult[] $evaluation_results
     *           Output only. List of evaluation result. The list only contains one
     *           kind of the evaluation result.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\GeneratorEvaluation::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The name of the summary instruction.
     *
     * Generated from protobuf field <code>string section = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getSection()
    {
        return $this->section;
    }

    /**
     * Output only. The name of the summary instruction.
     *
     * Generated from protobuf field <code>string section = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setSection($var)
    {
        GPBUtil::checkString($var, True);
        $this->section = $var;

        return $this;
    }

    /**
     * Output only. Aggregated(average) score on this section across all
     * evaluation results. Either decompositions or rubrics.
     *
     * Generated from protobuf field <code>optional float score = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return float
     */
    public function getScore()
    {
        return isset($this->score) ? $this->score : 0.0;
    }

    public function hasScore()
    {
        return isset($this->score);
    }

    public function clearScore()
    {
        unset($this->score);
    }

    /**
     * Output only. Aggregated(average) score on this section across all
     * evaluation results. Either decompositions or rubrics.
     *
     * Generated from protobuf field <code>optional float score = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param float $var
     * @return $this
     */
    public function setScore($var)
    {
        GPBUtil::checkFloat($var);
        $this->score = $var;

        return $this;
    }

    /**
     * Output only. Summary for this section
     *
     * Generated from protobuf field <code>string section_summary = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getSectionSummary()
    {
        return $this->section_summary;
    }

    /**
     * Output only. Summary for this section
     *
     * Generated from protobuf field <code>string section_summary = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setSectionSummary($var)
    {
        GPBUtil::checkString($var, True);
        $this->section_summary = $var;

        return $this;
    }

    /**
     * Output only. List of evaluation result. The list only contains one
     * kind of the evaluation result.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.SummarizationEvaluationMetrics.EvaluationResult evaluation_results = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return RepeatedField<\Google\Cloud\Dialogflow\V2\SummarizationEvaluationMetrics\EvaluationResult>
     */
    public function getEvaluationResults()
    {
        return $this->evaluation_results;
    }

    /**
     * Output only. List of evaluation result. The list only contains one
     * kind of the evaluation result.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.SummarizationEvaluationMetrics.EvaluationResult evaluation_results = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dialogflow\V2\SummarizationEvaluationMetrics\EvaluationResult[] $var
     * @return $this
     */
    public function setEvaluationResults($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SummarizationEvaluationMetrics\EvaluationResult::class);
        $this->evaluation_results = $arr;

        return $this;
    }

}

