# 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::FormRecognizer::V1_0_preview
  module Models
    #
    # A set of extracted fields corresponding to a semantic object, such as a
    # receipt, in the input document.
    #
    class UnderstandingResult

      include MsRestAzure

      # @return [Array<Integer>] List of pages where the document is found.
      attr_accessor :pages

      # @return [Hash{String => FieldValue}] Dictionary of recognized field
      # values.
      attr_accessor :fields


      #
      # Mapper for UnderstandingResult class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'understandingResult',
          type: {
            name: 'Composite',
            class_name: 'UnderstandingResult',
            model_properties: {
              pages: {
                client_side_validation: true,
                required: false,
                serialized_name: 'pages',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'NumberElementType',
                      type: {
                        name: 'Number'
                      }
                  }
                }
              },
              fields: {
                client_side_validation: true,
                required: false,
                serialized_name: 'fields',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'FieldValueElementType',
                      type: {
                        name: 'Composite',
                        polymorphic_discriminator: 'valueType',
                        uber_parent: 'FieldValue',
                        class_name: 'FieldValue'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
