Class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1RiskAnalysis

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

Overview

Risk analysis result for an event.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRecaptchaenterpriseV1RiskAnalysis

Returns a new instance of GoogleCloudRecaptchaenterpriseV1RiskAnalysis.



609
610
611
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 609

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

Instance Attribute Details

#reasonsArray<String>

Reasons contributing to the risk analysis verdict. Corresponds to the JSON property reasons

Returns:

  • (Array<String>)


601
602
603
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 601

def reasons
  @reasons
end

#scoreFloat

Legitimate event score from 0.0 to 1.0. (1.0 means very likely legitimate traffic while 0.0 means very likely non-legitimate traffic). Corresponds to the JSON property score

Returns:

  • (Float)


607
608
609
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 607

def score
  @score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



614
615
616
617
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 614

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