Class: Google::Apis::IdentitytoolkitV2::GoogleCloudIdentitytoolkitAdminV2RecaptchaTollFraudManagedRule

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/identitytoolkit_v2/classes.rb,
lib/google/apis/identitytoolkit_v2/representations.rb,
lib/google/apis/identitytoolkit_v2/representations.rb

Overview

The config for a reCAPTCHA toll fraud assessment managed rule. Models a single interval [start_score, end_score]. The end_score is implicit. It is either the closest smaller end_score (if one is available) or 0. Intervals in aggregate span [0, 1] without overlapping.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudIdentitytoolkitAdminV2RecaptchaTollFraudManagedRule

Returns a new instance of GoogleCloudIdentitytoolkitAdminV2RecaptchaTollFraudManagedRule.



1556
1557
1558
# File 'lib/google/apis/identitytoolkit_v2/classes.rb', line 1556

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#actionString

The action taken if the reCAPTCHA score of a request is within the interval [ start_score, end_score]. Corresponds to the JSON property action

Returns:

  • (String)


1545
1546
1547
# File 'lib/google/apis/identitytoolkit_v2/classes.rb', line 1545

def action
  @action
end

#start_scoreFloat

The start score (inclusive) for an action. Must be a value between 0.0 and 1.0, at 11 discrete values; e.g. 0, 0.1, 0.2, 0.3, ... 0.9, 1.0. A score of 0.0 indicates the safest request (likely legitimate), whereas 1.0 indicates the riskiest request (likely toll fraud). See https://cloud.google.com/recaptcha- enterprise/docs/sms-fraud-detection#create-assessment-sms. Corresponds to the JSON property startScore

Returns:

  • (Float)


1554
1555
1556
# File 'lib/google/apis/identitytoolkit_v2/classes.rb', line 1554

def start_score
  @start_score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1561
1562
1563
1564
# File 'lib/google/apis/identitytoolkit_v2/classes.rb', line 1561

def update!(**args)
  @action = args[:action] if args.key?(:action)
  @start_score = args[:start_score] if args.key?(:start_score)
end