# NOTE: This file is auto generated by googly. Do not edit it manually. defmodule Googly.CloudVision.Model.DetectedLanguage do @moduledoc """ Detected language for a structural component. ## Attributes * `confidence` (*type:* `number()`) - Confidence of detected language. Range [0, 1]. * `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. """ defstruct [:confidence, :language_code] @type t :: %__MODULE__{ confidence: number() | 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__{ confidence: m["confidence"], language_code: m["languageCode"] } end end