cloudmersive-image-recognition-api-client 1.3.7 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -5
- data/cloudmersive-image-recognition-api-client.gemspec +1 -1
- data/docs/ColorResult.md +10 -0
- data/docs/DetectedLicensePlate.md +4 -4
- data/docs/DominantColorResult.md +9 -0
- data/docs/EditApi.md +134 -0
- data/docs/FaceApi.md +55 -0
- data/docs/FaceCompareResponse.md +1 -1
- data/docs/FaceLocateWithLandmarksResponse.md +1 -1
- data/docs/FaceWithLandmarks.md +9 -9
- data/docs/FilterApi.md +475 -0
- data/docs/FindSymbolResult.md +12 -0
- data/docs/GenderDetectionResult.md +10 -0
- data/docs/InfoApi.md +63 -0
- data/docs/PersonWithAge.md +1 -0
- data/docs/PersonWithGender.md +10 -0
- data/docs/RecognizeApi.md +68 -4
- data/docs/ResizeApi.md +64 -3
- data/lib/cloudmersive-image-recognition-api-client.rb +8 -1
- data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +161 -1
- data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +57 -1
- data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +524 -0
- data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +79 -0
- data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +76 -4
- data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +71 -3
- data/lib/cloudmersive-image-recognition-api-client/api_client.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api_error.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/configuration.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +209 -0
- data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +26 -22
- data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +201 -0
- data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +15 -14
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +15 -14
- data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +54 -45
- data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +229 -0
- data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +211 -0
- data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +14 -5
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +209 -0
- data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/version.rb +2 -2
- data/spec/api/artistic_api_spec.rb +1 -1
- data/spec/api/edit_api_spec.rb +33 -1
- data/spec/api/face_api_spec.rb +13 -1
- data/spec/api/filter_api_spec.rb +140 -0
- data/spec/api/info_api_spec.rb +47 -0
- data/spec/api/nsfw_api_spec.rb +1 -1
- data/spec/api/recognize_api_spec.rb +15 -1
- data/spec/api/resize_api_spec.rb +16 -2
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/age_detection_result_spec.rb +1 -1
- data/spec/models/color_result_spec.rb +54 -0
- data/spec/models/detected_license_plate_spec.rb +7 -7
- data/spec/models/detected_object_spec.rb +1 -1
- data/spec/models/dominant_color_result_spec.rb +48 -0
- data/spec/models/draw_polygon_instance_spec.rb +1 -1
- data/spec/models/draw_polygon_request_spec.rb +1 -1
- data/spec/models/draw_rectangle_instance_spec.rb +1 -1
- data/spec/models/draw_rectangle_request_spec.rb +1 -1
- data/spec/models/draw_text_instance_spec.rb +1 -1
- data/spec/models/draw_text_request_spec.rb +1 -1
- data/spec/models/face_compare_response_spec.rb +5 -5
- data/spec/models/face_locate_response_spec.rb +1 -1
- data/spec/models/face_locate_with_landmarks_response_spec.rb +5 -5
- data/spec/models/face_match_spec.rb +1 -1
- data/spec/models/face_point_spec.rb +1 -1
- data/spec/models/face_spec.rb +1 -1
- data/spec/models/face_with_landmarks_spec.rb +14 -14
- data/spec/models/find_symbol_result_spec.rb +66 -0
- data/spec/models/fine_text_detection_result_spec.rb +1 -1
- data/spec/models/fine_text_item_spec.rb +1 -1
- data/spec/models/gender_detection_result_spec.rb +54 -0
- data/spec/models/image_description_response_spec.rb +1 -1
- data/spec/models/nsfw_result_spec.rb +1 -1
- data/spec/models/object_detection_result_spec.rb +1 -1
- data/spec/models/person_with_age_spec.rb +7 -1
- data/spec/models/person_with_gender_spec.rb +54 -0
- data/spec/models/polygon_point_spec.rb +1 -1
- data/spec/models/recognition_outcome_spec.rb +1 -1
- data/spec/models/text_detection_result_spec.rb +1 -1
- data/spec/models/text_item_spec.rb +1 -1
- data/spec/models/vehicle_license_plate_detection_result_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +36 -16
@@ -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:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -15,20 +15,24 @@ require 'date'
|
|
15
15
|
module CloudmersiveImageRecognitionApiClient
|
16
16
|
# License plate found in the image
|
17
17
|
class DetectedLicensePlate
|
18
|
+
# Text from the license plate, highest-confidence result
|
19
|
+
attr_accessor :license_plate_text_best_match
|
20
|
+
|
21
|
+
# Alternate text from the license plate, based on second-highest-confidence result
|
22
|
+
attr_accessor :license_plate_text_runner_up
|
23
|
+
|
24
|
+
# X location of the left edge of the license plate, starting from the left edge of the photo (X = 0)
|
18
25
|
attr_accessor :location_x
|
19
26
|
|
27
|
+
# Y location of the top edge of the license plate, starting from the top edge of the photo (Y = 0)
|
20
28
|
attr_accessor :location_y
|
21
29
|
|
30
|
+
# Width of the license plate's location in pixels
|
22
31
|
attr_accessor :width
|
23
32
|
|
33
|
+
# Height of the license plate's location in pixels
|
24
34
|
attr_accessor :height
|
25
35
|
|
26
|
-
# Text from the license plate, highest-confidence result
|
27
|
-
attr_accessor :license_plate_text_best_match
|
28
|
-
|
29
|
-
# Alternate text from the license plate, based on second-highest-confidence result
|
30
|
-
attr_accessor :license_plate_text_runner_up
|
31
|
-
|
32
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
|
33
37
|
attr_accessor :license_plate_recognition_confidence_level
|
34
38
|
|
@@ -36,12 +40,12 @@ module CloudmersiveImageRecognitionApiClient
|
|
36
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
37
41
|
def self.attribute_map
|
38
42
|
{
|
43
|
+
:'license_plate_text_best_match' => :'LicensePlateText_BestMatch',
|
44
|
+
:'license_plate_text_runner_up' => :'LicensePlateText_RunnerUp',
|
39
45
|
:'location_x' => :'LocationX',
|
40
46
|
:'location_y' => :'LocationY',
|
41
47
|
:'width' => :'Width',
|
42
48
|
:'height' => :'Height',
|
43
|
-
:'license_plate_text_best_match' => :'LicensePlateText_BestMatch',
|
44
|
-
:'license_plate_text_runner_up' => :'LicensePlateText_RunnerUp',
|
45
49
|
:'license_plate_recognition_confidence_level' => :'LicensePlateRecognitionConfidenceLevel'
|
46
50
|
}
|
47
51
|
end
|
@@ -49,12 +53,12 @@ module CloudmersiveImageRecognitionApiClient
|
|
49
53
|
# Attribute type mapping.
|
50
54
|
def self.swagger_types
|
51
55
|
{
|
56
|
+
:'license_plate_text_best_match' => :'String',
|
57
|
+
:'license_plate_text_runner_up' => :'String',
|
52
58
|
:'location_x' => :'Integer',
|
53
59
|
:'location_y' => :'Integer',
|
54
60
|
:'width' => :'Integer',
|
55
61
|
:'height' => :'Integer',
|
56
|
-
:'license_plate_text_best_match' => :'String',
|
57
|
-
:'license_plate_text_runner_up' => :'String',
|
58
62
|
:'license_plate_recognition_confidence_level' => :'Float'
|
59
63
|
}
|
60
64
|
end
|
@@ -67,6 +71,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
67
71
|
# convert string to symbol for hash key
|
68
72
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
69
73
|
|
74
|
+
if attributes.has_key?(:'LicensePlateText_BestMatch')
|
75
|
+
self.license_plate_text_best_match = attributes[:'LicensePlateText_BestMatch']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.has_key?(:'LicensePlateText_RunnerUp')
|
79
|
+
self.license_plate_text_runner_up = attributes[:'LicensePlateText_RunnerUp']
|
80
|
+
end
|
81
|
+
|
70
82
|
if attributes.has_key?(:'LocationX')
|
71
83
|
self.location_x = attributes[:'LocationX']
|
72
84
|
end
|
@@ -83,14 +95,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
83
95
|
self.height = attributes[:'Height']
|
84
96
|
end
|
85
97
|
|
86
|
-
if attributes.has_key?(:'LicensePlateText_BestMatch')
|
87
|
-
self.license_plate_text_best_match = attributes[:'LicensePlateText_BestMatch']
|
88
|
-
end
|
89
|
-
|
90
|
-
if attributes.has_key?(:'LicensePlateText_RunnerUp')
|
91
|
-
self.license_plate_text_runner_up = attributes[:'LicensePlateText_RunnerUp']
|
92
|
-
end
|
93
|
-
|
94
98
|
if attributes.has_key?(:'LicensePlateRecognitionConfidenceLevel')
|
95
99
|
self.license_plate_recognition_confidence_level = attributes[:'LicensePlateRecognitionConfidenceLevel']
|
96
100
|
end
|
@@ -115,12 +119,12 @@ module CloudmersiveImageRecognitionApiClient
|
|
115
119
|
def ==(o)
|
116
120
|
return true if self.equal?(o)
|
117
121
|
self.class == o.class &&
|
122
|
+
license_plate_text_best_match == o.license_plate_text_best_match &&
|
123
|
+
license_plate_text_runner_up == o.license_plate_text_runner_up &&
|
118
124
|
location_x == o.location_x &&
|
119
125
|
location_y == o.location_y &&
|
120
126
|
width == o.width &&
|
121
127
|
height == o.height &&
|
122
|
-
license_plate_text_best_match == o.license_plate_text_best_match &&
|
123
|
-
license_plate_text_runner_up == o.license_plate_text_runner_up &&
|
124
128
|
license_plate_recognition_confidence_level == o.license_plate_recognition_confidence_level
|
125
129
|
end
|
126
130
|
|
@@ -133,7 +137,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
133
137
|
# Calculates hash code according to all attributes.
|
134
138
|
# @return [Fixnum] Hash code
|
135
139
|
def hash
|
136
|
-
[location_x, location_y, width, height,
|
140
|
+
[license_plate_text_best_match, license_plate_text_runner_up, location_x, location_y, width, height, license_plate_recognition_confidence_level].hash
|
137
141
|
end
|
138
142
|
|
139
143
|
# Builds the object from hash
|
@@ -0,0 +1,201 @@
|
|
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.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module CloudmersiveImageRecognitionApiClient
|
16
|
+
# Result of performing a get dominant color operation
|
17
|
+
class DominantColorResult
|
18
|
+
# True if the operation was successful, false otherwise
|
19
|
+
attr_accessor :successful
|
20
|
+
|
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
|
+
attr_accessor :dominant_colors
|
23
|
+
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'successful' => :'Successful',
|
29
|
+
:'dominant_colors' => :'DominantColors'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.swagger_types
|
35
|
+
{
|
36
|
+
:'successful' => :'BOOLEAN',
|
37
|
+
:'dominant_colors' => :'Array<ColorResult>'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Initializes the object
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
+
def initialize(attributes = {})
|
44
|
+
return unless attributes.is_a?(Hash)
|
45
|
+
|
46
|
+
# convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
48
|
+
|
49
|
+
if attributes.has_key?(:'Successful')
|
50
|
+
self.successful = attributes[:'Successful']
|
51
|
+
end
|
52
|
+
|
53
|
+
if attributes.has_key?(:'DominantColors')
|
54
|
+
if (value = attributes[:'DominantColors']).is_a?(Array)
|
55
|
+
self.dominant_colors = value
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
62
|
+
# @return Array for valid properties with the reasons
|
63
|
+
def list_invalid_properties
|
64
|
+
invalid_properties = Array.new
|
65
|
+
return invalid_properties
|
66
|
+
end
|
67
|
+
|
68
|
+
# Check to see if the all the properties in the model are valid
|
69
|
+
# @return true if the model is valid
|
70
|
+
def valid?
|
71
|
+
return true
|
72
|
+
end
|
73
|
+
|
74
|
+
# Checks equality by comparing each attribute.
|
75
|
+
# @param [Object] Object to be compared
|
76
|
+
def ==(o)
|
77
|
+
return true if self.equal?(o)
|
78
|
+
self.class == o.class &&
|
79
|
+
successful == o.successful &&
|
80
|
+
dominant_colors == o.dominant_colors
|
81
|
+
end
|
82
|
+
|
83
|
+
# @see the `==` method
|
84
|
+
# @param [Object] Object to be compared
|
85
|
+
def eql?(o)
|
86
|
+
self == o
|
87
|
+
end
|
88
|
+
|
89
|
+
# Calculates hash code according to all attributes.
|
90
|
+
# @return [Fixnum] Hash code
|
91
|
+
def hash
|
92
|
+
[successful, dominant_colors].hash
|
93
|
+
end
|
94
|
+
|
95
|
+
# Builds the object from hash
|
96
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
97
|
+
# @return [Object] Returns the model itself
|
98
|
+
def build_from_hash(attributes)
|
99
|
+
return nil unless attributes.is_a?(Hash)
|
100
|
+
self.class.swagger_types.each_pair do |key, type|
|
101
|
+
if type =~ /\AArray<(.*)>/i
|
102
|
+
# check to ensure the input is an array given that the the attribute
|
103
|
+
# is documented as an array but the input is not
|
104
|
+
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) } )
|
106
|
+
end
|
107
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
108
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
109
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
110
|
+
end
|
111
|
+
|
112
|
+
self
|
113
|
+
end
|
114
|
+
|
115
|
+
# Deserializes the data based on type
|
116
|
+
# @param string type Data type
|
117
|
+
# @param string value Value to be deserialized
|
118
|
+
# @return [Object] Deserialized data
|
119
|
+
def _deserialize(type, value)
|
120
|
+
case type.to_sym
|
121
|
+
when :DateTime
|
122
|
+
DateTime.parse(value)
|
123
|
+
when :Date
|
124
|
+
Date.parse(value)
|
125
|
+
when :String
|
126
|
+
value.to_s
|
127
|
+
when :Integer
|
128
|
+
value.to_i
|
129
|
+
when :Float
|
130
|
+
value.to_f
|
131
|
+
when :BOOLEAN
|
132
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
133
|
+
true
|
134
|
+
else
|
135
|
+
false
|
136
|
+
end
|
137
|
+
when :Object
|
138
|
+
# generic object (usually a Hash), return directly
|
139
|
+
value
|
140
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
141
|
+
inner_type = Regexp.last_match[:inner_type]
|
142
|
+
value.map { |v| _deserialize(inner_type, v) }
|
143
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
144
|
+
k_type = Regexp.last_match[:k_type]
|
145
|
+
v_type = Regexp.last_match[:v_type]
|
146
|
+
{}.tap do |hash|
|
147
|
+
value.each do |k, v|
|
148
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
else # model
|
152
|
+
temp_model = CloudmersiveImageRecognitionApiClient.const_get(type).new
|
153
|
+
temp_model.build_from_hash(value)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
# Returns the string representation of the object
|
158
|
+
# @return [String] String presentation of the object
|
159
|
+
def to_s
|
160
|
+
to_hash.to_s
|
161
|
+
end
|
162
|
+
|
163
|
+
# to_body is an alias to to_hash (backward compatibility)
|
164
|
+
# @return [Hash] Returns the object in the form of hash
|
165
|
+
def to_body
|
166
|
+
to_hash
|
167
|
+
end
|
168
|
+
|
169
|
+
# Returns the object in the form of hash
|
170
|
+
# @return [Hash] Returns the object in the form of hash
|
171
|
+
def to_hash
|
172
|
+
hash = {}
|
173
|
+
self.class.attribute_map.each_pair do |attr, param|
|
174
|
+
value = self.send(attr)
|
175
|
+
next if value.nil?
|
176
|
+
hash[param] = _to_hash(value)
|
177
|
+
end
|
178
|
+
hash
|
179
|
+
end
|
180
|
+
|
181
|
+
# Outputs non-array value in the form of hash
|
182
|
+
# For object, use to_hash. Otherwise, just return the value
|
183
|
+
# @param [Object] value Any valid value
|
184
|
+
# @return [Hash] Returns the value in the form of hash
|
185
|
+
def _to_hash(value)
|
186
|
+
if value.is_a?(Array)
|
187
|
+
value.compact.map{ |v| _to_hash(v) }
|
188
|
+
elsif value.is_a?(Hash)
|
189
|
+
{}.tap do |hash|
|
190
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
191
|
+
end
|
192
|
+
elsif value.respond_to? :to_hash
|
193
|
+
value.to_hash
|
194
|
+
else
|
195
|
+
value
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
end
|
200
|
+
|
201
|
+
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:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -15,8 +15,6 @@ require 'date'
|
|
15
15
|
module CloudmersiveImageRecognitionApiClient
|
16
16
|
# Results of comparing/matching faces in an image
|
17
17
|
class FaceCompareResponse
|
18
|
-
attr_accessor :error_details
|
19
|
-
|
20
18
|
# True if the operation was successful, false otherwise
|
21
19
|
attr_accessor :successful
|
22
20
|
|
@@ -26,24 +24,27 @@ module CloudmersiveImageRecognitionApiClient
|
|
26
24
|
# Number of faces found in the image
|
27
25
|
attr_accessor :face_count
|
28
26
|
|
27
|
+
# Details of any errors that occurred
|
28
|
+
attr_accessor :error_details
|
29
|
+
|
29
30
|
|
30
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
32
|
def self.attribute_map
|
32
33
|
{
|
33
|
-
:'error_details' => :'ErrorDetails',
|
34
34
|
:'successful' => :'Successful',
|
35
35
|
:'faces' => :'Faces',
|
36
|
-
:'face_count' => :'FaceCount'
|
36
|
+
:'face_count' => :'FaceCount',
|
37
|
+
:'error_details' => :'ErrorDetails'
|
37
38
|
}
|
38
39
|
end
|
39
40
|
|
40
41
|
# Attribute type mapping.
|
41
42
|
def self.swagger_types
|
42
43
|
{
|
43
|
-
:'error_details' => :'String',
|
44
44
|
:'successful' => :'BOOLEAN',
|
45
45
|
:'faces' => :'Array<FaceMatch>',
|
46
|
-
:'face_count' => :'Integer'
|
46
|
+
:'face_count' => :'Integer',
|
47
|
+
:'error_details' => :'String'
|
47
48
|
}
|
48
49
|
end
|
49
50
|
|
@@ -55,10 +56,6 @@ module CloudmersiveImageRecognitionApiClient
|
|
55
56
|
# convert string to symbol for hash key
|
56
57
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
57
58
|
|
58
|
-
if attributes.has_key?(:'ErrorDetails')
|
59
|
-
self.error_details = attributes[:'ErrorDetails']
|
60
|
-
end
|
61
|
-
|
62
59
|
if attributes.has_key?(:'Successful')
|
63
60
|
self.successful = attributes[:'Successful']
|
64
61
|
end
|
@@ -73,6 +70,10 @@ module CloudmersiveImageRecognitionApiClient
|
|
73
70
|
self.face_count = attributes[:'FaceCount']
|
74
71
|
end
|
75
72
|
|
73
|
+
if attributes.has_key?(:'ErrorDetails')
|
74
|
+
self.error_details = attributes[:'ErrorDetails']
|
75
|
+
end
|
76
|
+
|
76
77
|
end
|
77
78
|
|
78
79
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -93,10 +94,10 @@ module CloudmersiveImageRecognitionApiClient
|
|
93
94
|
def ==(o)
|
94
95
|
return true if self.equal?(o)
|
95
96
|
self.class == o.class &&
|
96
|
-
error_details == o.error_details &&
|
97
97
|
successful == o.successful &&
|
98
98
|
faces == o.faces &&
|
99
|
-
face_count == o.face_count
|
99
|
+
face_count == o.face_count &&
|
100
|
+
error_details == o.error_details
|
100
101
|
end
|
101
102
|
|
102
103
|
# @see the `==` method
|
@@ -108,7 +109,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
108
109
|
# Calculates hash code according to all attributes.
|
109
110
|
# @return [Fixnum] Hash code
|
110
111
|
def hash
|
111
|
-
[
|
112
|
+
[successful, faces, face_count, error_details].hash
|
112
113
|
end
|
113
114
|
|
114
115
|
# Builds the object from hash
|