# NOTE: This file is auto generated by googly. Do not edit it manually. defmodule Googly.CloudVision.Model.Result do @moduledoc """ Information about a product. ## Attributes * `image` (*type:* `String.t()`) - The resource name of the image from the product that is the closest match to the query. * `product` (*type:* `Googly.CloudVision.Model.Product.t()`) - The Product. * `score` (*type:* `number()`) - A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence). """ defstruct [:image, :product, :score] @type t :: %__MODULE__{ image: String.t() | nil, product: Googly.CloudVision.Model.Product.t() | nil, score: number() | 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__{ image: m["image"], product: Googly.CloudVision.Model.Product.decode(m["product"]), score: m["score"] } end end