<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto
namespace Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;
/**
* Per-action challenge settings.
*
* Generated from protobuf message <code>google.cloud.recaptchaenterprise.v1.WebKeySettings.ActionSettings</code>
*/
class ActionSettings extends \Google\Protobuf\Internal\Message
{
/**
* Required. A challenge is triggered if the end-user score is below that
* threshold. Value must be between 0 and 1 (inclusive).
*
* Generated from protobuf field <code>float score_threshold = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*/
protected $score_threshold = 0.0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type float $score_threshold
* Required. A challenge is triggered if the end-user score is below that
* threshold. Value must be between 0 and 1 (inclusive).
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce();
parent::__construct($data);
}
/**
* Required. A challenge is triggered if the end-user score is below that
* threshold. Value must be between 0 and 1 (inclusive).
*
* Generated from protobuf field <code>float score_threshold = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return float
*/
public function getScoreThreshold()
{
return $this->score_threshold;
}
/**
* Required. A challenge is triggered if the end-user score is below that
* threshold. Value must be between 0 and 1 (inclusive).
*
* Generated from protobuf field <code>float score_threshold = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @param float $var
* @return $this
*/
public function setScoreThreshold($var)
{
GPBUtil::checkFloat($var);
$this->score_threshold = $var;
return $this;
}
}