cloudmersive-image-recognition-api-client 1.4.5 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +12 -6
  4. data/cloudmersive-image-recognition-api-client.gemspec +3 -3
  5. data/docs/ArtisticApi.md +2 -2
  6. data/docs/ConvertApi.md +7 -7
  7. data/docs/CreateHandwritingRequest.md +11 -0
  8. data/docs/DrawTextInstance.md +1 -1
  9. data/docs/EditApi.md +255 -9
  10. data/docs/FaceApi.md +8 -8
  11. data/docs/FilterApi.md +8 -8
  12. data/docs/InfoApi.md +2 -2
  13. data/docs/NsfwApi.md +1 -1
  14. data/docs/RecognizeApi.md +11 -11
  15. data/docs/ResizeApi.md +4 -4
  16. data/docs/TextGenerationApi.md +63 -0
  17. data/lib/cloudmersive-image-recognition-api-client.rb +3 -1
  18. data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +6 -7
  19. data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +30 -37
  20. data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +300 -47
  21. data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +31 -38
  22. data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +34 -42
  23. data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +10 -12
  24. data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +6 -7
  25. data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +37 -45
  26. data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +14 -16
  27. data/lib/cloudmersive-image-recognition-api-client/api/text_generation_api.rb +77 -0
  28. data/lib/cloudmersive-image-recognition-api-client/api_client.rb +11 -9
  29. data/lib/cloudmersive-image-recognition-api-client/api_error.rb +1 -1
  30. data/lib/cloudmersive-image-recognition-api-client/configuration.rb +2 -2
  31. data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +7 -10
  32. data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +7 -10
  33. data/lib/cloudmersive-image-recognition-api-client/models/create_handwriting_request.rb +216 -0
  34. data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +7 -10
  35. data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +7 -10
  36. data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +7 -10
  37. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +7 -10
  38. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +9 -13
  39. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +7 -10
  40. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +9 -13
  41. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +8 -11
  42. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +9 -13
  43. data/lib/cloudmersive-image-recognition-api-client/models/face.rb +7 -10
  44. data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +7 -10
  45. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +7 -10
  46. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +7 -10
  47. data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +7 -10
  48. data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +7 -10
  49. data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +7 -10
  50. data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +7 -10
  51. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +7 -10
  52. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +7 -10
  53. data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +7 -10
  54. data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +7 -10
  55. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +7 -10
  56. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata_exif_value.rb +7 -10
  57. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +7 -10
  58. data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +7 -10
  59. data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +7 -10
  60. data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +7 -10
  61. data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +7 -10
  62. data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +7 -10
  63. data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +7 -10
  64. data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +7 -10
  65. data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +7 -10
  66. data/lib/cloudmersive-image-recognition-api-client/version.rb +2 -2
  67. data/spec/api/artistic_api_spec.rb +2 -2
  68. data/spec/api/convert_api_spec.rb +8 -8
  69. data/spec/api/edit_api_spec.rb +69 -11
  70. data/spec/api/face_api_spec.rb +8 -8
  71. data/spec/api/filter_api_spec.rb +9 -9
  72. data/spec/api/info_api_spec.rb +3 -3
  73. data/spec/api/nsfw_api_spec.rb +2 -2
  74. data/spec/api/recognize_api_spec.rb +10 -10
  75. data/spec/api/resize_api_spec.rb +5 -5
  76. data/spec/api/text_generation_api_spec.rb +47 -0
  77. data/spec/api_client_spec.rb +52 -35
  78. data/spec/configuration_spec.rb +9 -9
  79. data/spec/models/age_detection_result_spec.rb +4 -5
  80. data/spec/models/color_result_spec.rb +4 -5
  81. data/spec/models/create_handwriting_request_spec.rb +59 -0
  82. data/spec/models/detected_license_plate_spec.rb +8 -9
  83. data/spec/models/detected_object_spec.rb +7 -8
  84. data/spec/models/dominant_color_result_spec.rb +3 -4
  85. data/spec/models/draw_polygon_instance_spec.rb +5 -6
  86. data/spec/models/draw_polygon_request_spec.rb +4 -5
  87. data/spec/models/draw_rectangle_instance_spec.rb +8 -9
  88. data/spec/models/draw_rectangle_request_spec.rb +4 -5
  89. data/spec/models/draw_text_instance_spec.rb +9 -10
  90. data/spec/models/draw_text_request_spec.rb +4 -5
  91. data/spec/models/face_compare_response_spec.rb +5 -6
  92. data/spec/models/face_locate_response_spec.rb +5 -6
  93. data/spec/models/face_locate_with_landmarks_response_spec.rb +5 -6
  94. data/spec/models/face_match_spec.rb +7 -8
  95. data/spec/models/face_point_spec.rb +3 -4
  96. data/spec/models/face_spec.rb +5 -6
  97. data/spec/models/face_with_landmarks_spec.rb +14 -15
  98. data/spec/models/find_symbol_result_spec.rb +7 -8
  99. data/spec/models/fine_text_detection_result_spec.rb +4 -5
  100. data/spec/models/fine_text_item_spec.rb +12 -13
  101. data/spec/models/gender_detection_result_spec.rb +4 -5
  102. data/spec/models/image_description_response_spec.rb +5 -6
  103. data/spec/models/image_metadata_exif_value_spec.rb +4 -5
  104. data/spec/models/image_metadata_spec.rb +11 -12
  105. data/spec/models/nsfw_result_spec.rb +4 -5
  106. data/spec/models/object_detection_result_spec.rb +4 -5
  107. data/spec/models/person_with_age_spec.rb +5 -6
  108. data/spec/models/person_with_gender_spec.rb +4 -5
  109. data/spec/models/polygon_point_spec.rb +3 -4
  110. data/spec/models/recognition_outcome_spec.rb +3 -4
  111. data/spec/models/text_detection_result_spec.rb +4 -5
  112. data/spec/models/text_item_spec.rb +5 -6
  113. data/spec/models/vehicle_license_plate_detection_result_spec.rb +4 -5
  114. data/spec/spec_helper.rb +1 -1
  115. metadata +8 -2
@@ -0,0 +1,216 @@
1
+ =begin
2
+ #imageapi
3
+
4
+ #Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveImageRecognitionApiClient
16
+ # Request to create a PNG of handwriting
17
+ class CreateHandwritingRequest
18
+ # Text to convert to handwriting
19
+ attr_accessor :text_input
20
+
21
+ # Desired width in pixels of the resulting image
22
+ attr_accessor :target_width
23
+
24
+ # Optinoal; Width of the text stroke in pixels; default is 2
25
+ attr_accessor :stroke_width
26
+
27
+ # HTML hexadecimal color, or HTML common color name (e.g. 'black', 'red'), for the handwriting
28
+ attr_accessor :color
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'text_input' => :'TextInput',
34
+ :'target_width' => :'TargetWidth',
35
+ :'stroke_width' => :'StrokeWidth',
36
+ :'color' => :'Color'
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.swagger_types
42
+ {
43
+ :'text_input' => :'String',
44
+ :'target_width' => :'Integer',
45
+ :'stroke_width' => :'Integer',
46
+ :'color' => :'String'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ return unless attributes.is_a?(Hash)
54
+
55
+ # convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
57
+
58
+ if attributes.has_key?(:'TextInput')
59
+ self.text_input = attributes[:'TextInput']
60
+ end
61
+
62
+ if attributes.has_key?(:'TargetWidth')
63
+ self.target_width = attributes[:'TargetWidth']
64
+ end
65
+
66
+ if attributes.has_key?(:'StrokeWidth')
67
+ self.stroke_width = attributes[:'StrokeWidth']
68
+ end
69
+
70
+ if attributes.has_key?(:'Color')
71
+ self.color = attributes[:'Color']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ text_input == o.text_input &&
94
+ target_width == o.target_width &&
95
+ stroke_width == o.stroke_width &&
96
+ color == o.color
97
+ end
98
+
99
+ # @see the `==` method
100
+ # @param [Object] Object to be compared
101
+ def eql?(o)
102
+ self == o
103
+ end
104
+
105
+ # Calculates hash code according to all attributes.
106
+ # @return [Fixnum] Hash code
107
+ def hash
108
+ [text_input, target_width, stroke_width, color].hash
109
+ end
110
+
111
+ # Builds the object from hash
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @return [Object] Returns the model itself
114
+ def build_from_hash(attributes)
115
+ return nil unless attributes.is_a?(Hash)
116
+ self.class.swagger_types.each_pair do |key, type|
117
+ if type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
121
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
122
+ end
123
+ elsif !attributes[self.class.attribute_map[key]].nil?
124
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
125
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
126
+ end
127
+
128
+ self
129
+ end
130
+
131
+ # Deserializes the data based on type
132
+ # @param string type Data type
133
+ # @param string value Value to be deserialized
134
+ # @return [Object] Deserialized data
135
+ def _deserialize(type, value)
136
+ case type.to_sym
137
+ when :DateTime
138
+ DateTime.parse(value)
139
+ when :Date
140
+ Date.parse(value)
141
+ when :String
142
+ value.to_s
143
+ when :Integer
144
+ value.to_i
145
+ when :Float
146
+ value.to_f
147
+ when :BOOLEAN
148
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
149
+ true
150
+ else
151
+ false
152
+ end
153
+ when :Object
154
+ # generic object (usually a Hash), return directly
155
+ value
156
+ when /\AArray<(?<inner_type>.+)>\z/
157
+ inner_type = Regexp.last_match[:inner_type]
158
+ value.map { |v| _deserialize(inner_type, v) }
159
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
+ k_type = Regexp.last_match[:k_type]
161
+ v_type = Regexp.last_match[:v_type]
162
+ {}.tap do |hash|
163
+ value.each do |k, v|
164
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
165
+ end
166
+ end
167
+ else # model
168
+ temp_model = CloudmersiveImageRecognitionApiClient.const_get(type).new
169
+ temp_model.build_from_hash(value)
170
+ end
171
+ end
172
+
173
+ # Returns the string representation of the object
174
+ # @return [String] String presentation of the object
175
+ def to_s
176
+ to_hash.to_s
177
+ end
178
+
179
+ # to_body is an alias to to_hash (backward compatibility)
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_body
182
+ to_hash
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ next if value.nil?
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ # Outputs non-array value in the form of hash
198
+ # For object, use to_hash. Otherwise, just return the value
199
+ # @param [Object] value Any valid value
200
+ # @return [Hash] Returns the value in the form of hash
201
+ def _to_hash(value)
202
+ if value.is_a?(Array)
203
+ value.compact.map { |v| _to_hash(v) }
204
+ elsif value.is_a?(Hash)
205
+ {}.tap do |hash|
206
+ value.each { |k, v| hash[k] = _to_hash(v) }
207
+ end
208
+ elsif value.respond_to? :to_hash
209
+ value.to_hash
210
+ else
211
+ value
212
+ end
213
+ end
214
+
215
+ end
216
+ end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -36,7 +36,6 @@ module CloudmersiveImageRecognitionApiClient
36
36
  # Confidence score on a range of 0.0 - 1.0 of the accuracy of the detected license plate, with higher scores being better; values about 0.75 are high confidence
37
37
  attr_accessor :license_plate_recognition_confidence_level
38
38
 
39
-
40
39
  # Attribute mapping from ruby-style variable name to JSON key.
41
40
  def self.attribute_map
42
41
  {
@@ -69,7 +68,7 @@ module CloudmersiveImageRecognitionApiClient
69
68
  return unless attributes.is_a?(Hash)
70
69
 
71
70
  # convert string to symbol for hash key
72
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
71
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
73
72
 
74
73
  if attributes.has_key?(:'LicensePlateText_BestMatch')
75
74
  self.license_plate_text_best_match = attributes[:'LicensePlateText_BestMatch']
@@ -98,20 +97,19 @@ module CloudmersiveImageRecognitionApiClient
98
97
  if attributes.has_key?(:'LicensePlateRecognitionConfidenceLevel')
99
98
  self.license_plate_recognition_confidence_level = attributes[:'LicensePlateRecognitionConfidenceLevel']
100
99
  end
101
-
102
100
  end
103
101
 
104
102
  # Show invalid properties with the reasons. Usually used together with valid?
105
103
  # @return Array for valid properties with the reasons
106
104
  def list_invalid_properties
107
105
  invalid_properties = Array.new
108
- return invalid_properties
106
+ invalid_properties
109
107
  end
110
108
 
111
109
  # Check to see if the all the properties in the model are valid
112
110
  # @return true if the model is valid
113
111
  def valid?
114
- return true
112
+ true
115
113
  end
116
114
 
117
115
  # Checks equality by comparing each attribute.
@@ -147,10 +145,10 @@ module CloudmersiveImageRecognitionApiClient
147
145
  return nil unless attributes.is_a?(Hash)
148
146
  self.class.swagger_types.each_pair do |key, type|
149
147
  if type =~ /\AArray<(.*)>/i
150
- # check to ensure the input is an array given that the the attribute
148
+ # check to ensure the input is an array given that the attribute
151
149
  # is documented as an array but the input is not
152
150
  if attributes[self.class.attribute_map[key]].is_a?(Array)
153
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
151
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
154
152
  end
155
153
  elsif !attributes[self.class.attribute_map[key]].nil?
156
154
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -232,7 +230,7 @@ module CloudmersiveImageRecognitionApiClient
232
230
  # @return [Hash] Returns the value in the form of hash
233
231
  def _to_hash(value)
234
232
  if value.is_a?(Array)
235
- value.compact.map{ |v| _to_hash(v) }
233
+ value.compact.map { |v| _to_hash(v) }
236
234
  elsif value.is_a?(Hash)
237
235
  {}.tap do |hash|
238
236
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -245,5 +243,4 @@ module CloudmersiveImageRecognitionApiClient
245
243
  end
246
244
 
247
245
  end
248
-
249
246
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -33,7 +33,6 @@ module CloudmersiveImageRecognitionApiClient
33
33
  # Y location, in pixels, of the top side location of the object, with the bottom side being Y + Height
34
34
  attr_accessor :y
35
35
 
36
-
37
36
  # Attribute mapping from ruby-style variable name to JSON key.
38
37
  def self.attribute_map
39
38
  {
@@ -64,7 +63,7 @@ module CloudmersiveImageRecognitionApiClient
64
63
  return unless attributes.is_a?(Hash)
65
64
 
66
65
  # convert string to symbol for hash key
67
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
66
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
67
 
69
68
  if attributes.has_key?(:'ObjectClassName')
70
69
  self.object_class_name = attributes[:'ObjectClassName']
@@ -89,20 +88,19 @@ module CloudmersiveImageRecognitionApiClient
89
88
  if attributes.has_key?(:'Y')
90
89
  self.y = attributes[:'Y']
91
90
  end
92
-
93
91
  end
94
92
 
95
93
  # Show invalid properties with the reasons. Usually used together with valid?
96
94
  # @return Array for valid properties with the reasons
97
95
  def list_invalid_properties
98
96
  invalid_properties = Array.new
99
- return invalid_properties
97
+ invalid_properties
100
98
  end
101
99
 
102
100
  # Check to see if the all the properties in the model are valid
103
101
  # @return true if the model is valid
104
102
  def valid?
105
- return true
103
+ true
106
104
  end
107
105
 
108
106
  # Checks equality by comparing each attribute.
@@ -137,10 +135,10 @@ module CloudmersiveImageRecognitionApiClient
137
135
  return nil unless attributes.is_a?(Hash)
138
136
  self.class.swagger_types.each_pair do |key, type|
139
137
  if type =~ /\AArray<(.*)>/i
140
- # check to ensure the input is an array given that the the attribute
138
+ # check to ensure the input is an array given that the attribute
141
139
  # is documented as an array but the input is not
142
140
  if attributes[self.class.attribute_map[key]].is_a?(Array)
143
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
141
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
144
142
  end
145
143
  elsif !attributes[self.class.attribute_map[key]].nil?
146
144
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -222,7 +220,7 @@ module CloudmersiveImageRecognitionApiClient
222
220
  # @return [Hash] Returns the value in the form of hash
223
221
  def _to_hash(value)
224
222
  if value.is_a?(Array)
225
- value.compact.map{ |v| _to_hash(v) }
223
+ value.compact.map { |v| _to_hash(v) }
226
224
  elsif value.is_a?(Hash)
227
225
  {}.tap do |hash|
228
226
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -235,5 +233,4 @@ module CloudmersiveImageRecognitionApiClient
235
233
  end
236
234
 
237
235
  end
238
-
239
236
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -21,7 +21,6 @@ module CloudmersiveImageRecognitionApiClient
21
21
  # Dominant colors in the image, in order where most dominant color is in the first index position (0), the second most-dominant color is in index position 1 and so on
22
22
  attr_accessor :dominant_colors
23
23
 
24
-
25
24
  # Attribute mapping from ruby-style variable name to JSON key.
26
25
  def self.attribute_map
27
26
  {
@@ -44,7 +43,7 @@ module CloudmersiveImageRecognitionApiClient
44
43
  return unless attributes.is_a?(Hash)
45
44
 
46
45
  # convert string to symbol for hash key
47
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
47
 
49
48
  if attributes.has_key?(:'Successful')
50
49
  self.successful = attributes[:'Successful']
@@ -55,20 +54,19 @@ module CloudmersiveImageRecognitionApiClient
55
54
  self.dominant_colors = value
56
55
  end
57
56
  end
58
-
59
57
  end
60
58
 
61
59
  # Show invalid properties with the reasons. Usually used together with valid?
62
60
  # @return Array for valid properties with the reasons
63
61
  def list_invalid_properties
64
62
  invalid_properties = Array.new
65
- return invalid_properties
63
+ invalid_properties
66
64
  end
67
65
 
68
66
  # Check to see if the all the properties in the model are valid
69
67
  # @return true if the model is valid
70
68
  def valid?
71
- return true
69
+ true
72
70
  end
73
71
 
74
72
  # Checks equality by comparing each attribute.
@@ -99,10 +97,10 @@ module CloudmersiveImageRecognitionApiClient
99
97
  return nil unless attributes.is_a?(Hash)
100
98
  self.class.swagger_types.each_pair do |key, type|
101
99
  if type =~ /\AArray<(.*)>/i
102
- # check to ensure the input is an array given that the the attribute
100
+ # check to ensure the input is an array given that the attribute
103
101
  # is documented as an array but the input is not
104
102
  if attributes[self.class.attribute_map[key]].is_a?(Array)
105
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
106
104
  end
107
105
  elsif !attributes[self.class.attribute_map[key]].nil?
108
106
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -184,7 +182,7 @@ module CloudmersiveImageRecognitionApiClient
184
182
  # @return [Hash] Returns the value in the form of hash
185
183
  def _to_hash(value)
186
184
  if value.is_a?(Array)
187
- value.compact.map{ |v| _to_hash(v) }
185
+ value.compact.map { |v| _to_hash(v) }
188
186
  elsif value.is_a?(Hash)
189
187
  {}.tap do |hash|
190
188
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -197,5 +195,4 @@ module CloudmersiveImageRecognitionApiClient
197
195
  end
198
196
 
199
197
  end
200
-
201
198
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -27,7 +27,6 @@ module CloudmersiveImageRecognitionApiClient
27
27
  # Points (vertices) which comprise the polygon; valid polygons must have at least 3 points
28
28
  attr_accessor :points
29
29
 
30
-
31
30
  # Attribute mapping from ruby-style variable name to JSON key.
32
31
  def self.attribute_map
33
32
  {
@@ -54,7 +53,7 @@ module CloudmersiveImageRecognitionApiClient
54
53
  return unless attributes.is_a?(Hash)
55
54
 
56
55
  # convert string to symbol for hash key
57
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
56
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
58
57
 
59
58
  if attributes.has_key?(:'BorderColor')
60
59
  self.border_color = attributes[:'BorderColor']
@@ -73,20 +72,19 @@ module CloudmersiveImageRecognitionApiClient
73
72
  self.points = value
74
73
  end
75
74
  end
76
-
77
75
  end
78
76
 
79
77
  # Show invalid properties with the reasons. Usually used together with valid?
80
78
  # @return Array for valid properties with the reasons
81
79
  def list_invalid_properties
82
80
  invalid_properties = Array.new
83
- return invalid_properties
81
+ invalid_properties
84
82
  end
85
83
 
86
84
  # Check to see if the all the properties in the model are valid
87
85
  # @return true if the model is valid
88
86
  def valid?
89
- return true
87
+ true
90
88
  end
91
89
 
92
90
  # Checks equality by comparing each attribute.
@@ -119,10 +117,10 @@ module CloudmersiveImageRecognitionApiClient
119
117
  return nil unless attributes.is_a?(Hash)
120
118
  self.class.swagger_types.each_pair do |key, type|
121
119
  if type =~ /\AArray<(.*)>/i
122
- # check to ensure the input is an array given that the the attribute
120
+ # check to ensure the input is an array given that the attribute
123
121
  # is documented as an array but the input is not
124
122
  if attributes[self.class.attribute_map[key]].is_a?(Array)
125
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
123
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
126
124
  end
127
125
  elsif !attributes[self.class.attribute_map[key]].nil?
128
126
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -204,7 +202,7 @@ module CloudmersiveImageRecognitionApiClient
204
202
  # @return [Hash] Returns the value in the form of hash
205
203
  def _to_hash(value)
206
204
  if value.is_a?(Array)
207
- value.compact.map{ |v| _to_hash(v) }
205
+ value.compact.map { |v| _to_hash(v) }
208
206
  elsif value.is_a?(Hash)
209
207
  {}.tap do |hash|
210
208
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -217,5 +215,4 @@ module CloudmersiveImageRecognitionApiClient
217
215
  end
218
216
 
219
217
  end
220
-
221
218
  end