cloudmersive-image-recognition-api-client 1.4.6 → 2.0.5

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 (127) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +17 -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 +147 -11
  10. data/docs/FaceApi.md +8 -8
  11. data/docs/FilterApi.md +8 -8
  12. data/docs/ImageSimilarityComparisonResponse.md +10 -0
  13. data/docs/ImageSimilarityHashDistanceRequest.md +9 -0
  14. data/docs/ImageSimilarityHashDistanceResponse.md +9 -0
  15. data/docs/ImageSimilarityHashResponse.md +9 -0
  16. data/docs/InfoApi.md +2 -2
  17. data/docs/NsfwApi.md +1 -1
  18. data/docs/RecognizeApi.md +187 -11
  19. data/docs/ResizeApi.md +4 -4
  20. data/docs/TextGenerationApi.md +63 -0
  21. data/lib/cloudmersive-image-recognition-api-client.rb +7 -1
  22. data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +6 -7
  23. data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +30 -37
  24. data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +199 -58
  25. data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +31 -38
  26. data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +34 -42
  27. data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +10 -12
  28. data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +6 -7
  29. data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +214 -45
  30. data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +14 -16
  31. data/lib/cloudmersive-image-recognition-api-client/api/text_generation_api.rb +77 -0
  32. data/lib/cloudmersive-image-recognition-api-client/api_client.rb +11 -9
  33. data/lib/cloudmersive-image-recognition-api-client/api_error.rb +1 -1
  34. data/lib/cloudmersive-image-recognition-api-client/configuration.rb +2 -2
  35. data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +7 -10
  36. data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +7 -10
  37. data/lib/cloudmersive-image-recognition-api-client/models/create_handwriting_request.rb +216 -0
  38. data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +7 -10
  39. data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +7 -10
  40. data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +7 -10
  41. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +7 -10
  42. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +9 -13
  43. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +7 -10
  44. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +9 -13
  45. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +8 -11
  46. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +9 -13
  47. data/lib/cloudmersive-image-recognition-api-client/models/face.rb +7 -10
  48. data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +7 -10
  49. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +7 -10
  50. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +7 -10
  51. data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +7 -10
  52. data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +7 -10
  53. data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +7 -10
  54. data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +7 -10
  55. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +7 -10
  56. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +7 -10
  57. data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +7 -10
  58. data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +7 -10
  59. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +7 -10
  60. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata_exif_value.rb +7 -10
  61. data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_comparison_response.rb +206 -0
  62. data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_distance_request.rb +196 -0
  63. data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_distance_response.rb +196 -0
  64. data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_response.rb +196 -0
  65. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +7 -10
  66. data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +7 -10
  67. data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +7 -10
  68. data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +7 -10
  69. data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +7 -10
  70. data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +7 -10
  71. data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +7 -10
  72. data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +7 -10
  73. data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +7 -10
  74. data/lib/cloudmersive-image-recognition-api-client/version.rb +2 -2
  75. data/spec/api/artistic_api_spec.rb +2 -2
  76. data/spec/api/convert_api_spec.rb +8 -8
  77. data/spec/api/edit_api_spec.rb +47 -13
  78. data/spec/api/face_api_spec.rb +8 -8
  79. data/spec/api/filter_api_spec.rb +9 -9
  80. data/spec/api/info_api_spec.rb +3 -3
  81. data/spec/api/nsfw_api_spec.rb +2 -2
  82. data/spec/api/recognize_api_spec.rb +49 -10
  83. data/spec/api/resize_api_spec.rb +5 -5
  84. data/spec/api/text_generation_api_spec.rb +47 -0
  85. data/spec/api_client_spec.rb +52 -35
  86. data/spec/configuration_spec.rb +9 -9
  87. data/spec/models/age_detection_result_spec.rb +4 -5
  88. data/spec/models/color_result_spec.rb +4 -5
  89. data/spec/models/create_handwriting_request_spec.rb +59 -0
  90. data/spec/models/detected_license_plate_spec.rb +8 -9
  91. data/spec/models/detected_object_spec.rb +7 -8
  92. data/spec/models/dominant_color_result_spec.rb +3 -4
  93. data/spec/models/draw_polygon_instance_spec.rb +5 -6
  94. data/spec/models/draw_polygon_request_spec.rb +4 -5
  95. data/spec/models/draw_rectangle_instance_spec.rb +8 -9
  96. data/spec/models/draw_rectangle_request_spec.rb +4 -5
  97. data/spec/models/draw_text_instance_spec.rb +9 -10
  98. data/spec/models/draw_text_request_spec.rb +4 -5
  99. data/spec/models/face_compare_response_spec.rb +5 -6
  100. data/spec/models/face_locate_response_spec.rb +5 -6
  101. data/spec/models/face_locate_with_landmarks_response_spec.rb +5 -6
  102. data/spec/models/face_match_spec.rb +7 -8
  103. data/spec/models/face_point_spec.rb +3 -4
  104. data/spec/models/face_spec.rb +5 -6
  105. data/spec/models/face_with_landmarks_spec.rb +14 -15
  106. data/spec/models/find_symbol_result_spec.rb +7 -8
  107. data/spec/models/fine_text_detection_result_spec.rb +4 -5
  108. data/spec/models/fine_text_item_spec.rb +12 -13
  109. data/spec/models/gender_detection_result_spec.rb +4 -5
  110. data/spec/models/image_description_response_spec.rb +5 -6
  111. data/spec/models/image_metadata_exif_value_spec.rb +4 -5
  112. data/spec/models/image_metadata_spec.rb +11 -12
  113. data/spec/models/image_similarity_comparison_response_spec.rb +53 -0
  114. data/spec/models/image_similarity_hash_distance_request_spec.rb +47 -0
  115. data/spec/models/image_similarity_hash_distance_response_spec.rb +47 -0
  116. data/spec/models/image_similarity_hash_response_spec.rb +47 -0
  117. data/spec/models/nsfw_result_spec.rb +4 -5
  118. data/spec/models/object_detection_result_spec.rb +4 -5
  119. data/spec/models/person_with_age_spec.rb +5 -6
  120. data/spec/models/person_with_gender_spec.rb +4 -5
  121. data/spec/models/polygon_point_spec.rb +3 -4
  122. data/spec/models/recognition_outcome_spec.rb +3 -4
  123. data/spec/models/text_detection_result_spec.rb +4 -5
  124. data/spec/models/text_item_spec.rb +5 -6
  125. data/spec/models/vehicle_license_plate_detection_result_spec.rb +4 -5
  126. data/spec/spec_helper.rb +1 -1
  127. metadata +20 -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
  # Polygons to draw on the image. Polygons are drawn in index order.
25
25
  attr_accessor :polygons_to_draw
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?(:'BaseImageBytes')
55
54
  self.base_image_bytes = attributes[:'BaseImageBytes']
@@ -64,7 +63,6 @@ module CloudmersiveImageRecognitionApiClient
64
63
  self.polygons_to_draw = value
65
64
  end
66
65
  end
67
-
68
66
  end
69
67
 
70
68
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -72,25 +70,24 @@ module CloudmersiveImageRecognitionApiClient
72
70
  def list_invalid_properties
73
71
  invalid_properties = Array.new
74
72
  if !@base_image_bytes.nil? && @base_image_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
75
- invalid_properties.push("invalid value for 'base_image_bytes', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.")
73
+ invalid_properties.push('invalid value for "base_image_bytes", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
76
74
  end
77
75
 
78
- return invalid_properties
76
+ invalid_properties
79
77
  end
80
78
 
81
79
  # Check to see if the all the properties in the model are valid
82
80
  # @return true if the model is valid
83
81
  def valid?
84
82
  return false if !@base_image_bytes.nil? && @base_image_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
85
- return true
83
+ true
86
84
  end
87
85
 
88
86
  # Custom attribute writer method with validation
89
87
  # @param [Object] base_image_bytes Value to be assigned
90
88
  def base_image_bytes=(base_image_bytes)
91
-
92
89
  if !base_image_bytes.nil? && base_image_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
93
- fail ArgumentError, "invalid value for 'base_image_bytes', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/."
90
+ fail ArgumentError, 'invalid value for "base_image_bytes", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
94
91
  end
95
92
 
96
93
  @base_image_bytes = base_image_bytes
@@ -125,10 +122,10 @@ module CloudmersiveImageRecognitionApiClient
125
122
  return nil unless attributes.is_a?(Hash)
126
123
  self.class.swagger_types.each_pair do |key, type|
127
124
  if type =~ /\AArray<(.*)>/i
128
- # check to ensure the input is an array given that the the attribute
125
+ # check to ensure the input is an array given that the attribute
129
126
  # is documented as an array but the input is not
130
127
  if attributes[self.class.attribute_map[key]].is_a?(Array)
131
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
129
  end
133
130
  elsif !attributes[self.class.attribute_map[key]].nil?
134
131
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -210,7 +207,7 @@ module CloudmersiveImageRecognitionApiClient
210
207
  # @return [Hash] Returns the value in the form of hash
211
208
  def _to_hash(value)
212
209
  if value.is_a?(Array)
213
- value.compact.map{ |v| _to_hash(v) }
210
+ value.compact.map { |v| _to_hash(v) }
214
211
  elsif value.is_a?(Hash)
215
212
  {}.tap do |hash|
216
213
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -223,5 +220,4 @@ module CloudmersiveImageRecognitionApiClient
223
220
  end
224
221
 
225
222
  end
226
-
227
223
  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
  # Height in pixels of the rectangle
37
37
  attr_accessor :height
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?(:'BorderColor')
75
74
  self.border_color = attributes[:'BorderColor']
@@ -98,20 +97,19 @@ module CloudmersiveImageRecognitionApiClient
98
97
  if attributes.has_key?(:'Height')
99
98
  self.height = attributes[:'Height']
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
 
@@ -24,7 +24,6 @@ module CloudmersiveImageRecognitionApiClient
24
24
  # Rectangles to draw on the image. Rectangles are drawn in index order.
25
25
  attr_accessor :rectangles_to_draw
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?(:'BaseImageBytes')
55
54
  self.base_image_bytes = attributes[:'BaseImageBytes']
@@ -64,7 +63,6 @@ module CloudmersiveImageRecognitionApiClient
64
63
  self.rectangles_to_draw = value
65
64
  end
66
65
  end
67
-
68
66
  end
69
67
 
70
68
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -72,25 +70,24 @@ module CloudmersiveImageRecognitionApiClient
72
70
  def list_invalid_properties
73
71
  invalid_properties = Array.new
74
72
  if !@base_image_bytes.nil? && @base_image_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
75
- invalid_properties.push("invalid value for 'base_image_bytes', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.")
73
+ invalid_properties.push('invalid value for "base_image_bytes", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
76
74
  end
77
75
 
78
- return invalid_properties
76
+ invalid_properties
79
77
  end
80
78
 
81
79
  # Check to see if the all the properties in the model are valid
82
80
  # @return true if the model is valid
83
81
  def valid?
84
82
  return false if !@base_image_bytes.nil? && @base_image_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
85
- return true
83
+ true
86
84
  end
87
85
 
88
86
  # Custom attribute writer method with validation
89
87
  # @param [Object] base_image_bytes Value to be assigned
90
88
  def base_image_bytes=(base_image_bytes)
91
-
92
89
  if !base_image_bytes.nil? && base_image_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
93
- fail ArgumentError, "invalid value for 'base_image_bytes', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/."
90
+ fail ArgumentError, 'invalid value for "base_image_bytes", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
94
91
  end
95
92
 
96
93
  @base_image_bytes = base_image_bytes
@@ -125,10 +122,10 @@ module CloudmersiveImageRecognitionApiClient
125
122
  return nil unless attributes.is_a?(Hash)
126
123
  self.class.swagger_types.each_pair do |key, type|
127
124
  if type =~ /\AArray<(.*)>/i
128
- # check to ensure the input is an array given that the the attribute
125
+ # check to ensure the input is an array given that the attribute
129
126
  # is documented as an array but the input is not
130
127
  if attributes[self.class.attribute_map[key]].is_a?(Array)
131
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
129
  end
133
130
  elsif !attributes[self.class.attribute_map[key]].nil?
134
131
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -210,7 +207,7 @@ module CloudmersiveImageRecognitionApiClient
210
207
  # @return [Hash] Returns the value in the form of hash
211
208
  def _to_hash(value)
212
209
  if value.is_a?(Array)
213
- value.compact.map{ |v| _to_hash(v) }
210
+ value.compact.map { |v| _to_hash(v) }
214
211
  elsif value.is_a?(Hash)
215
212
  {}.tap do |hash|
216
213
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -223,5 +220,4 @@ module CloudmersiveImageRecognitionApiClient
223
220
  end
224
221
 
225
222
  end
226
-
227
223
  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,7 +18,7 @@ module CloudmersiveImageRecognitionApiClient
18
18
  # Text string to draw
19
19
  attr_accessor :text
20
20
 
21
- # Font Family to use. Leave blank to default to \"Arial\".
21
+ # Font Family to use. Leave blank to default to \"Arial\". Supported fonts including Arial, Calibri, Cambria, Candara, Consolas, Constantia, Corbel, Courier New, Courier Regular, Georgia, Impact Regular, Lucida, Modern Regular, Tahoma, Times New Roman, Verdana
22
22
  attr_accessor :font_family_name
23
23
 
24
24
  # Font size to use.
@@ -39,7 +39,6 @@ module CloudmersiveImageRecognitionApiClient
39
39
  # Height in pixels of the text box to draw the text in; text will wrap inside this box
40
40
  attr_accessor :height
41
41
 
42
-
43
42
  # Attribute mapping from ruby-style variable name to JSON key.
44
43
  def self.attribute_map
45
44
  {
@@ -74,7 +73,7 @@ module CloudmersiveImageRecognitionApiClient
74
73
  return unless attributes.is_a?(Hash)
75
74
 
76
75
  # convert string to symbol for hash key
77
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
76
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
78
77
 
79
78
  if attributes.has_key?(:'Text')
80
79
  self.text = attributes[:'Text']
@@ -107,20 +106,19 @@ module CloudmersiveImageRecognitionApiClient
107
106
  if attributes.has_key?(:'Height')
108
107
  self.height = attributes[:'Height']
109
108
  end
110
-
111
109
  end
112
110
 
113
111
  # Show invalid properties with the reasons. Usually used together with valid?
114
112
  # @return Array for valid properties with the reasons
115
113
  def list_invalid_properties
116
114
  invalid_properties = Array.new
117
- return invalid_properties
115
+ invalid_properties
118
116
  end
119
117
 
120
118
  # Check to see if the all the properties in the model are valid
121
119
  # @return true if the model is valid
122
120
  def valid?
123
- return true
121
+ true
124
122
  end
125
123
 
126
124
  # Checks equality by comparing each attribute.
@@ -157,10 +155,10 @@ module CloudmersiveImageRecognitionApiClient
157
155
  return nil unless attributes.is_a?(Hash)
158
156
  self.class.swagger_types.each_pair do |key, type|
159
157
  if type =~ /\AArray<(.*)>/i
160
- # check to ensure the input is an array given that the the attribute
158
+ # check to ensure the input is an array given that the attribute
161
159
  # is documented as an array but the input is not
162
160
  if attributes[self.class.attribute_map[key]].is_a?(Array)
163
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
161
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
164
162
  end
165
163
  elsif !attributes[self.class.attribute_map[key]].nil?
166
164
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -242,7 +240,7 @@ module CloudmersiveImageRecognitionApiClient
242
240
  # @return [Hash] Returns the value in the form of hash
243
241
  def _to_hash(value)
244
242
  if value.is_a?(Array)
245
- value.compact.map{ |v| _to_hash(v) }
243
+ value.compact.map { |v| _to_hash(v) }
246
244
  elsif value.is_a?(Hash)
247
245
  {}.tap do |hash|
248
246
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -255,5 +253,4 @@ module CloudmersiveImageRecognitionApiClient
255
253
  end
256
254
 
257
255
  end
258
-
259
256
  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
  # One or more pieces of text to draw onto the image
25
25
  attr_accessor :text_to_draw
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?(:'BaseImageBytes')
55
54
  self.base_image_bytes = attributes[:'BaseImageBytes']
@@ -64,7 +63,6 @@ module CloudmersiveImageRecognitionApiClient
64
63
  self.text_to_draw = value
65
64
  end
66
65
  end
67
-
68
66
  end
69
67
 
70
68
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -72,25 +70,24 @@ module CloudmersiveImageRecognitionApiClient
72
70
  def list_invalid_properties
73
71
  invalid_properties = Array.new
74
72
  if !@base_image_bytes.nil? && @base_image_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
75
- invalid_properties.push("invalid value for 'base_image_bytes', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.")
73
+ invalid_properties.push('invalid value for "base_image_bytes", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
76
74
  end
77
75
 
78
- return invalid_properties
76
+ invalid_properties
79
77
  end
80
78
 
81
79
  # Check to see if the all the properties in the model are valid
82
80
  # @return true if the model is valid
83
81
  def valid?
84
82
  return false if !@base_image_bytes.nil? && @base_image_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
85
- return true
83
+ true
86
84
  end
87
85
 
88
86
  # Custom attribute writer method with validation
89
87
  # @param [Object] base_image_bytes Value to be assigned
90
88
  def base_image_bytes=(base_image_bytes)
91
-
92
89
  if !base_image_bytes.nil? && base_image_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
93
- fail ArgumentError, "invalid value for 'base_image_bytes', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/."
90
+ fail ArgumentError, 'invalid value for "base_image_bytes", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
94
91
  end
95
92
 
96
93
  @base_image_bytes = base_image_bytes
@@ -125,10 +122,10 @@ module CloudmersiveImageRecognitionApiClient
125
122
  return nil unless attributes.is_a?(Hash)
126
123
  self.class.swagger_types.each_pair do |key, type|
127
124
  if type =~ /\AArray<(.*)>/i
128
- # check to ensure the input is an array given that the the attribute
125
+ # check to ensure the input is an array given that the attribute
129
126
  # is documented as an array but the input is not
130
127
  if attributes[self.class.attribute_map[key]].is_a?(Array)
131
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
129
  end
133
130
  elsif !attributes[self.class.attribute_map[key]].nil?
134
131
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -210,7 +207,7 @@ module CloudmersiveImageRecognitionApiClient
210
207
  # @return [Hash] Returns the value in the form of hash
211
208
  def _to_hash(value)
212
209
  if value.is_a?(Array)
213
- value.compact.map{ |v| _to_hash(v) }
210
+ value.compact.map { |v| _to_hash(v) }
214
211
  elsif value.is_a?(Hash)
215
212
  {}.tap do |hash|
216
213
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -223,5 +220,4 @@ module CloudmersiveImageRecognitionApiClient
223
220
  end
224
221
 
225
222
  end
226
-
227
223
  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
  # Y coordinate of the bottom side of the face
28
28
  attr_accessor :bottom_y
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?(:'LeftX')
60
59
  self.left_x = attributes[:'LeftX']
@@ -71,20 +70,19 @@ module CloudmersiveImageRecognitionApiClient
71
70
  if attributes.has_key?(:'BottomY')
72
71
  self.bottom_y = attributes[:'BottomY']
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