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

namespace Google\Cloud\Dialogflow\V2\SummarizationEvaluationMetrics;

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

/**
 * Evaluation result per conversation(&summary), metric and section.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.SummarizationEvaluationMetrics.SummarizationEvaluationResult</code>
 */
class SummarizationEvaluationResult extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. conversation session id
     *
     * Generated from protobuf field <code>string session_id = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @deprecated
     */
    protected $session_id = '';
    /**
     * Output only. metric name, e.g. accuracy, completeness, adherence, etc.
     *
     * Generated from protobuf field <code>string metric = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $metric = '';
    /**
     * Output only. section/task name, e.g. action, situation, etc
     *
     * Generated from protobuf field <code>string section = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $section = '';
    /**
     * Output only. score calculated from decompositions
     *
     * Generated from protobuf field <code>float score = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $score = 0.0;
    /**
     * Output only. Summary of this section
     *
     * Generated from protobuf field <code>string section_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $section_summary = '';
    /**
     * Output only. List of decompostion details
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.SummarizationEvaluationMetrics.Decomposition decompositions = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @deprecated
     */
    private $decompositions;
    /**
     * Output only. List of evaluation results.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.SummarizationEvaluationMetrics.EvaluationResult evaluation_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $evaluation_results;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $session_id
     *           Output only. conversation session id
     *     @type string $metric
     *           Output only. metric name, e.g. accuracy, completeness, adherence, etc.
     *     @type string $section
     *           Output only. section/task name, e.g. action, situation, etc
     *     @type float $score
     *           Output only. score calculated from decompositions
     *     @type string $section_summary
     *           Output only. Summary of this section
     *     @type \Google\Cloud\Dialogflow\V2\SummarizationEvaluationMetrics\Decomposition[] $decompositions
     *           Output only. List of decompostion details
     *     @type \Google\Cloud\Dialogflow\V2\SummarizationEvaluationMetrics\EvaluationResult[] $evaluation_results
     *           Output only. List of evaluation results.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\GeneratorEvaluation::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. conversation session id
     *
     * Generated from protobuf field <code>string session_id = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     * @deprecated
     */
    public function getSessionId()
    {
        if ($this->session_id !== '') {
            @trigger_error('session_id is deprecated.', E_USER_DEPRECATED);
        }
        return $this->session_id;
    }

    /**
     * Output only. conversation session id
     *
     * Generated from protobuf field <code>string session_id = 1 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setSessionId($var)
    {
        @trigger_error('session_id is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->session_id = $var;

        return $this;
    }

    /**
     * Output only. metric name, e.g. accuracy, completeness, adherence, etc.
     *
     * Generated from protobuf field <code>string metric = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getMetric()
    {
        return $this->metric;
    }

    /**
     * Output only. metric name, e.g. accuracy, completeness, adherence, etc.
     *
     * Generated from protobuf field <code>string metric = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setMetric($var)
    {
        GPBUtil::checkString($var, True);
        $this->metric = $var;

        return $this;
    }

    /**
     * Output only. section/task name, e.g. action, situation, etc
     *
     * Generated from protobuf field <code>string section = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getSection()
    {
        return $this->section;
    }

    /**
     * Output only. section/task name, e.g. action, situation, etc
     *
     * Generated from protobuf field <code>string section = 3 [(.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. score calculated from decompositions
     *
     * Generated from protobuf field <code>float score = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return float
     */
    public function getScore()
    {
        return $this->score;
    }

    /**
     * Output only. score calculated from decompositions
     *
     * Generated from protobuf field <code>float score = 4 [(.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 of this section
     *
     * Generated from protobuf field <code>string section_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getSectionSummary()
    {
        return $this->section_summary;
    }

    /**
     * Output only. Summary of this section
     *
     * Generated from protobuf field <code>string section_summary = 6 [(.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 decompostion details
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.SummarizationEvaluationMetrics.Decomposition decompositions = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return RepeatedField<\Google\Cloud\Dialogflow\V2\SummarizationEvaluationMetrics\Decomposition>
     * @deprecated
     */
    public function getDecompositions()
    {
        if ($this->decompositions->count() !== 0) {
            @trigger_error('decompositions is deprecated.', E_USER_DEPRECATED);
        }
        return $this->decompositions;
    }

    /**
     * Output only. List of decompostion details
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.SummarizationEvaluationMetrics.Decomposition decompositions = 7 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dialogflow\V2\SummarizationEvaluationMetrics\Decomposition[] $var
     * @return $this
     * @deprecated
     */
    public function setDecompositions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SummarizationEvaluationMetrics\Decomposition::class);
        if (count($arr) !== 0) {
            @trigger_error('decompositions is deprecated.', E_USER_DEPRECATED);
        }
        $this->decompositions = $arr;

        return $this;
    }

    /**
     * Output only. List of evaluation results.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.SummarizationEvaluationMetrics.EvaluationResult evaluation_results = 8 [(.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 results.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.SummarizationEvaluationMetrics.EvaluationResult evaluation_results = 8 [(.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;
    }

}

