Packages

Google Cloud Vision API client library.

Current section

Files

Jump to
googly_cloud_vision lib googly cloud_vision model web_label.ex
Raw

lib/googly/cloud_vision/model/web_label.ex

# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudVision.Model.WebLabel do
@moduledoc """
Label to provide extra metadata for the web detection.
## Attributes
* `label` (*type:* `String.t()`) - Label for extra metadata.
* `language_code` (*type:* `String.t()`) - The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
"""
defstruct [:label, :language_code]
@type t :: %__MODULE__{
label: String.t() | nil,
language_code: String.t() | 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__{
label: m["label"],
language_code: m["languageCode"]
}
end
end