# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::CognitiveServices::ImageSearch::V1_0
  module Models
    #
    # Defines a recognized entity.
    #
    class RecognizedEntity < Response

      include MsRestAzure


      def initialize
        @_type = "RecognizedEntity"
      end

      attr_accessor :_type

      # @return [Thing] The entity that was recognized. The following are the
      # possible entity objects: Person
      attr_accessor :entity

      # @return [Float] The confidence that Bing has that the entity in the
      # image matches this entity. The confidence ranges from 0.0 through 1.0
      # with 1.0 being very confident.
      attr_accessor :match_confidence


      #
      # Mapper for RecognizedEntity class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'RecognizedEntity',
          type: {
            name: 'Composite',
            class_name: 'RecognizedEntity',
            model_properties: {
              _type: {
                client_side_validation: true,
                required: true,
                serialized_name: '_type',
                type: {
                  name: 'String'
                }
              },
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              read_link: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'readLink',
                type: {
                  name: 'String'
                }
              },
              web_search_url: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'webSearchUrl',
                type: {
                  name: 'String'
                }
              },
              entity: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'entity',
                type: {
                  name: 'Composite',
                  class_name: 'Thing'
                }
              },
              match_confidence: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'matchConfidence',
                type: {
                  name: 'Double'
                }
              }
            }
          }
        }
      end
    end
  end
end
