Packages

Google Cloud Vision API client library.

Current section

Files

Jump to
googly_cloud_vision lib googly cloud_vision model landmark.ex
Raw

lib/googly/cloud_vision/model/landmark.ex

# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudVision.Model.Landmark do
@moduledoc """
A face-specific landmark (for example, a face feature). Landmark positions may fall outside the bounds of the image if the face is near one or more edges of the image. Therefore it is NOT guaranteed that `0 <= x < width` or `0 <= y < height`.
## Attributes
* `position` (*type:* `Googly.CloudVision.Model.Position.t()`) - Face landmark position.
* `type` (*type:* `String.t()`) - Face landmark type.
"""
defstruct [:position, :type]
@type t :: %__MODULE__{
position: Googly.CloudVision.Model.Position.t() | nil,
type: String.t() | 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__{
position: Googly.CloudVision.Model.Position.decode(m["position"]),
type: m["type"]
}
end
end