Class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1TokenProperties

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRecaptchaenterpriseV1TokenProperties

Returns a new instance of GoogleCloudRecaptchaenterpriseV1TokenProperties.



524
525
526
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 524

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

Instance Attribute Details

#actionString

Action name provided at token generation. Corresponds to the JSON property action

Returns:

  • (String)


498
499
500
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 498

def action
  @action
end

#create_timeString

The timestamp corresponding to the generation of the token. Corresponds to the JSON property createTime

Returns:

  • (String)


503
504
505
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 503

def create_time
  @create_time
end

#hostnameString

The hostname of the page on which the token was generated. Corresponds to the JSON property hostname

Returns:

  • (String)


508
509
510
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 508

def hostname
  @hostname
end

#invalid_reasonString

Reason associated with the response when valid = false. Corresponds to the JSON property invalidReason

Returns:

  • (String)


513
514
515
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 513

def invalid_reason
  @invalid_reason
end

#validBoolean Also known as: valid?

Whether the provided user response token is valid. When valid = false, the reason could be specified in invalid_reason or it could also be due to a user failing to solve a challenge or a sitekey mismatch (i.e the sitekey used to generate the token was different than the one specified in the assessment). Corresponds to the JSON property valid

Returns:

  • (Boolean)


521
522
523
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 521

def valid
  @valid
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



529
530
531
532
533
534
535
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 529

def update!(**args)
  @action = args[:action] if args.key?(:action)
  @create_time = args[:create_time] if args.key?(:create_time)
  @hostname = args[:hostname] if args.key?(:hostname)
  @invalid_reason = args[:invalid_reason] if args.key?(:invalid_reason)
  @valid = args[:valid] if args.key?(:valid)
end