# NOTE: This file is auto generated by googly. Do not edit it manually. defmodule Googly.CloudVision.Model.Page do @moduledoc """ Detected page from OCR. ## Attributes * `blocks` (*type:* `list(Googly.CloudVision.Model.Block.t())`) - List of blocks of text, images etc on this page. * `confidence` (*type:* `number()`) - Confidence of the OCR results on the page. Range [0, 1]. * `height` (*type:* `integer()`) - Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels. * `property` (*type:* `Googly.CloudVision.Model.TextProperty.t()`) - Additional information detected on the page. * `width` (*type:* `integer()`) - Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels. """ defstruct [:blocks, :confidence, :height, :property, :width] @type t :: %__MODULE__{ blocks: list(Googly.CloudVision.Model.Block.t()) | nil, confidence: number() | nil, height: integer() | nil, property: Googly.CloudVision.Model.TextProperty.t() | nil, width: integer() | 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__{ blocks: Googly.CloudVision.Model.Block.decode(m["blocks"]), confidence: m["confidence"], height: m["height"], property: Googly.CloudVision.Model.TextProperty.decode(m["property"]), width: m["width"] } end end