# 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::WebSearch::V1_0
  module Models
    #
    # Defines a search result item to display
    #
    class RankingRankingItem

      include MsRestAzure

      # @return [AnswerType] The answer that contains the item to display. Use
      # the type to find the answer in the SearchResponse object. The type is
      # the name of a SearchResponse field. Possible values include:
      # 'WebPages', 'Images', 'SpellSuggestions', 'News', 'RelatedSearches',
      # 'Videos', 'Computation', 'TimeZone'. Default value: 'WebPages' .
      attr_accessor :answer_type

      # @return [Integer] A zero-based index of the item in the answer.If the
      # item does not include this field, display all items in the answer. For
      # example, display all news articles in the News answer.
      attr_accessor :result_index

      # @return [Identifiable] The ID that identifies either an answer to
      # display or an item of an answer to display. If the ID identifies an
      # answer, display all items of the answer.
      attr_accessor :value

      # @return [Integer]
      attr_accessor :html_index

      # @return [Integer]
      attr_accessor :textual_index

      # @return [Integer]
      attr_accessor :screenshot_index


      #
      # Mapper for RankingRankingItem class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Ranking/RankingItem',
          type: {
            name: 'Composite',
            class_name: 'RankingRankingItem',
            model_properties: {
              answer_type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'answerType',
                default_value: 'WebPages',
                type: {
                  name: 'String'
                }
              },
              result_index: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'resultIndex',
                type: {
                  name: 'Number'
                }
              },
              value: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'value',
                type: {
                  name: 'Composite',
                  class_name: 'Identifiable'
                }
              },
              html_index: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'htmlIndex',
                type: {
                  name: 'Number'
                }
              },
              textual_index: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'textualIndex',
                type: {
                  name: 'Number'
                }
              },
              screenshot_index: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'screenshotIndex',
                type: {
                  name: 'Number'
                }
              }
            }
          }
        }
      end
    end
  end
end
