Current section
Files
Jump to
Current section
Files
lib/googly/cloud_vision/model/image_annotation_context.ex
# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudVision.Model.ImageAnnotationContext do
@moduledoc """
If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.
## Attributes
* `page_number` (*type:* `integer()`) - If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.
* `uri` (*type:* `String.t()`) - The URI of the file used to produce the image.
"""
defstruct [:page_number, :uri]
@type t :: %__MODULE__{
page_number: integer() | nil,
uri: String.t() | nil
}
@wire %{page_number: "pageNumber"}
@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__{
page_number: m["pageNumber"],
uri: m["uri"]
}
end
end