Class: Azure::CognitiveServices::ImageSearch::V1_0::Models::NormalizedRectangle

Inherits:
StructuredValue show all
Includes:
MsRestAzure
Defined in:
lib/1.0/generated/azure_cognitiveservices_imagesearch/models/normalized_rectangle.rb

Overview

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.

Instance Attribute Summary collapse

Attributes inherited from Thing

#alternate_name, #bing_id, #description, #image, #name, #url

Attributes inherited from Response

#read_link, #web_search_url

Attributes inherited from Identifiable

#id

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeNormalizedRectangle

Returns a new instance of NormalizedRectangle.



19
20
21
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/normalized_rectangle.rb', line 19

def initialize
  @_type = "NormalizedRectangle"
end

Instance Attribute Details

#_typeObject

Returns the value of attribute _type.



23
24
25
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/normalized_rectangle.rb', line 23

def _type
  @_type
end

#bottomFloat

Returns The bottom coordinate.

Returns:

  • (Float)

    The bottom coordinate



35
36
37
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/normalized_rectangle.rb', line 35

def bottom
  @bottom
end

#leftFloat

Returns The left coordinate.

Returns:

  • (Float)

    The left coordinate.



26
27
28
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/normalized_rectangle.rb', line 26

def left
  @left
end

#rightFloat

Returns The right coordinate.

Returns:

  • (Float)

    The right coordinate



32
33
34
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/normalized_rectangle.rb', line 32

def right
  @right
end

#topFloat

Returns The top coordinate.

Returns:

  • (Float)

    The top coordinate



29
30
31
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/normalized_rectangle.rb', line 29

def top
  @top
end

Class Method Details

.mapperObject

Mapper for NormalizedRectangle class as Ruby Hash. This will be used for serialization/deserialization.



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/normalized_rectangle.rb', line 42

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