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

namespace Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment;

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

/**
 * Information about behavioral trust of the transaction.
 *
 * Generated from protobuf message <code>google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment.BehavioralTrustVerdict</code>
 */
class BehavioralTrustVerdict extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Probability of this transaction attempt being executed in a
     * behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0
     * (highest).
     *
     * Generated from protobuf field <code>float trust = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $trust = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $trust
     *           Output only. Probability of this transaction attempt being executed in a
     *           behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0
     *           (highest).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Probability of this transaction attempt being executed in a
     * behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0
     * (highest).
     *
     * Generated from protobuf field <code>float trust = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return float
     */
    public function getTrust()
    {
        return $this->trust;
    }

    /**
     * Output only. Probability of this transaction attempt being executed in a
     * behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0
     * (highest).
     *
     * Generated from protobuf field <code>float trust = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param float $var
     * @return $this
     */
    public function setTrust($var)
    {
        GPBUtil::checkFloat($var);
        $this->trust = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BehavioralTrustVerdict::class, \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment_BehavioralTrustVerdict::class);

