Packages

Google Cloud Vision API client library.

Current section

Files

Jump to
googly_cloud_vision lib googly cloud_vision model vertex.ex
Raw

lib/googly/cloud_vision/model/vertex.ex

# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudVision.Model.Vertex do
@moduledoc """
A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
## Attributes
* `x` (*type:* `integer()`) - X coordinate.
* `y` (*type:* `integer()`) - Y coordinate.
"""
defstruct [:x, :y]
@type t :: %__MODULE__{
x: integer() | nil,
y: integer() | 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"]
}
end
end