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

/**
 * Evaluation metrics, either in aggregate or about a specific entity.
 *
 * Generated from protobuf message <code>google.cloud.documentai.v1.Evaluation.Metrics</code>
 */
class Metrics extends \Google\Protobuf\Internal\Message
{
    /**
     * The calculated precision.
     *
     * Generated from protobuf field <code>float precision = 1;</code>
     */
    private $precision = 0.0;
    /**
     * The calculated recall.
     *
     * Generated from protobuf field <code>float recall = 2;</code>
     */
    private $recall = 0.0;
    /**
     * The calculated f1 score.
     *
     * Generated from protobuf field <code>float f1_score = 3;</code>
     */
    private $f1_score = 0.0;
    /**
     * The amount of occurrences in predicted documents.
     *
     * Generated from protobuf field <code>int32 predicted_occurrences_count = 4;</code>
     */
    private $predicted_occurrences_count = 0;
    /**
     * The amount of occurrences in ground truth documents.
     *
     * Generated from protobuf field <code>int32 ground_truth_occurrences_count = 5;</code>
     */
    private $ground_truth_occurrences_count = 0;
    /**
     * The amount of documents with a predicted occurrence.
     *
     * Generated from protobuf field <code>int32 predicted_document_count = 10;</code>
     */
    private $predicted_document_count = 0;
    /**
     * The amount of documents with a ground truth occurrence.
     *
     * Generated from protobuf field <code>int32 ground_truth_document_count = 11;</code>
     */
    private $ground_truth_document_count = 0;
    /**
     * The amount of true positives.
     *
     * Generated from protobuf field <code>int32 true_positives_count = 6;</code>
     */
    private $true_positives_count = 0;
    /**
     * The amount of false positives.
     *
     * Generated from protobuf field <code>int32 false_positives_count = 7;</code>
     */
    private $false_positives_count = 0;
    /**
     * The amount of false negatives.
     *
     * Generated from protobuf field <code>int32 false_negatives_count = 8;</code>
     */
    private $false_negatives_count = 0;
    /**
     * The amount of documents that had an occurrence of this label.
     *
     * Generated from protobuf field <code>int32 total_documents_count = 9;</code>
     */
    private $total_documents_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $precision
     *           The calculated precision.
     *     @type float $recall
     *           The calculated recall.
     *     @type float $f1_score
     *           The calculated f1 score.
     *     @type int $predicted_occurrences_count
     *           The amount of occurrences in predicted documents.
     *     @type int $ground_truth_occurrences_count
     *           The amount of occurrences in ground truth documents.
     *     @type int $predicted_document_count
     *           The amount of documents with a predicted occurrence.
     *     @type int $ground_truth_document_count
     *           The amount of documents with a ground truth occurrence.
     *     @type int $true_positives_count
     *           The amount of true positives.
     *     @type int $false_positives_count
     *           The amount of false positives.
     *     @type int $false_negatives_count
     *           The amount of false negatives.
     *     @type int $total_documents_count
     *           The amount of documents that had an occurrence of this label.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Documentai\V1\Evaluation::initOnce();
        parent::__construct($data);
    }

    /**
     * The calculated precision.
     *
     * Generated from protobuf field <code>float precision = 1;</code>
     * @return float
     */
    public function getPrecision()
    {
        return $this->precision;
    }

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

        return $this;
    }

    /**
     * The calculated recall.
     *
     * Generated from protobuf field <code>float recall = 2;</code>
     * @return float
     */
    public function getRecall()
    {
        return $this->recall;
    }

    /**
     * The calculated recall.
     *
     * Generated from protobuf field <code>float recall = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setRecall($var)
    {
        GPBUtil::checkFloat($var);
        $this->recall = $var;

        return $this;
    }

    /**
     * The calculated f1 score.
     *
     * Generated from protobuf field <code>float f1_score = 3;</code>
     * @return float
     */
    public function getF1Score()
    {
        return $this->f1_score;
    }

    /**
     * The calculated f1 score.
     *
     * Generated from protobuf field <code>float f1_score = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setF1Score($var)
    {
        GPBUtil::checkFloat($var);
        $this->f1_score = $var;

        return $this;
    }

    /**
     * The amount of occurrences in predicted documents.
     *
     * Generated from protobuf field <code>int32 predicted_occurrences_count = 4;</code>
     * @return int
     */
    public function getPredictedOccurrencesCount()
    {
        return $this->predicted_occurrences_count;
    }

    /**
     * The amount of occurrences in predicted documents.
     *
     * Generated from protobuf field <code>int32 predicted_occurrences_count = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setPredictedOccurrencesCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->predicted_occurrences_count = $var;

        return $this;
    }

    /**
     * The amount of occurrences in ground truth documents.
     *
     * Generated from protobuf field <code>int32 ground_truth_occurrences_count = 5;</code>
     * @return int
     */
    public function getGroundTruthOccurrencesCount()
    {
        return $this->ground_truth_occurrences_count;
    }

    /**
     * The amount of occurrences in ground truth documents.
     *
     * Generated from protobuf field <code>int32 ground_truth_occurrences_count = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setGroundTruthOccurrencesCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->ground_truth_occurrences_count = $var;

        return $this;
    }

    /**
     * The amount of documents with a predicted occurrence.
     *
     * Generated from protobuf field <code>int32 predicted_document_count = 10;</code>
     * @return int
     */
    public function getPredictedDocumentCount()
    {
        return $this->predicted_document_count;
    }

    /**
     * The amount of documents with a predicted occurrence.
     *
     * Generated from protobuf field <code>int32 predicted_document_count = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setPredictedDocumentCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->predicted_document_count = $var;

        return $this;
    }

    /**
     * The amount of documents with a ground truth occurrence.
     *
     * Generated from protobuf field <code>int32 ground_truth_document_count = 11;</code>
     * @return int
     */
    public function getGroundTruthDocumentCount()
    {
        return $this->ground_truth_document_count;
    }

    /**
     * The amount of documents with a ground truth occurrence.
     *
     * Generated from protobuf field <code>int32 ground_truth_document_count = 11;</code>
     * @param int $var
     * @return $this
     */
    public function setGroundTruthDocumentCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->ground_truth_document_count = $var;

        return $this;
    }

    /**
     * The amount of true positives.
     *
     * Generated from protobuf field <code>int32 true_positives_count = 6;</code>
     * @return int
     */
    public function getTruePositivesCount()
    {
        return $this->true_positives_count;
    }

    /**
     * The amount of true positives.
     *
     * Generated from protobuf field <code>int32 true_positives_count = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setTruePositivesCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->true_positives_count = $var;

        return $this;
    }

    /**
     * The amount of false positives.
     *
     * Generated from protobuf field <code>int32 false_positives_count = 7;</code>
     * @return int
     */
    public function getFalsePositivesCount()
    {
        return $this->false_positives_count;
    }

    /**
     * The amount of false positives.
     *
     * Generated from protobuf field <code>int32 false_positives_count = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setFalsePositivesCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->false_positives_count = $var;

        return $this;
    }

    /**
     * The amount of false negatives.
     *
     * Generated from protobuf field <code>int32 false_negatives_count = 8;</code>
     * @return int
     */
    public function getFalseNegativesCount()
    {
        return $this->false_negatives_count;
    }

    /**
     * The amount of false negatives.
     *
     * Generated from protobuf field <code>int32 false_negatives_count = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setFalseNegativesCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->false_negatives_count = $var;

        return $this;
    }

    /**
     * The amount of documents that had an occurrence of this label.
     *
     * Generated from protobuf field <code>int32 total_documents_count = 9;</code>
     * @return int
     */
    public function getTotalDocumentsCount()
    {
        return $this->total_documents_count;
    }

    /**
     * The amount of documents that had an occurrence of this label.
     *
     * Generated from protobuf field <code>int32 total_documents_count = 9;</code>
     * @param int $var
     * @return $this
     */
    public function setTotalDocumentsCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->total_documents_count = $var;

        return $this;
    }

}


