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

namespace Google\Cloud\DataLabeling\V1beta1;

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

/**
 * Metrics calculated for a classification model.
 *
 * Generated from protobuf message <code>google.cloud.datalabeling.v1beta1.ClassificationMetrics</code>
 */
class ClassificationMetrics extends \Google\Protobuf\Internal\Message
{
    /**
     * Precision-recall curve based on ground truth labels, predicted labels, and
     * scores for the predicted labels.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.PrCurve pr_curve = 1;</code>
     */
    private $pr_curve = null;
    /**
     * Confusion matrix of predicted labels vs. ground truth labels.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ConfusionMatrix confusion_matrix = 2;</code>
     */
    private $confusion_matrix = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DataLabeling\V1beta1\PrCurve $pr_curve
     *           Precision-recall curve based on ground truth labels, predicted labels, and
     *           scores for the predicted labels.
     *     @type \Google\Cloud\DataLabeling\V1beta1\ConfusionMatrix $confusion_matrix
     *           Confusion matrix of predicted labels vs. ground truth labels.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datalabeling\V1Beta1\Evaluation::initOnce();
        parent::__construct($data);
    }

    /**
     * Precision-recall curve based on ground truth labels, predicted labels, and
     * scores for the predicted labels.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.PrCurve pr_curve = 1;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\PrCurve|null
     */
    public function getPrCurve()
    {
        return $this->pr_curve;
    }

    public function hasPrCurve()
    {
        return isset($this->pr_curve);
    }

    public function clearPrCurve()
    {
        unset($this->pr_curve);
    }

    /**
     * Precision-recall curve based on ground truth labels, predicted labels, and
     * scores for the predicted labels.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.PrCurve pr_curve = 1;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\PrCurve $var
     * @return $this
     */
    public function setPrCurve($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\PrCurve::class);
        $this->pr_curve = $var;

        return $this;
    }

    /**
     * Confusion matrix of predicted labels vs. ground truth labels.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ConfusionMatrix confusion_matrix = 2;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\ConfusionMatrix|null
     */
    public function getConfusionMatrix()
    {
        return $this->confusion_matrix;
    }

    public function hasConfusionMatrix()
    {
        return isset($this->confusion_matrix);
    }

    public function clearConfusionMatrix()
    {
        unset($this->confusion_matrix);
    }

    /**
     * Confusion matrix of predicted labels vs. ground truth labels.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ConfusionMatrix confusion_matrix = 2;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\ConfusionMatrix $var
     * @return $this
     */
    public function setConfusionMatrix($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\ConfusionMatrix::class);
        $this->confusion_matrix = $var;

        return $this;
    }

}

