Packages

Google Cloud Vision API client library.

Current section

Files

Jump to
googly_cloud_vision lib googly cloud_vision model feature.ex
Raw

lib/googly/cloud_vision/model/feature.ex

# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudVision.Model.Feature do
@moduledoc """
The type of Google Cloud Vision API detection to perform, and the maximum number of results to return for that type. Multiple `Feature` objects can be specified in the `features` list.
## Attributes
* `max_results` (*type:* `integer()`) - Maximum number of results of this type. Does not apply to `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
* `model` (*type:* `String.t()`) - Model to use for the feature. Supported values: "builtin/stable" (the default if unset) and "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also support "builtin/rc" for the latest release candidate.
* `type` (*type:* `String.t()`) - The feature type.
"""
defstruct [:max_results, :model, :type]
@type t :: %__MODULE__{
max_results: integer() | nil,
model: String.t() | nil,
type: String.t() | nil
}
@wire %{max_results: "maxResults"}
@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__{
max_results: m["maxResults"],
model: m["model"],
type: m["type"]
}
end
end