# 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.GoogleMapsPlayablelocationsV3PlayerReport do
  @moduledoc """
  A report submitted by a player about a playable location that is considered inappropriate for use in the game.

  ## Attributes

  *   `languageCode` (*type:* `String.t`, *default:* `nil`) - Language code (in BCP-47 format) indicating the language of the freeform description provided in `reason_details`. Examples are "en", "en-US" or "ja-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
  *   `locationName` (*type:* `String.t`, *default:* `nil`) - Required. The name of the playable location.
  *   `reasonDetails` (*type:* `String.t`, *default:* `nil`) - Required. A free-form description detailing why the playable location is considered bad.
  *   `reasons` (*type:* `list(String.t)`, *default:* `nil`) - Required. One or more reasons why this playable location is considered bad.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :languageCode => String.t() | nil,
          :locationName => String.t() | nil,
          :reasonDetails => String.t() | nil,
          :reasons => list(String.t()) | nil
        }

  field(:languageCode)
  field(:locationName)
  field(:reasonDetails)
  field(:reasons, type: :list)
end

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

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