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

namespace Google\Cloud\DataLabeling\V1beta1;

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

/**
 * Provides details for how an evaluation job sends email alerts based on the
 * results of a run.
 *
 * Generated from protobuf message <code>google.cloud.datalabeling.v1beta1.EvaluationJobAlertConfig</code>
 */
class EvaluationJobAlertConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. An email address to send alerts to.
     *
     * Generated from protobuf field <code>string email = 1;</code>
     */
    private $email = '';
    /**
     * Required. A number between 0 and 1 that describes a minimum mean average
     * precision threshold. When the evaluation job runs, if it calculates that
     * your model version's predictions from the recent interval have
     * [meanAveragePrecision][google.cloud.datalabeling.v1beta1.PrCurve.mean_average_precision] below this
     * threshold, then it sends an alert to your specified email.
     *
     * Generated from protobuf field <code>double min_acceptable_mean_average_precision = 2;</code>
     */
    private $min_acceptable_mean_average_precision = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $email
     *           Required. An email address to send alerts to.
     *     @type float $min_acceptable_mean_average_precision
     *           Required. A number between 0 and 1 that describes a minimum mean average
     *           precision threshold. When the evaluation job runs, if it calculates that
     *           your model version's predictions from the recent interval have
     *           [meanAveragePrecision][google.cloud.datalabeling.v1beta1.PrCurve.mean_average_precision] below this
     *           threshold, then it sends an alert to your specified email.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datalabeling\V1Beta1\EvaluationJob::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. An email address to send alerts to.
     *
     * Generated from protobuf field <code>string email = 1;</code>
     * @return string
     */
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * Required. An email address to send alerts to.
     *
     * Generated from protobuf field <code>string email = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setEmail($var)
    {
        GPBUtil::checkString($var, True);
        $this->email = $var;

        return $this;
    }

    /**
     * Required. A number between 0 and 1 that describes a minimum mean average
     * precision threshold. When the evaluation job runs, if it calculates that
     * your model version's predictions from the recent interval have
     * [meanAveragePrecision][google.cloud.datalabeling.v1beta1.PrCurve.mean_average_precision] below this
     * threshold, then it sends an alert to your specified email.
     *
     * Generated from protobuf field <code>double min_acceptable_mean_average_precision = 2;</code>
     * @return float
     */
    public function getMinAcceptableMeanAveragePrecision()
    {
        return $this->min_acceptable_mean_average_precision;
    }

    /**
     * Required. A number between 0 and 1 that describes a minimum mean average
     * precision threshold. When the evaluation job runs, if it calculates that
     * your model version's predictions from the recent interval have
     * [meanAveragePrecision][google.cloud.datalabeling.v1beta1.PrCurve.mean_average_precision] below this
     * threshold, then it sends an alert to your specified email.
     *
     * Generated from protobuf field <code>double min_acceptable_mean_average_precision = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setMinAcceptableMeanAveragePrecision($var)
    {
        GPBUtil::checkDouble($var);
        $this->min_acceptable_mean_average_precision = $var;

        return $this;
    }

}

