lib/google_api/recaptcha_enterprise/v1/model/google_cloud_recaptchaenterprise_v1_key.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.GoogleCloudRecaptchaenterpriseV1Key do
  @moduledoc """
  A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.

  ## Attributes

  *   `androidSettings` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AndroidKeySettings.t`, *default:* `nil`) - Settings for keys that can be used by Android apps.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - The timestamp corresponding to the creation of this Key.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Human-readable display name of this key. Modifiable by user.
  *   `iosSettings` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1IOSKeySettings.t`, *default:* `nil`) - Settings for keys that can be used by iOS apps.
  *   `labels` (*type:* `map()`, *default:* `nil`) - See Creating and managing labels.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The resource name for the Key in the format "projects/{project}/keys/{key}".
  *   `testingOptions` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TestingOptions.t`, *default:* `nil`) - Options for user acceptance testing.
  *   `wafSettings` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1WafSettings.t`, *default:* `nil`) - Settings for WAF
  *   `webSettings` (*type:* `GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1WebKeySettings.t`, *default:* `nil`) - Settings for keys that can be used by websites.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :androidSettings =>
            GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AndroidKeySettings.t()
            | nil,
          :createTime => DateTime.t() | nil,
          :displayName => String.t() | nil,
          :iosSettings =>
            GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1IOSKeySettings.t()
            | nil,
          :labels => map() | nil,
          :name => String.t() | nil,
          :testingOptions =>
            GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TestingOptions.t()
            | nil,
          :wafSettings =>
            GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1WafSettings.t()
            | nil,
          :webSettings =>
            GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1WebKeySettings.t()
            | nil
        }

  field(:androidSettings,
    as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1AndroidKeySettings
  )

  field(:createTime, as: DateTime)
  field(:displayName)

  field(:iosSettings,
    as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1IOSKeySettings
  )

  field(:labels, type: :map)
  field(:name)

  field(:testingOptions,
    as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1TestingOptions
  )

  field(:wafSettings,
    as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1WafSettings
  )

  field(:webSettings,
    as: GoogleApi.RecaptchaEnterprise.V1.Model.GoogleCloudRecaptchaenterpriseV1WebKeySettings
  )
end

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

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