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.



926
927
928
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 926

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

Instance Attribute Details

#actionString

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

Returns:

  • (String)


889
890
891
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 889

def action
  @action
end

#android_package_nameString

The name of the Android package with which the token was generated (Android keys only). Corresponds to the JSON property androidPackageName

Returns:

  • (String)


895
896
897
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 895

def android_package_name
  @android_package_name
end

#create_timeString

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

Returns:

  • (String)


900
901
902
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 900

def create_time
  @create_time
end

#hostnameString

The hostname of the page on which the token was generated (Web keys only). Corresponds to the JSON property hostname

Returns:

  • (String)


905
906
907
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 905

def hostname
  @hostname
end

#invalid_reasonString

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

Returns:

  • (String)


910
911
912
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 910

def invalid_reason
  @invalid_reason
end

#ios_bundle_idString

The ID of the iOS bundle with which the token was generated (iOS keys only). Corresponds to the JSON property iosBundleId

Returns:

  • (String)


915
916
917
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 915

def ios_bundle_id
  @ios_bundle_id
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)


923
924
925
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 923

def valid
  @valid
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



931
932
933
934
935
936
937
938
939
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 931

def update!(**args)
  @action = args[:action] if args.key?(:action)
  @android_package_name = args[:android_package_name] if args.key?(:android_package_name)
  @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)
  @ios_bundle_id = args[:ios_bundle_id] if args.key?(:ios_bundle_id)
  @valid = args[:valid] if args.key?(:valid)
end