Current section
Files
Jump to
Current section
Files
lib/googly/cloud_vision/model/position.ex
# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudVision.Model.Position do
@moduledoc """
A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.
## Attributes
* `x` (*type:* `number()`) - X coordinate.
* `y` (*type:* `number()`) - Y coordinate.
* `z` (*type:* `number()`) - Z coordinate (or depth).
"""
defstruct [:x, :y, :z]
@type t :: %__MODULE__{
x: number() | nil,
y: number() | nil,
z: number() | 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__{
x: m["x"],
y: m["y"],
z: m["z"]
}
end
end