# 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::ComputerVision::V2_0
  module Models
    #
    # Json object representing a recognized text region
    #
    class TextRecognitionResult

      include MsRestAzure

      # @return [Integer] The 1-based page number of the recognition result.
      attr_accessor :page

      # @return [Float] The orientation of the image in degrees in the
      # clockwise direction. Range between [0, 360).
      attr_accessor :clockwise_orientation

      # @return [Float] The width of the image in pixels or the PDF in inches.
      attr_accessor :width

      # @return [Float] The height of the image in pixels or the PDF in inches.
      attr_accessor :height

      # @return [TextRecognitionResultDimensionUnit] The unit used in the
      # Width, Height and BoundingBox. For images, the unit is "pixel". For
      # PDF, the unit is "inch". Possible values include: 'pixel', 'inch'
      attr_accessor :unit

      # @return [Array<Line>] A list of recognized text lines.
      attr_accessor :lines


      #
      # Mapper for TextRecognitionResult class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'TextRecognitionResult',
          type: {
            name: 'Composite',
            class_name: 'TextRecognitionResult',
            model_properties: {
              page: {
                client_side_validation: true,
                required: false,
                serialized_name: 'page',
                type: {
                  name: 'Number'
                }
              },
              clockwise_orientation: {
                client_side_validation: true,
                required: false,
                serialized_name: 'clockwiseOrientation',
                type: {
                  name: 'Double'
                }
              },
              width: {
                client_side_validation: true,
                required: false,
                serialized_name: 'width',
                type: {
                  name: 'Double'
                }
              },
              height: {
                client_side_validation: true,
                required: false,
                serialized_name: 'height',
                type: {
                  name: 'Double'
                }
              },
              unit: {
                client_side_validation: true,
                required: false,
                serialized_name: 'unit',
                type: {
                  name: 'Enum',
                  module: 'TextRecognitionResultDimensionUnit'
                }
              },
              lines: {
                client_side_validation: true,
                required: true,
                serialized_name: 'lines',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'LineElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'Line'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
