# 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 region of an image. The region is defined by the coordinates of
    # the top, left corner and bottom, right corner of the region. The
    # coordinates are fractional values of the original image's width and
    # height in the range 0.0 through 1.0.
    #
    class NormalizedRectangle < StructuredValue

      include MsRestAzure


      def initialize
        @_type = "NormalizedRectangle"
      end

      attr_accessor :_type

      # @return [Float] The left coordinate.
      attr_accessor :left

      # @return [Float] The top coordinate
      attr_accessor :top

      # @return [Float] The right coordinate
      attr_accessor :right

      # @return [Float] The bottom coordinate
      attr_accessor :bottom


      #
      # Mapper for NormalizedRectangle class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'NormalizedRectangle',
          type: {
            name: 'Composite',
            class_name: 'NormalizedRectangle',
            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'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              url: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'url',
                type: {
                  name: 'String'
                }
              },
              image: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'image',
                type: {
                  name: 'Composite',
                  class_name: 'ImageObject'
                }
              },
              description: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'description',
                type: {
                  name: 'String'
                }
              },
              alternate_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'alternateName',
                type: {
                  name: 'String'
                }
              },
              bing_id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'bingId',
                type: {
                  name: 'String'
                }
              },
              left: {
                client_side_validation: true,
                required: true,
                serialized_name: 'left',
                type: {
                  name: 'Double'
                }
              },
              top: {
                client_side_validation: true,
                required: true,
                serialized_name: 'top',
                type: {
                  name: 'Double'
                }
              },
              right: {
                client_side_validation: true,
                required: true,
                serialized_name: 'right',
                type: {
                  name: 'Double'
                }
              },
              bottom: {
                client_side_validation: true,
                required: true,
                serialized_name: 'bottom',
                type: {
                  name: 'Double'
                }
              }
            }
          }
        }
      end
    end
  end
end
