# 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 an image's caption.
    #
    class ImageInsightsImageCaption

      include MsRestAzure

      # @return [String] A caption about the image.
      attr_accessor :caption

      # @return [String] The URL to the website where the caption was found.
      # You must attribute the caption to the source. For example, by
      # displaying the domain name from the URL next to the caption and using
      # the URL to link to the source website.
      attr_accessor :data_source_url

      # @return [Array<Query>] A list of entities found in the caption. Use the
      # contents of the Query object to find the entity in the caption and
      # create a link. The link takes the user to images of the entity.
      attr_accessor :related_searches


      #
      # Mapper for ImageInsightsImageCaption class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ImageInsights/ImageCaption',
          type: {
            name: 'Composite',
            class_name: 'ImageInsightsImageCaption',
            model_properties: {
              caption: {
                client_side_validation: true,
                required: true,
                serialized_name: 'caption',
                type: {
                  name: 'String'
                }
              },
              data_source_url: {
                client_side_validation: true,
                required: true,
                serialized_name: 'dataSourceUrl',
                type: {
                  name: 'String'
                }
              },
              related_searches: {
                client_side_validation: true,
                required: true,
                serialized_name: 'relatedSearches',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'QueryElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'Query'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
