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

namespace Google\Cloud\DocumentAI\V1\Evaluation;

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

/**
 * Metrics across multiple confidence levels.
 *
 * Generated from protobuf message <code>google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics</code>
 */
class MultiConfidenceMetrics extends \Google\Protobuf\Internal\Message
{
    /**
     * Metrics across confidence levels with fuzzy matching enabled.
     *
     * Generated from protobuf field <code>repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1;</code>
     */
    private $confidence_level_metrics;
    /**
     * Metrics across confidence levels with only exact matching.
     *
     * Generated from protobuf field <code>repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4;</code>
     */
    private $confidence_level_metrics_exact;
    /**
     * The calculated area under the precision recall curve (AUPRC), computed by
     * integrating over all confidence thresholds.
     *
     * Generated from protobuf field <code>float auprc = 2;</code>
     */
    private $auprc = 0.0;
    /**
     * The Estimated Calibration Error (ECE) of the confidence of the predicted
     * entities.
     *
     * Generated from protobuf field <code>float estimated_calibration_error = 3;</code>
     */
    private $estimated_calibration_error = 0.0;
    /**
     * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching
     * only.
     *
     * Generated from protobuf field <code>float auprc_exact = 5;</code>
     */
    private $auprc_exact = 0.0;
    /**
     * The ECE for the predicted entities with fuzzy matching disabled, i.e.,
     * exact matching only.
     *
     * Generated from protobuf field <code>float estimated_calibration_error_exact = 6;</code>
     */
    private $estimated_calibration_error_exact = 0.0;
    /**
     * The metrics type for the label.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7;</code>
     */
    private $metrics_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics>|\Google\Protobuf\Internal\RepeatedField $confidence_level_metrics
     *           Metrics across confidence levels with fuzzy matching enabled.
     *     @type array<\Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics>|\Google\Protobuf\Internal\RepeatedField $confidence_level_metrics_exact
     *           Metrics across confidence levels with only exact matching.
     *     @type float $auprc
     *           The calculated area under the precision recall curve (AUPRC), computed by
     *           integrating over all confidence thresholds.
     *     @type float $estimated_calibration_error
     *           The Estimated Calibration Error (ECE) of the confidence of the predicted
     *           entities.
     *     @type float $auprc_exact
     *           The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching
     *           only.
     *     @type float $estimated_calibration_error_exact
     *           The ECE for the predicted entities with fuzzy matching disabled, i.e.,
     *           exact matching only.
     *     @type int $metrics_type
     *           The metrics type for the label.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce();
        parent::__construct($data);
    }

    /**
     * Metrics across confidence levels with fuzzy matching enabled.
     *
     * Generated from protobuf field <code>repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getConfidenceLevelMetrics()
    {
        return $this->confidence_level_metrics;
    }

    /**
     * Metrics across confidence levels with fuzzy matching enabled.
     *
     * Generated from protobuf field <code>repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics = 1;</code>
     * @param array<\Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setConfidenceLevelMetrics($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics::class);
        $this->confidence_level_metrics = $arr;

        return $this;
    }

    /**
     * Metrics across confidence levels with only exact matching.
     *
     * Generated from protobuf field <code>repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getConfidenceLevelMetricsExact()
    {
        return $this->confidence_level_metrics_exact;
    }

    /**
     * Metrics across confidence levels with only exact matching.
     *
     * Generated from protobuf field <code>repeated .google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics confidence_level_metrics_exact = 4;</code>
     * @param array<\Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setConfidenceLevelMetricsExact($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Evaluation\ConfidenceLevelMetrics::class);
        $this->confidence_level_metrics_exact = $arr;

        return $this;
    }

    /**
     * The calculated area under the precision recall curve (AUPRC), computed by
     * integrating over all confidence thresholds.
     *
     * Generated from protobuf field <code>float auprc = 2;</code>
     * @return float
     */
    public function getAuprc()
    {
        return $this->auprc;
    }

    /**
     * The calculated area under the precision recall curve (AUPRC), computed by
     * integrating over all confidence thresholds.
     *
     * Generated from protobuf field <code>float auprc = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setAuprc($var)
    {
        GPBUtil::checkFloat($var);
        $this->auprc = $var;

        return $this;
    }

    /**
     * The Estimated Calibration Error (ECE) of the confidence of the predicted
     * entities.
     *
     * Generated from protobuf field <code>float estimated_calibration_error = 3;</code>
     * @return float
     */
    public function getEstimatedCalibrationError()
    {
        return $this->estimated_calibration_error;
    }

    /**
     * The Estimated Calibration Error (ECE) of the confidence of the predicted
     * entities.
     *
     * Generated from protobuf field <code>float estimated_calibration_error = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setEstimatedCalibrationError($var)
    {
        GPBUtil::checkFloat($var);
        $this->estimated_calibration_error = $var;

        return $this;
    }

    /**
     * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching
     * only.
     *
     * Generated from protobuf field <code>float auprc_exact = 5;</code>
     * @return float
     */
    public function getAuprcExact()
    {
        return $this->auprc_exact;
    }

    /**
     * The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching
     * only.
     *
     * Generated from protobuf field <code>float auprc_exact = 5;</code>
     * @param float $var
     * @return $this
     */
    public function setAuprcExact($var)
    {
        GPBUtil::checkFloat($var);
        $this->auprc_exact = $var;

        return $this;
    }

    /**
     * The ECE for the predicted entities with fuzzy matching disabled, i.e.,
     * exact matching only.
     *
     * Generated from protobuf field <code>float estimated_calibration_error_exact = 6;</code>
     * @return float
     */
    public function getEstimatedCalibrationErrorExact()
    {
        return $this->estimated_calibration_error_exact;
    }

    /**
     * The ECE for the predicted entities with fuzzy matching disabled, i.e.,
     * exact matching only.
     *
     * Generated from protobuf field <code>float estimated_calibration_error_exact = 6;</code>
     * @param float $var
     * @return $this
     */
    public function setEstimatedCalibrationErrorExact($var)
    {
        GPBUtil::checkFloat($var);
        $this->estimated_calibration_error_exact = $var;

        return $this;
    }

    /**
     * The metrics type for the label.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7;</code>
     * @return int
     */
    public function getMetricsType()
    {
        return $this->metrics_type;
    }

    /**
     * The metrics type for the label.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.Evaluation.MultiConfidenceMetrics.MetricsType metrics_type = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setMetricsType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\DocumentAI\V1\Evaluation\MultiConfidenceMetrics\MetricsType::class);
        $this->metrics_type = $var;

        return $this;
    }

}


