# 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.PlayableLocations.V3.Model.GoogleMapsPlayablelocationsV3Impression do
  @moduledoc """
  Encapsulates impression event details.

  ## Attributes

  *   `gameObjectType` (*type:* `integer()`, *default:* `nil`) - An arbitrary, developer-defined type identifier for each type of game object used in your game. Since players interact with differ types of game objects in different ways, this field allows you to segregate impression data by type for analysis. You should assign a unique `game_object_type` ID to represent a distinct type of game object in your game. For example, 1=monster location, 2=powerup location.
  *   `impressionType` (*type:* `String.t`, *default:* `nil`) - Required. The type of impression event.
  *   `locationName` (*type:* `String.t`, *default:* `nil`) - Required. The name of the playable location.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :gameObjectType => integer() | nil,
          :impressionType => String.t() | nil,
          :locationName => String.t() | nil
        }

  field(:gameObjectType)
  field(:impressionType)
  field(:locationName)
end

defimpl Poison.Decoder,
  for: GoogleApi.PlayableLocations.V3.Model.GoogleMapsPlayablelocationsV3Impression do
  def decode(value, options) do
    GoogleApi.PlayableLocations.V3.Model.GoogleMapsPlayablelocationsV3Impression.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.PlayableLocations.V3.Model.GoogleMapsPlayablelocationsV3Impression do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
