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

namespace Google\Cloud\AutoMl\V1beta1;

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

/**
 * Model evaluation metrics for image object detection problems.
 * Evaluates prediction quality of labeled bounding boxes.
 *
 * Generated from protobuf message <code>google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics</code>
 */
class ImageObjectDetectionEvaluationMetrics extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The total number of bounding boxes (i.e. summed over all
     * images) the ground truth used to create this evaluation had.
     *
     * Generated from protobuf field <code>int32 evaluated_bounding_box_count = 1;</code>
     */
    private $evaluated_bounding_box_count = 0;
    /**
     * Output only. The bounding boxes match metrics for each
     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
     * pair.
     *
     * Generated from protobuf field <code>repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2;</code>
     */
    private $bounding_box_metrics_entries;
    /**
     * Output only. The single metric for bounding boxes evaluation:
     * the mean_average_precision averaged over all bounding_box_metrics_entries.
     *
     * Generated from protobuf field <code>float bounding_box_mean_average_precision = 3;</code>
     */
    private $bounding_box_mean_average_precision = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $evaluated_bounding_box_count
     *           Output only. The total number of bounding boxes (i.e. summed over all
     *           images) the ground truth used to create this evaluation had.
     *     @type array<\Google\Cloud\AutoMl\V1beta1\BoundingBoxMetricsEntry>|\Google\Protobuf\Internal\RepeatedField $bounding_box_metrics_entries
     *           Output only. The bounding boxes match metrics for each
     *           Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
     *           and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
     *           pair.
     *     @type float $bounding_box_mean_average_precision
     *           Output only. The single metric for bounding boxes evaluation:
     *           the mean_average_precision averaged over all bounding_box_metrics_entries.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Automl\V1Beta1\Detection::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The total number of bounding boxes (i.e. summed over all
     * images) the ground truth used to create this evaluation had.
     *
     * Generated from protobuf field <code>int32 evaluated_bounding_box_count = 1;</code>
     * @return int
     */
    public function getEvaluatedBoundingBoxCount()
    {
        return $this->evaluated_bounding_box_count;
    }

    /**
     * Output only. The total number of bounding boxes (i.e. summed over all
     * images) the ground truth used to create this evaluation had.
     *
     * Generated from protobuf field <code>int32 evaluated_bounding_box_count = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setEvaluatedBoundingBoxCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->evaluated_bounding_box_count = $var;

        return $this;
    }

    /**
     * Output only. The bounding boxes match metrics for each
     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
     * pair.
     *
     * Generated from protobuf field <code>repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getBoundingBoxMetricsEntries()
    {
        return $this->bounding_box_metrics_entries;
    }

    /**
     * Output only. The bounding boxes match metrics for each
     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
     * pair.
     *
     * Generated from protobuf field <code>repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2;</code>
     * @param array<\Google\Cloud\AutoMl\V1beta1\BoundingBoxMetricsEntry>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setBoundingBoxMetricsEntries($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AutoMl\V1beta1\BoundingBoxMetricsEntry::class);
        $this->bounding_box_metrics_entries = $arr;

        return $this;
    }

    /**
     * Output only. The single metric for bounding boxes evaluation:
     * the mean_average_precision averaged over all bounding_box_metrics_entries.
     *
     * Generated from protobuf field <code>float bounding_box_mean_average_precision = 3;</code>
     * @return float
     */
    public function getBoundingBoxMeanAveragePrecision()
    {
        return $this->bounding_box_mean_average_precision;
    }

    /**
     * Output only. The single metric for bounding boxes evaluation:
     * the mean_average_precision averaged over all bounding_box_metrics_entries.
     *
     * Generated from protobuf field <code>float bounding_box_mean_average_precision = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setBoundingBoxMeanAveragePrecision($var)
    {
        GPBUtil::checkFloat($var);
        $this->bounding_box_mean_average_precision = $var;

        return $this;
    }

}

