Current section
Files
Jump to
Current section
Files
lib/googly/cloud_vision/model/safe_search_annotation.ex
# NOTE: This file is auto generated by googly. Do not edit it manually.
defmodule Googly.CloudVision.Model.SafeSearchAnnotation do
@moduledoc """
Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).
## Attributes
* `adult` (*type:* `String.t()`) - Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.
* `medical` (*type:* `String.t()`) - Likelihood that this is a medical image.
* `racy` (*type:* `String.t()`) - Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.
* `spoof` (*type:* `String.t()`) - Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.
* `violence` (*type:* `String.t()`) - Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.
"""
defstruct [:adult, :medical, :racy, :spoof, :violence]
@type t :: %__MODULE__{
adult: String.t() | nil,
medical: String.t() | nil,
racy: String.t() | nil,
spoof: String.t() | nil,
violence: String.t() | 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__{
adult: m["adult"],
medical: m["medical"],
racy: m["racy"],
spoof: m["spoof"],
violence: m["violence"]
}
end
end