<?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;

/**
 * Evaluations metrics, at a specific confidence level.
 *
 * Generated from protobuf message <code>google.cloud.documentai.v1.Evaluation.ConfidenceLevelMetrics</code>
 */
class ConfidenceLevelMetrics extends \Google\Protobuf\Internal\Message
{
    /**
     * The confidence level.
     *
     * Generated from protobuf field <code>float confidence_level = 1;</code>
     */
    private $confidence_level = 0.0;
    /**
     * The metrics at the specific confidence level.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.Evaluation.Metrics metrics = 2;</code>
     */
    private $metrics = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $confidence_level
     *           The confidence level.
     *     @type \Google\Cloud\DocumentAI\V1\Evaluation\Metrics $metrics
     *           The metrics at the specific confidence level.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce();
        parent::__construct($data);
    }

    /**
     * The confidence level.
     *
     * Generated from protobuf field <code>float confidence_level = 1;</code>
     * @return float
     */
    public function getConfidenceLevel()
    {
        return $this->confidence_level;
    }

    /**
     * The confidence level.
     *
     * Generated from protobuf field <code>float confidence_level = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setConfidenceLevel($var)
    {
        GPBUtil::checkFloat($var);
        $this->confidence_level = $var;

        return $this;
    }

    /**
     * The metrics at the specific confidence level.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.Evaluation.Metrics metrics = 2;</code>
     * @return \Google\Cloud\DocumentAI\V1\Evaluation\Metrics|null
     */
    public function getMetrics()
    {
        return $this->metrics;
    }

    public function hasMetrics()
    {
        return isset($this->metrics);
    }

    public function clearMetrics()
    {
        unset($this->metrics);
    }

    /**
     * The metrics at the specific confidence level.
     *
     * Generated from protobuf field <code>.google.cloud.documentai.v1.Evaluation.Metrics metrics = 2;</code>
     * @param \Google\Cloud\DocumentAI\V1\Evaluation\Metrics $var
     * @return $this
     */
    public function setMetrics($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\Evaluation\Metrics::class);
        $this->metrics = $var;

        return $this;
    }

}


