# 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.Places.V1.Model.GoogleMapsPlacesV1AddressDescriptorLandmark do
  @moduledoc """
  Basic landmark information and the landmark's relationship with the target location. Landmarks are prominent places that can be used to describe a location.

  ## Attributes

  *   `displayName` (*type:* `GoogleApi.Places.V1.Model.GoogleTypeLocalizedText.t`, *default:* `nil`) - The landmark's display name.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The landmark's resource name.
  *   `placeId` (*type:* `String.t`, *default:* `nil`) - The landmark's place id.
  *   `spatialRelationship` (*type:* `String.t`, *default:* `nil`) - Defines the spatial relationship between the target location and the landmark.
  *   `straightLineDistanceMeters` (*type:* `number()`, *default:* `nil`) - The straight line distance, in meters, between the center point of the target and the center point of the landmark. In some situations, this value can be longer than `travel_distance_meters`.
  *   `travelDistanceMeters` (*type:* `number()`, *default:* `nil`) - The travel distance, in meters, along the road network from the target to the landmark, if known. This value does not take into account the mode of transportation, such as walking, driving, or biking.
  *   `types` (*type:* `list(String.t)`, *default:* `nil`) - A set of type tags for this landmark. For a complete list of possible values, see https://developers.google.com/maps/documentation/places/web-service/place-types.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :displayName => GoogleApi.Places.V1.Model.GoogleTypeLocalizedText.t() | nil,
          :name => String.t() | nil,
          :placeId => String.t() | nil,
          :spatialRelationship => String.t() | nil,
          :straightLineDistanceMeters => number() | nil,
          :travelDistanceMeters => number() | nil,
          :types => list(String.t()) | nil
        }

  field(:displayName, as: GoogleApi.Places.V1.Model.GoogleTypeLocalizedText)
  field(:name)
  field(:placeId)
  field(:spatialRelationship)
  field(:straightLineDistanceMeters)
  field(:travelDistanceMeters)
  field(:types, type: :list)
end

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

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