cloudmersive-image-recognition-api-client 1.4.4 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +20 -16
  4. data/cloudmersive-image-recognition-api-client.gemspec +3 -3
  5. data/docs/ArtisticApi.md +2 -2
  6. data/docs/ConvertApi.md +13 -13
  7. data/docs/DrawTextInstance.md +1 -1
  8. data/docs/EditApi.md +270 -24
  9. data/docs/FaceApi.md +20 -20
  10. data/docs/FaceLocateResponse.md +1 -1
  11. data/docs/FilterApi.md +11 -11
  12. data/docs/ImageMetadata.md +2 -0
  13. data/docs/InfoApi.md +5 -5
  14. data/docs/NsfwApi.md +4 -4
  15. data/docs/RecognizeApi.md +17 -17
  16. data/docs/ResizeApi.md +10 -10
  17. data/lib/cloudmersive-image-recognition-api-client.rb +1 -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 +35 -42
  20. data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +315 -62
  21. data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +39 -46
  22. data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +36 -44
  23. data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +12 -14
  24. data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +8 -9
  25. data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +41 -49
  26. data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +20 -22
  27. data/lib/cloudmersive-image-recognition-api-client/api_client.rb +11 -9
  28. data/lib/cloudmersive-image-recognition-api-client/api_error.rb +1 -1
  29. data/lib/cloudmersive-image-recognition-api-client/configuration.rb +2 -2
  30. data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +7 -10
  31. data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +7 -10
  32. data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +7 -10
  33. data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +7 -10
  34. data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +7 -10
  35. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +7 -10
  36. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +9 -13
  37. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +7 -10
  38. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +9 -13
  39. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +8 -11
  40. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +9 -13
  41. data/lib/cloudmersive-image-recognition-api-client/models/face.rb +7 -10
  42. data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +7 -10
  43. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +19 -21
  44. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +7 -10
  45. data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +7 -10
  46. data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +7 -10
  47. data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +7 -10
  48. data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +7 -10
  49. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +7 -10
  50. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +7 -10
  51. data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +7 -10
  52. data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +7 -10
  53. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +28 -11
  54. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata_exif_value.rb +7 -10
  55. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +7 -10
  56. data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +7 -10
  57. data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +7 -10
  58. data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +7 -10
  59. data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +7 -10
  60. data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +7 -10
  61. data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +7 -10
  62. data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +7 -10
  63. data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +7 -10
  64. data/lib/cloudmersive-image-recognition-api-client/version.rb +2 -2
  65. data/spec/api/artistic_api_spec.rb +2 -2
  66. data/spec/api/convert_api_spec.rb +9 -9
  67. data/spec/api/edit_api_spec.rb +74 -16
  68. data/spec/api/face_api_spec.rb +12 -12
  69. data/spec/api/filter_api_spec.rb +10 -10
  70. data/spec/api/info_api_spec.rb +4 -4
  71. data/spec/api/nsfw_api_spec.rb +3 -3
  72. data/spec/api/recognize_api_spec.rb +12 -12
  73. data/spec/api/resize_api_spec.rb +7 -7
  74. data/spec/api_client_spec.rb +52 -35
  75. data/spec/configuration_spec.rb +9 -9
  76. data/spec/models/age_detection_result_spec.rb +4 -5
  77. data/spec/models/color_result_spec.rb +4 -5
  78. data/spec/models/detected_license_plate_spec.rb +8 -9
  79. data/spec/models/detected_object_spec.rb +7 -8
  80. data/spec/models/dominant_color_result_spec.rb +3 -4
  81. data/spec/models/draw_polygon_instance_spec.rb +5 -6
  82. data/spec/models/draw_polygon_request_spec.rb +4 -5
  83. data/spec/models/draw_rectangle_instance_spec.rb +8 -9
  84. data/spec/models/draw_rectangle_request_spec.rb +4 -5
  85. data/spec/models/draw_text_instance_spec.rb +9 -10
  86. data/spec/models/draw_text_request_spec.rb +4 -5
  87. data/spec/models/face_compare_response_spec.rb +5 -6
  88. data/spec/models/face_locate_response_spec.rb +9 -10
  89. data/spec/models/face_locate_with_landmarks_response_spec.rb +5 -6
  90. data/spec/models/face_match_spec.rb +7 -8
  91. data/spec/models/face_point_spec.rb +3 -4
  92. data/spec/models/face_spec.rb +5 -6
  93. data/spec/models/face_with_landmarks_spec.rb +14 -15
  94. data/spec/models/find_symbol_result_spec.rb +7 -8
  95. data/spec/models/fine_text_detection_result_spec.rb +4 -5
  96. data/spec/models/fine_text_item_spec.rb +12 -13
  97. data/spec/models/gender_detection_result_spec.rb +4 -5
  98. data/spec/models/image_description_response_spec.rb +5 -6
  99. data/spec/models/image_metadata_exif_value_spec.rb +4 -5
  100. data/spec/models/image_metadata_spec.rb +21 -10
  101. data/spec/models/nsfw_result_spec.rb +4 -5
  102. data/spec/models/object_detection_result_spec.rb +4 -5
  103. data/spec/models/person_with_age_spec.rb +5 -6
  104. data/spec/models/person_with_gender_spec.rb +4 -5
  105. data/spec/models/polygon_point_spec.rb +3 -4
  106. data/spec/models/recognition_outcome_spec.rb +3 -4
  107. data/spec/models/text_detection_result_spec.rb +4 -5
  108. data/spec/models/text_item_spec.rb +5 -6
  109. data/spec/models/vehicle_license_plate_detection_result_spec.rb +4 -5
  110. data/spec/spec_helper.rb +1 -1
  111. metadata +2 -2
@@ -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
 
@@ -24,7 +24,6 @@ module CloudmersiveImageRecognitionApiClient
24
24
  # Number of people identified in the image with a gender
25
25
  attr_accessor :people_identified
26
26
 
27
-
28
27
  # Attribute mapping from ruby-style variable name to JSON key.
29
28
  def self.attribute_map
30
29
  {
@@ -49,7 +48,7 @@ module CloudmersiveImageRecognitionApiClient
49
48
  return unless attributes.is_a?(Hash)
50
49
 
51
50
  # convert string to symbol for hash key
52
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
53
52
 
54
53
  if attributes.has_key?(:'Successful')
55
54
  self.successful = attributes[:'Successful']
@@ -64,20 +63,19 @@ module CloudmersiveImageRecognitionApiClient
64
63
  if attributes.has_key?(:'PeopleIdentified')
65
64
  self.people_identified = attributes[:'PeopleIdentified']
66
65
  end
67
-
68
66
  end
69
67
 
70
68
  # Show invalid properties with the reasons. Usually used together with valid?
71
69
  # @return Array for valid properties with the reasons
72
70
  def list_invalid_properties
73
71
  invalid_properties = Array.new
74
- return invalid_properties
72
+ invalid_properties
75
73
  end
76
74
 
77
75
  # Check to see if the all the properties in the model are valid
78
76
  # @return true if the model is valid
79
77
  def valid?
80
- return true
78
+ true
81
79
  end
82
80
 
83
81
  # Checks equality by comparing each attribute.
@@ -109,10 +107,10 @@ module CloudmersiveImageRecognitionApiClient
109
107
  return nil unless attributes.is_a?(Hash)
110
108
  self.class.swagger_types.each_pair do |key, type|
111
109
  if type =~ /\AArray<(.*)>/i
112
- # check to ensure the input is an array given that the the attribute
110
+ # check to ensure the input is an array given that the attribute
113
111
  # is documented as an array but the input is not
114
112
  if attributes[self.class.attribute_map[key]].is_a?(Array)
115
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
113
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
116
114
  end
117
115
  elsif !attributes[self.class.attribute_map[key]].nil?
118
116
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -194,7 +192,7 @@ module CloudmersiveImageRecognitionApiClient
194
192
  # @return [Hash] Returns the value in the form of hash
195
193
  def _to_hash(value)
196
194
  if value.is_a?(Array)
197
- value.compact.map{ |v| _to_hash(v) }
195
+ value.compact.map { |v| _to_hash(v) }
198
196
  elsif value.is_a?(Hash)
199
197
  {}.tap do |hash|
200
198
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -207,5 +205,4 @@ module CloudmersiveImageRecognitionApiClient
207
205
  end
208
206
 
209
207
  end
210
-
211
208
  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
  # Best backup (\"runner up\") Machine Learning outcome
28
28
  attr_accessor :runner_up_outcome
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?(:'Successful')
60
59
  self.successful = attributes[:'Successful']
@@ -71,20 +70,19 @@ module CloudmersiveImageRecognitionApiClient
71
70
  if attributes.has_key?(:'RunnerUpOutcome')
72
71
  self.runner_up_outcome = attributes[:'RunnerUpOutcome']
73
72
  end
74
-
75
73
  end
76
74
 
77
75
  # Show invalid properties with the reasons. Usually used together with valid?
78
76
  # @return Array for valid properties with the reasons
79
77
  def list_invalid_properties
80
78
  invalid_properties = Array.new
81
- return invalid_properties
79
+ invalid_properties
82
80
  end
83
81
 
84
82
  # Check to see if the all the properties in the model are valid
85
83
  # @return true if the model is valid
86
84
  def valid?
87
- return true
85
+ true
88
86
  end
89
87
 
90
88
  # Checks equality by comparing each attribute.
@@ -117,10 +115,10 @@ module CloudmersiveImageRecognitionApiClient
117
115
  return nil unless attributes.is_a?(Hash)
118
116
  self.class.swagger_types.each_pair do |key, type|
119
117
  if type =~ /\AArray<(.*)>/i
120
- # check to ensure the input is an array given that the the attribute
118
+ # check to ensure the input is an array given that the attribute
121
119
  # is documented as an array but the input is not
122
120
  if attributes[self.class.attribute_map[key]].is_a?(Array)
123
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
121
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
124
122
  end
125
123
  elsif !attributes[self.class.attribute_map[key]].nil?
126
124
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -202,7 +200,7 @@ module CloudmersiveImageRecognitionApiClient
202
200
  # @return [Hash] Returns the value in the form of hash
203
201
  def _to_hash(value)
204
202
  if value.is_a?(Array)
205
- value.compact.map{ |v| _to_hash(v) }
203
+ value.compact.map { |v| _to_hash(v) }
206
204
  elsif value.is_a?(Hash)
207
205
  {}.tap do |hash|
208
206
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -215,5 +213,4 @@ module CloudmersiveImageRecognitionApiClient
215
213
  end
216
214
 
217
215
  end
218
-
219
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
 
@@ -18,6 +18,9 @@ module CloudmersiveImageRecognitionApiClient
18
18
  # True if the operation was successful, false otherwise
19
19
  attr_accessor :successful
20
20
 
21
+ # True if the input image is a valid image file, false otherwise
22
+ attr_accessor :is_valid_image
23
+
21
24
  # File format of the image
22
25
  attr_accessor :file_format
23
26
 
@@ -30,6 +33,9 @@ module CloudmersiveImageRecognitionApiClient
30
33
  # Bits per pixel
31
34
  attr_accessor :bit_depth
32
35
 
36
+ # True if the image has transaprency in the form of an alpha channel, false otherwise
37
+ attr_accessor :has_transparency
38
+
33
39
  # Color space of the image
34
40
  attr_accessor :color_space
35
41
 
@@ -39,15 +45,16 @@ module CloudmersiveImageRecognitionApiClient
39
45
  # EXIF tags and values embedded in the image
40
46
  attr_accessor :exif_values
41
47
 
42
-
43
48
  # Attribute mapping from ruby-style variable name to JSON key.
44
49
  def self.attribute_map
45
50
  {
46
51
  :'successful' => :'Successful',
52
+ :'is_valid_image' => :'IsValidImage',
47
53
  :'file_format' => :'FileFormat',
48
54
  :'width' => :'Width',
49
55
  :'height' => :'Height',
50
56
  :'bit_depth' => :'BitDepth',
57
+ :'has_transparency' => :'HasTransparency',
51
58
  :'color_space' => :'ColorSpace',
52
59
  :'exif_profile_name' => :'ExifProfileName',
53
60
  :'exif_values' => :'ExifValues'
@@ -58,10 +65,12 @@ module CloudmersiveImageRecognitionApiClient
58
65
  def self.swagger_types
59
66
  {
60
67
  :'successful' => :'BOOLEAN',
68
+ :'is_valid_image' => :'BOOLEAN',
61
69
  :'file_format' => :'String',
62
70
  :'width' => :'Integer',
63
71
  :'height' => :'Integer',
64
72
  :'bit_depth' => :'Integer',
73
+ :'has_transparency' => :'BOOLEAN',
65
74
  :'color_space' => :'String',
66
75
  :'exif_profile_name' => :'String',
67
76
  :'exif_values' => :'Array<ImageMetadataExifValue>'
@@ -74,12 +83,16 @@ module CloudmersiveImageRecognitionApiClient
74
83
  return unless attributes.is_a?(Hash)
75
84
 
76
85
  # convert string to symbol for hash key
77
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
86
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
78
87
 
79
88
  if attributes.has_key?(:'Successful')
80
89
  self.successful = attributes[:'Successful']
81
90
  end
82
91
 
92
+ if attributes.has_key?(:'IsValidImage')
93
+ self.is_valid_image = attributes[:'IsValidImage']
94
+ end
95
+
83
96
  if attributes.has_key?(:'FileFormat')
84
97
  self.file_format = attributes[:'FileFormat']
85
98
  end
@@ -96,6 +109,10 @@ module CloudmersiveImageRecognitionApiClient
96
109
  self.bit_depth = attributes[:'BitDepth']
97
110
  end
98
111
 
112
+ if attributes.has_key?(:'HasTransparency')
113
+ self.has_transparency = attributes[:'HasTransparency']
114
+ end
115
+
99
116
  if attributes.has_key?(:'ColorSpace')
100
117
  self.color_space = attributes[:'ColorSpace']
101
118
  end
@@ -109,20 +126,19 @@ module CloudmersiveImageRecognitionApiClient
109
126
  self.exif_values = value
110
127
  end
111
128
  end
112
-
113
129
  end
114
130
 
115
131
  # Show invalid properties with the reasons. Usually used together with valid?
116
132
  # @return Array for valid properties with the reasons
117
133
  def list_invalid_properties
118
134
  invalid_properties = Array.new
119
- return invalid_properties
135
+ invalid_properties
120
136
  end
121
137
 
122
138
  # Check to see if the all the properties in the model are valid
123
139
  # @return true if the model is valid
124
140
  def valid?
125
- return true
141
+ true
126
142
  end
127
143
 
128
144
  # Checks equality by comparing each attribute.
@@ -131,10 +147,12 @@ module CloudmersiveImageRecognitionApiClient
131
147
  return true if self.equal?(o)
132
148
  self.class == o.class &&
133
149
  successful == o.successful &&
150
+ is_valid_image == o.is_valid_image &&
134
151
  file_format == o.file_format &&
135
152
  width == o.width &&
136
153
  height == o.height &&
137
154
  bit_depth == o.bit_depth &&
155
+ has_transparency == o.has_transparency &&
138
156
  color_space == o.color_space &&
139
157
  exif_profile_name == o.exif_profile_name &&
140
158
  exif_values == o.exif_values
@@ -149,7 +167,7 @@ module CloudmersiveImageRecognitionApiClient
149
167
  # Calculates hash code according to all attributes.
150
168
  # @return [Fixnum] Hash code
151
169
  def hash
152
- [successful, file_format, width, height, bit_depth, color_space, exif_profile_name, exif_values].hash
170
+ [successful, is_valid_image, file_format, width, height, bit_depth, has_transparency, color_space, exif_profile_name, exif_values].hash
153
171
  end
154
172
 
155
173
  # Builds the object from hash
@@ -159,10 +177,10 @@ module CloudmersiveImageRecognitionApiClient
159
177
  return nil unless attributes.is_a?(Hash)
160
178
  self.class.swagger_types.each_pair do |key, type|
161
179
  if type =~ /\AArray<(.*)>/i
162
- # check to ensure the input is an array given that the the attribute
180
+ # check to ensure the input is an array given that the attribute
163
181
  # is documented as an array but the input is not
164
182
  if attributes[self.class.attribute_map[key]].is_a?(Array)
165
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
183
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
166
184
  end
167
185
  elsif !attributes[self.class.attribute_map[key]].nil?
168
186
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -244,7 +262,7 @@ module CloudmersiveImageRecognitionApiClient
244
262
  # @return [Hash] Returns the value in the form of hash
245
263
  def _to_hash(value)
246
264
  if value.is_a?(Array)
247
- value.compact.map{ |v| _to_hash(v) }
265
+ value.compact.map { |v| _to_hash(v) }
248
266
  elsif value.is_a?(Hash)
249
267
  {}.tap do |hash|
250
268
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -257,5 +275,4 @@ module CloudmersiveImageRecognitionApiClient
257
275
  end
258
276
 
259
277
  end
260
-
261
278
  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
 
@@ -24,7 +24,6 @@ module CloudmersiveImageRecognitionApiClient
24
24
  # Value, formatted as a string of the EXIF value
25
25
  attr_accessor :data_value
26
26
 
27
-
28
27
  # Attribute mapping from ruby-style variable name to JSON key.
29
28
  def self.attribute_map
30
29
  {
@@ -49,7 +48,7 @@ module CloudmersiveImageRecognitionApiClient
49
48
  return unless attributes.is_a?(Hash)
50
49
 
51
50
  # convert string to symbol for hash key
52
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
53
52
 
54
53
  if attributes.has_key?(:'Tag')
55
54
  self.tag = attributes[:'Tag']
@@ -62,20 +61,19 @@ module CloudmersiveImageRecognitionApiClient
62
61
  if attributes.has_key?(:'DataValue')
63
62
  self.data_value = attributes[:'DataValue']
64
63
  end
65
-
66
64
  end
67
65
 
68
66
  # Show invalid properties with the reasons. Usually used together with valid?
69
67
  # @return Array for valid properties with the reasons
70
68
  def list_invalid_properties
71
69
  invalid_properties = Array.new
72
- return invalid_properties
70
+ invalid_properties
73
71
  end
74
72
 
75
73
  # Check to see if the all the properties in the model are valid
76
74
  # @return true if the model is valid
77
75
  def valid?
78
- return true
76
+ true
79
77
  end
80
78
 
81
79
  # Checks equality by comparing each attribute.
@@ -107,10 +105,10 @@ module CloudmersiveImageRecognitionApiClient
107
105
  return nil unless attributes.is_a?(Hash)
108
106
  self.class.swagger_types.each_pair do |key, type|
109
107
  if type =~ /\AArray<(.*)>/i
110
- # check to ensure the input is an array given that the the attribute
108
+ # check to ensure the input is an array given that the attribute
111
109
  # is documented as an array but the input is not
112
110
  if attributes[self.class.attribute_map[key]].is_a?(Array)
113
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
111
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
114
112
  end
115
113
  elsif !attributes[self.class.attribute_map[key]].nil?
116
114
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -192,7 +190,7 @@ module CloudmersiveImageRecognitionApiClient
192
190
  # @return [Hash] Returns the value in the form of hash
193
191
  def _to_hash(value)
194
192
  if value.is_a?(Array)
195
- value.compact.map{ |v| _to_hash(v) }
193
+ value.compact.map { |v| _to_hash(v) }
196
194
  elsif value.is_a?(Hash)
197
195
  {}.tap do |hash|
198
196
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -205,5 +203,4 @@ module CloudmersiveImageRecognitionApiClient
205
203
  end
206
204
 
207
205
  end
208
-
209
206
  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
 
@@ -24,7 +24,6 @@ module CloudmersiveImageRecognitionApiClient
24
24
  # Classification result into four categories: SafeContent_HighProbability, UnsafeContent_HighProbability, RacyContent, SafeContent_ModerateProbability
25
25
  attr_accessor :classification_outcome
26
26
 
27
-
28
27
  # Attribute mapping from ruby-style variable name to JSON key.
29
28
  def self.attribute_map
30
29
  {
@@ -49,7 +48,7 @@ module CloudmersiveImageRecognitionApiClient
49
48
  return unless attributes.is_a?(Hash)
50
49
 
51
50
  # convert string to symbol for hash key
52
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
53
52
 
54
53
  if attributes.has_key?(:'Successful')
55
54
  self.successful = attributes[:'Successful']
@@ -62,20 +61,19 @@ module CloudmersiveImageRecognitionApiClient
62
61
  if attributes.has_key?(:'ClassificationOutcome')
63
62
  self.classification_outcome = attributes[:'ClassificationOutcome']
64
63
  end
65
-
66
64
  end
67
65
 
68
66
  # Show invalid properties with the reasons. Usually used together with valid?
69
67
  # @return Array for valid properties with the reasons
70
68
  def list_invalid_properties
71
69
  invalid_properties = Array.new
72
- return invalid_properties
70
+ invalid_properties
73
71
  end
74
72
 
75
73
  # Check to see if the all the properties in the model are valid
76
74
  # @return true if the model is valid
77
75
  def valid?
78
- return true
76
+ true
79
77
  end
80
78
 
81
79
  # Checks equality by comparing each attribute.
@@ -107,10 +105,10 @@ module CloudmersiveImageRecognitionApiClient
107
105
  return nil unless attributes.is_a?(Hash)
108
106
  self.class.swagger_types.each_pair do |key, type|
109
107
  if type =~ /\AArray<(.*)>/i
110
- # check to ensure the input is an array given that the the attribute
108
+ # check to ensure the input is an array given that the attribute
111
109
  # is documented as an array but the input is not
112
110
  if attributes[self.class.attribute_map[key]].is_a?(Array)
113
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
111
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
114
112
  end
115
113
  elsif !attributes[self.class.attribute_map[key]].nil?
116
114
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -192,7 +190,7 @@ module CloudmersiveImageRecognitionApiClient
192
190
  # @return [Hash] Returns the value in the form of hash
193
191
  def _to_hash(value)
194
192
  if value.is_a?(Array)
195
- value.compact.map{ |v| _to_hash(v) }
193
+ value.compact.map { |v| _to_hash(v) }
196
194
  elsif value.is_a?(Hash)
197
195
  {}.tap do |hash|
198
196
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -205,5 +203,4 @@ module CloudmersiveImageRecognitionApiClient
205
203
  end
206
204
 
207
205
  end
208
-
209
206
  end