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.



1587
1588
1589
# File 'lib/google/apis/identitytoolkit_v2/classes.rb', line 1587

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)


1576
1577
1578
# File 'lib/google/apis/identitytoolkit_v2/classes.rb', line 1576

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)


1585
1586
1587
# File 'lib/google/apis/identitytoolkit_v2/classes.rb', line 1585

def start_score
  @start_score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1592
1593
1594
1595
# File 'lib/google/apis/identitytoolkit_v2/classes.rb', line 1592

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