Packages

Google Cloud Vision API client library.

Current section

Files

Jump to
googly_cloud_vision lib googly cloud_vision model lat_lng.ex
Raw

lib/googly/cloud_vision/model/lat_lng.ex

# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudVision.Model.LatLng do
@moduledoc """
An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.
## Attributes
* `latitude` (*type:* `float()`) - The latitude in degrees. It must be in the range [-90.0, +90.0].
* `longitude` (*type:* `float()`) - The longitude in degrees. It must be in the range [-180.0, +180.0].
"""
defstruct [:latitude, :longitude]
@type t :: %__MODULE__{
latitude: float() | nil,
longitude: float() | nil
}
@wire %{}
@doc false
def __wire__, do: @wire
@doc false
def decode(nil), do: nil
def decode(list) when is_list(list), do: Enum.map(list, &decode/1)
def decode(m) do
%__MODULE__{
latitude: m["latitude"],
longitude: m["longitude"]
}
end
end