Packages

Google Cloud Vision API client library.

Current section

Files

Jump to
googly_cloud_vision lib googly cloud_vision model web_image.ex
Raw

lib/googly/cloud_vision/model/web_image.ex

# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudVision.Model.WebImage do
@moduledoc """
Metadata for online images.
## Attributes
* `score` (*type:* `number()`) - (Deprecated) Overall relevancy score for the image.
* `url` (*type:* `String.t()`) - The result image URL.
"""
defstruct [:score, :url]
@type t :: %__MODULE__{
score: number() | nil,
url: 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__{
score: m["score"],
url: m["url"]
}
end
end