# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This class is auto generated by the elixir code generator program. # Do not edit the class manually. defmodule GoogleApi.Vision.V1.Model.EntityAnnotation do @moduledoc """ Set of detected entity features. ## Attributes * `boundingPoly` (*type:* `GoogleApi.Vision.V1.Model.BoundingPoly.t`, *default:* `nil`) - Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features. * `confidence` (*type:* `number()`, *default:* `nil`) - **Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the "Eiffel Tower" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1]. * `description` (*type:* `String.t`, *default:* `nil`) - Entity textual description, expressed in its `locale` language. * `locale` (*type:* `String.t`, *default:* `nil`) - The language code for the locale in which the entity textual `description` is expressed. * `locations` (*type:* `list(GoogleApi.Vision.V1.Model.LocationInfo.t)`, *default:* `nil`) - The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks. * `mid` (*type:* `String.t`, *default:* `nil`) - Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/). * `properties` (*type:* `list(GoogleApi.Vision.V1.Model.Property.t)`, *default:* `nil`) - Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity. * `score` (*type:* `number()`, *default:* `nil`) - Overall score of the result. Range [0, 1]. * `topicality` (*type:* `number()`, *default:* `nil`) - The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1]. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :boundingPoly => GoogleApi.Vision.V1.Model.BoundingPoly.t(), :confidence => number(), :description => String.t(), :locale => String.t(), :locations => list(GoogleApi.Vision.V1.Model.LocationInfo.t()), :mid => String.t(), :properties => list(GoogleApi.Vision.V1.Model.Property.t()), :score => number(), :topicality => number() } field(:boundingPoly, as: GoogleApi.Vision.V1.Model.BoundingPoly) field(:confidence) field(:description) field(:locale) field(:locations, as: GoogleApi.Vision.V1.Model.LocationInfo, type: :list) field(:mid) field(:properties, as: GoogleApi.Vision.V1.Model.Property, type: :list) field(:score) field(:topicality) end defimpl Poison.Decoder, for: GoogleApi.Vision.V1.Model.EntityAnnotation do def decode(value, options) do GoogleApi.Vision.V1.Model.EntityAnnotation.decode(value, options) end end defimpl Poison.Encoder, for: GoogleApi.Vision.V1.Model.EntityAnnotation do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end end