# NOTE: This file is auto generated by googly. Do not edit it manually. defmodule Googly.CloudVision.Model.WebDetection do @moduledoc """ Relevant information for the image from the Internet. ## Attributes * `best_guess_labels` (*type:* `list(Googly.CloudVision.Model.WebLabel.t())`) - The service's best guess as to the topic of the request image. Inferred from similar images on the open web. * `full_matching_images` (*type:* `list(Googly.CloudVision.Model.WebImage.t())`) - Fully matching images from the Internet. Can include resized copies of the query image. * `pages_with_matching_images` (*type:* `list(Googly.CloudVision.Model.WebPage.t())`) - Web pages containing the matching images from the Internet. * `partial_matching_images` (*type:* `list(Googly.CloudVision.Model.WebImage.t())`) - Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops. * `visually_similar_images` (*type:* `list(Googly.CloudVision.Model.WebImage.t())`) - The visually similar image results. * `web_entities` (*type:* `list(Googly.CloudVision.Model.WebEntity.t())`) - Deduced entities from similar images on the Internet. """ defstruct [ :best_guess_labels, :full_matching_images, :pages_with_matching_images, :partial_matching_images, :visually_similar_images, :web_entities ] @type t :: %__MODULE__{ best_guess_labels: list(Googly.CloudVision.Model.WebLabel.t()) | nil, full_matching_images: list(Googly.CloudVision.Model.WebImage.t()) | nil, pages_with_matching_images: list(Googly.CloudVision.Model.WebPage.t()) | nil, partial_matching_images: list(Googly.CloudVision.Model.WebImage.t()) | nil, visually_similar_images: list(Googly.CloudVision.Model.WebImage.t()) | nil, web_entities: list(Googly.CloudVision.Model.WebEntity.t()) | nil } @wire %{ best_guess_labels: "bestGuessLabels", full_matching_images: "fullMatchingImages", pages_with_matching_images: "pagesWithMatchingImages", partial_matching_images: "partialMatchingImages", visually_similar_images: "visuallySimilarImages", web_entities: "webEntities" } @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__{ best_guess_labels: Googly.CloudVision.Model.WebLabel.decode(m["bestGuessLabels"]), full_matching_images: Googly.CloudVision.Model.WebImage.decode(m["fullMatchingImages"]), pages_with_matching_images: Googly.CloudVision.Model.WebPage.decode(m["pagesWithMatchingImages"]), partial_matching_images: Googly.CloudVision.Model.WebImage.decode(m["partialMatchingImages"]), visually_similar_images: Googly.CloudVision.Model.WebImage.decode(m["visuallySimilarImages"]), web_entities: Googly.CloudVision.Model.WebEntity.decode(m["webEntities"]) } end end