Class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Event

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) ⇒ GoogleCloudRecaptchaenterpriseV1Event

Returns a new instance of GoogleCloudRecaptchaenterpriseV1Event.



255
256
257
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 255

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

Instance Attribute Details

#expected_actionString

Optional. The expected action for this type of event. This should be the same action provided at token generation time on client-side platforms already integrated with recaptcha enterprise. Corresponds to the JSON property expectedAction

Returns:

  • (String)


222
223
224
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 222

def expected_action
  @expected_action
end

#hashed_account_idString

Optional. Unique stable hashed user identifier for the request. The identifier must be hashed using hmac-sha256 with stable secret. Corresponds to the JSON property hashedAccountId NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


229
230
231
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 229

def 
  @hashed_account_id
end

#site_keyString

Optional. The site key that was used to invoke reCAPTCHA on your site and generate the token. Corresponds to the JSON property siteKey

Returns:

  • (String)


235
236
237
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 235

def site_key
  @site_key
end

#tokenString

Optional. The user response token provided by the reCAPTCHA client-side integration on your site. Corresponds to the JSON property token

Returns:

  • (String)


241
242
243
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 241

def token
  @token
end

#user_agentString

Optional. The user agent present in the request from the user's device related to this event. Corresponds to the JSON property userAgent

Returns:

  • (String)


247
248
249
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 247

def user_agent
  @user_agent
end

#user_ip_addressString

Optional. The IP address in the request from the user's device related to this event. Corresponds to the JSON property userIpAddress

Returns:

  • (String)


253
254
255
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 253

def user_ip_address
  @user_ip_address
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



260
261
262
263
264
265
266
267
# File 'lib/google/apis/recaptchaenterprise_v1/classes.rb', line 260

def update!(**args)
  @expected_action = args[:expected_action] if args.key?(:expected_action)
  @hashed_account_id = args[:hashed_account_id] if args.key?(:hashed_account_id)
  @site_key = args[:site_key] if args.key?(:site_key)
  @token = args[:token] if args.key?(:token)
  @user_agent = args[:user_agent] if args.key?(:user_agent)
  @user_ip_address = args[:user_ip_address] if args.key?(:user_ip_address)
end