lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_event.ex

# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1Event do
  @moduledoc """


  ## Attributes

  *   `expectedAction` (*type:* `String.t`, *default:* `nil`) - 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.
  *   `hashedAccountId` (*type:* `String.t`, *default:* `nil`) - Optional. Optional unique stable hashed user identifier for the request. The identifier should ideally be hashed using sha256 with stable secret.
  *   `siteKey` (*type:* `String.t`, *default:* `nil`) - Optional. The site key that was used to invoke reCAPTCHA on your site and generate the token.
  *   `token` (*type:* `String.t`, *default:* `nil`) - Optional. The user response token provided by the reCAPTCHA client-side integration on your site.
  *   `userAgent` (*type:* `String.t`, *default:* `nil`) - Optional. The user agent present in the request from the user's device related to this event.
  *   `userIpAddress` (*type:* `String.t`, *default:* `nil`) - Optional. The IP address in the request from the user's device related to this event.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :expectedAction => String.t() | nil,
          :hashedAccountId => String.t() | nil,
          :siteKey => String.t() | nil,
          :token => String.t() | nil,
          :userAgent => String.t() | nil,
          :userIpAddress => String.t() | nil
        }

  field(:expectedAction)
  field(:hashedAccountId)
  field(:siteKey)
  field(:token)
  field(:userAgent)
  field(:userIpAddress)
end

defimpl Poison.Decoder,
  for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1Event do
  def decode(value, options) do
    GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1Event.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1Event do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end