Current section
Files
Jump to
Current section
Files
lib/googly/cloud_vision/model/object_annotation.ex
# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudVision.Model.ObjectAnnotation do
@moduledoc """
Prediction for what the object in the bounding box is.
## Attributes
* `language_code` (*type:* `String.t()`) - The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
* `mid` (*type:* `String.t()`) - Object ID that should align with EntityAnnotation mid.
* `name` (*type:* `String.t()`) - Object name, expressed in its `language_code` language.
* `score` (*type:* `number()`) - Score of the result. Range [0, 1].
"""
defstruct [:language_code, :mid, :name, :score]
@type t :: %__MODULE__{
language_code: String.t() | nil,
mid: String.t() | nil,
name: String.t() | nil,
score: number() | nil
}
@wire %{language_code: "languageCode"}
@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__{
language_code: m["languageCode"],
mid: m["mid"],
name: m["name"],
score: m["score"]
}
end
end