# 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.GoogleMapsPlayablelocationsV3SampleFilter do
  @moduledoc """
  Specifies the filters to use when searching for playable locations.

  ## Attributes

  *   `includedTypes` (*type:* `list(String.t)`, *default:* `nil`) - Restricts the set of playable locations to just the [types](/maps/documentation/gaming/tt/types) that you want.
  *   `maxLocationCount` (*type:* `integer()`, *default:* `nil`) - Specifies the maximum number of playable locations to return. This value must not be greater than 1000. The default value is 100. Only the top-ranking playable locations are returned.
  *   `spacing` (*type:* `GoogleApi.PlayableLocations.V3.Model.GoogleMapsPlayablelocationsV3SampleSpacingOptions.t`, *default:* `nil`) - A set of options that control the spacing between playable locations. By default the minimum distance between locations is 200m.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :includedTypes => list(String.t()) | nil,
          :maxLocationCount => integer() | nil,
          :spacing =>
            GoogleApi.PlayableLocations.V3.Model.GoogleMapsPlayablelocationsV3SampleSpacingOptions.t()
            | nil
        }

  field(:includedTypes, type: :list)
  field(:maxLocationCount)

  field(:spacing,
    as: GoogleApi.PlayableLocations.V3.Model.GoogleMapsPlayablelocationsV3SampleSpacingOptions
  )
end

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

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