# NOTE: This file is auto generated by googly. Do not edit it manually. defmodule Googly.CloudVision.Model.TextAnnotation do @moduledoc """ TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail. ## Attributes * `pages` (*type:* `list(Googly.CloudVision.Model.Page.t())`) - List of pages detected by OCR. * `text` (*type:* `String.t()`) - UTF-8 text detected on the pages. """ defstruct [:pages, :text] @type t :: %__MODULE__{ pages: list(Googly.CloudVision.Model.Page.t()) | nil, text: 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__{ pages: Googly.CloudVision.Model.Page.decode(m["pages"]), text: m["text"] } end end