Class: Google::Apis::IdentitytoolkitV2::GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule

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 managed rule. Models a single interval [start_score, end_score]. The start_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) ⇒ GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule

Returns a new instance of GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule.



1490
1491
1492
# File 'lib/google/apis/identitytoolkit_v2/classes.rb', line 1490

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)


1479
1480
1481
# File 'lib/google/apis/identitytoolkit_v2/classes.rb', line 1479

def action
  @action
end

#end_scoreFloat

The end score (inclusive) of the score range 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.

  1. A score of 0.0 indicates the riskiest request (likely a bot), whereas 1.0 indicates the safest request (likely a human). See https://cloud.google.com/ recaptcha-enterprise/docs/interpret-assessment. Corresponds to the JSON property endScore

Returns:

  • (Float)


1488
1489
1490
# File 'lib/google/apis/identitytoolkit_v2/classes.rb', line 1488

def end_score
  @end_score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1495
1496
1497
1498
# File 'lib/google/apis/identitytoolkit_v2/classes.rb', line 1495

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