aspose_imaging_cloud 20.5 → 20.12

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 (22) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -7
  3. data/lib/aspose-imaging-cloud.rb +5 -4
  4. data/lib/aspose-imaging-cloud/api/imaging_api.rb +34 -27
  5. data/lib/aspose-imaging-cloud/api_client.rb +5 -5
  6. data/lib/aspose-imaging-cloud/configuration.rb +6 -6
  7. data/lib/aspose-imaging-cloud/models/available_labels_list.rb +204 -0
  8. data/lib/aspose-imaging-cloud/models/detected_object_list.rb +3 -3
  9. data/lib/aspose-imaging-cloud/models/dicom_properties.rb +4 -64
  10. data/lib/aspose-imaging-cloud/models/eps_properties.rb +241 -0
  11. data/lib/aspose-imaging-cloud/models/imaging_response.rb +11 -1
  12. data/lib/aspose-imaging-cloud/models/requests/{save_image_as_request.rb → convert_image_request.rb} +7 -7
  13. data/lib/aspose-imaging-cloud/models/requests/{create_saved_image_as_request.rb → create_converted_image_request.rb} +7 -7
  14. data/lib/aspose-imaging-cloud/models/requests/create_image_frame_range_request.rb +1 -1
  15. data/lib/aspose-imaging-cloud/models/requests/create_object_bounds_request.rb +7 -1
  16. data/lib/aspose-imaging-cloud/models/requests/create_visual_object_bounds_request.rb +7 -1
  17. data/lib/aspose-imaging-cloud/models/requests/{object_bounds_request.rb → get_available_labels_request.rb} +9 -28
  18. data/lib/aspose-imaging-cloud/models/requests/get_object_bounds_request.rb +7 -1
  19. data/lib/aspose-imaging-cloud/models/requests/get_visual_object_bounds_request.rb +7 -1
  20. data/lib/aspose-imaging-cloud/models/requests/upload_file_request.rb +1 -0
  21. metadata +9 -7
  22. data/lib/aspose-imaging-cloud/models/requests/visual_object_bounds_request.rb +0 -94
@@ -35,7 +35,7 @@ module AsposeImagingCloud
35
35
  # Attribute mapping from ruby-style variable name to JSON key.
36
36
  def self.attribute_map
37
37
  {
38
- :'detected_objects' => :'DetectedObjects'
38
+ :'detected_objects' => :'detectedObjects'
39
39
  }
40
40
  end
41
41
 
@@ -54,8 +54,8 @@ module AsposeImagingCloud
54
54
  # convert string to symbol for hash key
55
55
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
56
 
57
- if attributes.has_key?(:'DetectedObjects')
58
- if (value = attributes[:'DetectedObjects']).is_a?(Array)
57
+ if attributes.has_key?(:'detectedObjects')
58
+ if (value = attributes[:'detectedObjects']).is_a?(Array)
59
59
  self.detected_objects = value
60
60
  end
61
61
  end
@@ -59,12 +59,6 @@ module AsposeImagingCloud
59
59
  # Gets or sets the photo interpretation.
60
60
  attr_accessor :photo_interpretation
61
61
 
62
- # Gets or sets a value indicating whether width tag found.
63
- attr_accessor :width_tag_found
64
-
65
- # Gets or sets a value indicating whether height tag found.
66
- attr_accessor :height_tag_found
67
-
68
62
  # Gets or sets the width.
69
63
  attr_accessor :width
70
64
 
@@ -89,18 +83,12 @@ module AsposeImagingCloud
89
83
  # Gets or sets the number of frames.
90
84
  attr_accessor :number_of_frames
91
85
 
92
- # Gets or sets the length of element.
93
- attr_accessor :length_value
94
-
95
86
  # Indicates if DICOM image has little endian byte order.
96
87
  attr_accessor :is_little_endian
97
88
 
98
89
  # Gets or sets the offset.
99
90
  attr_accessor :offset
100
91
 
101
- # Gets or sets a value indicating whether \"DICOM\" data is found.
102
- attr_accessor :dicom_found
103
-
104
92
  # Attribute mapping from ruby-style variable name to JSON key.
105
93
  def self.attribute_map
106
94
  {
@@ -114,8 +102,6 @@ module AsposeImagingCloud
114
102
  :'samples_per_pixel' => :'SamplesPerPixel',
115
103
  :'bits_allocated' => :'BitsAllocated',
116
104
  :'photo_interpretation' => :'PhotoInterpretation',
117
- :'width_tag_found' => :'WidthTagFound',
118
- :'height_tag_found' => :'HeightTagFound',
119
105
  :'width' => :'Width',
120
106
  :'height' => :'Height',
121
107
  :'window_centre' => :'WindowCentre',
@@ -124,10 +110,8 @@ module AsposeImagingCloud
124
110
  :'rescale_intercept' => :'RescaleIntercept',
125
111
  :'rescale_slope' => :'RescaleSlope',
126
112
  :'number_of_frames' => :'NumberOfFrames',
127
- :'length_value' => :'LengthValue',
128
113
  :'is_little_endian' => :'IsLittleEndian',
129
- :'offset' => :'Offset',
130
- :'dicom_found' => :'DicomFound'
114
+ :'offset' => :'Offset'
131
115
  }
132
116
  end
133
117
 
@@ -144,8 +128,6 @@ module AsposeImagingCloud
144
128
  :'samples_per_pixel' => :'Integer',
145
129
  :'bits_allocated' => :'Integer',
146
130
  :'photo_interpretation' => :'String',
147
- :'width_tag_found' => :'BOOLEAN',
148
- :'height_tag_found' => :'BOOLEAN',
149
131
  :'width' => :'Integer',
150
132
  :'height' => :'Integer',
151
133
  :'window_centre' => :'Float',
@@ -154,10 +136,8 @@ module AsposeImagingCloud
154
136
  :'rescale_intercept' => :'Float',
155
137
  :'rescale_slope' => :'Float',
156
138
  :'number_of_frames' => :'Integer',
157
- :'length_value' => :'Integer',
158
139
  :'is_little_endian' => :'BOOLEAN',
159
- :'offset' => :'Integer',
160
- :'dicom_found' => :'BOOLEAN'
140
+ :'offset' => :'Integer'
161
141
  }
162
142
  end
163
143
 
@@ -211,14 +191,6 @@ module AsposeImagingCloud
211
191
  self.photo_interpretation = attributes[:'PhotoInterpretation']
212
192
  end
213
193
 
214
- if attributes.has_key?(:'WidthTagFound')
215
- self.width_tag_found = attributes[:'WidthTagFound']
216
- end
217
-
218
- if attributes.has_key?(:'HeightTagFound')
219
- self.height_tag_found = attributes[:'HeightTagFound']
220
- end
221
-
222
194
  if attributes.has_key?(:'Width')
223
195
  self.width = attributes[:'Width']
224
196
  end
@@ -251,10 +223,6 @@ module AsposeImagingCloud
251
223
  self.number_of_frames = attributes[:'NumberOfFrames']
252
224
  end
253
225
 
254
- if attributes.has_key?(:'LengthValue')
255
- self.length_value = attributes[:'LengthValue']
256
- end
257
-
258
226
  if attributes.has_key?(:'IsLittleEndian')
259
227
  self.is_little_endian = attributes[:'IsLittleEndian']
260
228
  end
@@ -262,10 +230,6 @@ module AsposeImagingCloud
262
230
  if attributes.has_key?(:'Offset')
263
231
  self.offset = attributes[:'Offset']
264
232
  end
265
-
266
- if attributes.has_key?(:'DicomFound')
267
- self.dicom_found = attributes[:'DicomFound']
268
- end
269
233
  end
270
234
 
271
235
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -304,14 +268,6 @@ module AsposeImagingCloud
304
268
  invalid_properties.push('invalid value for "bits_allocated", bits_allocated cannot be nil.')
305
269
  end
306
270
 
307
- if @width_tag_found.nil?
308
- invalid_properties.push('invalid value for "width_tag_found", width_tag_found cannot be nil.')
309
- end
310
-
311
- if @height_tag_found.nil?
312
- invalid_properties.push('invalid value for "height_tag_found", height_tag_found cannot be nil.')
313
- end
314
-
315
271
  if @width.nil?
316
272
  invalid_properties.push('invalid value for "width", width cannot be nil.')
317
273
  end
@@ -344,10 +300,6 @@ module AsposeImagingCloud
344
300
  invalid_properties.push('invalid value for "number_of_frames", number_of_frames cannot be nil.')
345
301
  end
346
302
 
347
- if @length_value.nil?
348
- invalid_properties.push('invalid value for "length_value", length_value cannot be nil.')
349
- end
350
-
351
303
  if @is_little_endian.nil?
352
304
  invalid_properties.push('invalid value for "is_little_endian", is_little_endian cannot be nil.')
353
305
  end
@@ -356,10 +308,6 @@ module AsposeImagingCloud
356
308
  invalid_properties.push('invalid value for "offset", offset cannot be nil.')
357
309
  end
358
310
 
359
- if @dicom_found.nil?
360
- invalid_properties.push('invalid value for "dicom_found", dicom_found cannot be nil.')
361
- end
362
-
363
311
  invalid_properties
364
312
  end
365
313
 
@@ -374,8 +322,6 @@ module AsposeImagingCloud
374
322
  return false if @signed_image.nil?
375
323
  return false if @samples_per_pixel.nil?
376
324
  return false if @bits_allocated.nil?
377
- return false if @width_tag_found.nil?
378
- return false if @height_tag_found.nil?
379
325
  return false if @width.nil?
380
326
  return false if @height.nil?
381
327
  return false if @window_centre.nil?
@@ -384,10 +330,8 @@ module AsposeImagingCloud
384
330
  return false if @rescale_intercept.nil?
385
331
  return false if @rescale_slope.nil?
386
332
  return false if @number_of_frames.nil?
387
- return false if @length_value.nil?
388
333
  return false if @is_little_endian.nil?
389
334
  return false if @offset.nil?
390
- return false if @dicom_found.nil?
391
335
  true
392
336
  end
393
337
 
@@ -446,8 +390,6 @@ module AsposeImagingCloud
446
390
  samples_per_pixel == o.samples_per_pixel &&
447
391
  bits_allocated == o.bits_allocated &&
448
392
  photo_interpretation == o.photo_interpretation &&
449
- width_tag_found == o.width_tag_found &&
450
- height_tag_found == o.height_tag_found &&
451
393
  width == o.width &&
452
394
  height == o.height &&
453
395
  window_centre == o.window_centre &&
@@ -456,10 +398,8 @@ module AsposeImagingCloud
456
398
  rescale_intercept == o.rescale_intercept &&
457
399
  rescale_slope == o.rescale_slope &&
458
400
  number_of_frames == o.number_of_frames &&
459
- length_value == o.length_value &&
460
401
  is_little_endian == o.is_little_endian &&
461
- offset == o.offset &&
462
- dicom_found == o.dicom_found
402
+ offset == o.offset
463
403
  end
464
404
 
465
405
  # @see the `==` method
@@ -471,7 +411,7 @@ module AsposeImagingCloud
471
411
  # Calculates hash code according to all attributes.
472
412
  # @return [Fixnum] Hash code
473
413
  def hash
474
- [planar_configuration, reds, greens, blues, dicom_header_info_by_bytes, signed_image, dicom_info, samples_per_pixel, bits_allocated, photo_interpretation, width_tag_found, height_tag_found, width, height, window_centre, window_width, pixel_representation, rescale_intercept, rescale_slope, number_of_frames, length_value, is_little_endian, offset, dicom_found].hash
414
+ [planar_configuration, reds, greens, blues, dicom_header_info_by_bytes, signed_image, dicom_info, samples_per_pixel, bits_allocated, photo_interpretation, width, height, window_centre, window_width, pixel_representation, rescale_intercept, rescale_slope, number_of_frames, is_little_endian, offset].hash
475
415
  end
476
416
 
477
417
  # Builds the object from hash
@@ -0,0 +1,241 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="eps_properties.rb">
3
+ # Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
4
+ # </copyright>
5
+ # <summary>
6
+ # Permission is hereby granted, free of charge, to any person obtaining a
7
+ # copy of this software and associated documentation files (the "Software"),
8
+ # to deal in the Software without restriction, including without limitation
9
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
+ # and/or sell copies of the Software, and to permit persons to whom the
11
+ # Software is furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in
14
+ # all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
+ # DEALINGS IN THE SOFTWARE.
23
+ # </summary>
24
+ # ----------------------------------------------------------------------------
25
+
26
+
27
+ require 'date'
28
+
29
+ module AsposeImagingCloud
30
+ class EpsProperties
31
+ # Gets the BoundingBox.
32
+ attr_accessor :bounding_box_string
33
+
34
+ # Gets the CreationDate.
35
+ attr_accessor :creation_date_string
36
+
37
+ # Gets the Creator.
38
+ attr_accessor :creator
39
+
40
+ # Gets the PostScript version.
41
+ attr_accessor :post_script_version
42
+
43
+ # Gets the Title.
44
+ attr_accessor :title
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'bounding_box_string' => :'BoundingBoxString',
50
+ :'creation_date_string' => :'CreationDateString',
51
+ :'creator' => :'Creator',
52
+ :'post_script_version' => :'PostScriptVersion',
53
+ :'title' => :'Title'
54
+ }
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.swagger_types
59
+ {
60
+ :'bounding_box_string' => :'String',
61
+ :'creation_date_string' => :'String',
62
+ :'creator' => :'String',
63
+ :'post_script_version' => :'String',
64
+ :'title' => :'String'
65
+ }
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ return unless attributes.is_a?(Hash)
72
+
73
+ # convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
75
+
76
+ if attributes.has_key?(:'BoundingBoxString')
77
+ self.bounding_box_string = attributes[:'BoundingBoxString']
78
+ end
79
+
80
+ if attributes.has_key?(:'CreationDateString')
81
+ self.creation_date_string = attributes[:'CreationDateString']
82
+ end
83
+
84
+ if attributes.has_key?(:'Creator')
85
+ self.creator = attributes[:'Creator']
86
+ end
87
+
88
+ if attributes.has_key?(:'PostScriptVersion')
89
+ self.post_script_version = attributes[:'PostScriptVersion']
90
+ end
91
+
92
+ if attributes.has_key?(:'Title')
93
+ self.title = attributes[:'Title']
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ invalid_properties = Array.new
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ bounding_box_string == o.bounding_box_string &&
116
+ creation_date_string == o.creation_date_string &&
117
+ creator == o.creator &&
118
+ post_script_version == o.post_script_version &&
119
+ title == o.title
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Fixnum] Hash code
130
+ def hash
131
+ [bounding_box_string, creation_date_string, creator, post_script_version, title].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ self.class.swagger_types.each_pair do |key, type|
140
+ attribute_key = self.class.attribute_map[key]
141
+ attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
142
+ if type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the the attribute
144
+ # is documented as an array but the input is not
145
+ if attributes[attribute_key].is_a?(Array)
146
+ self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
147
+ end
148
+ elsif !attributes[attribute_key].nil?
149
+ self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
150
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
151
+ end
152
+
153
+ self
154
+ end
155
+
156
+ # Deserializes the data based on type
157
+ # @param string type Data type
158
+ # @param string value Value to be deserialized
159
+ # @return [Object] Deserialized data
160
+ def _deserialize(type, value)
161
+ case type.to_sym
162
+ when :DateTime
163
+ DateTime.parse(value)
164
+ when :Date
165
+ Date.parse(value)
166
+ when :String
167
+ value.to_s
168
+ when :Integer
169
+ value.to_i
170
+ when :Float
171
+ value.to_f
172
+ when :BOOLEAN
173
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
174
+ true
175
+ else
176
+ false
177
+ end
178
+ when :Object
179
+ # generic object (usually a Hash), return directly
180
+ value
181
+ when /\AArray<(?<inner_type>.+)>\z/
182
+ inner_type = Regexp.last_match[:inner_type]
183
+ value.map { |v| _deserialize(inner_type, v) }
184
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
185
+ k_type = Regexp.last_match[:k_type]
186
+ v_type = Regexp.last_match[:v_type]
187
+ {}.tap do |hash|
188
+ value.each do |k, v|
189
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
190
+ end
191
+ end
192
+ else # model
193
+ temp_model = AsposeImagingCloud.const_get(type).new
194
+ temp_model.build_from_hash(value)
195
+ end
196
+ end
197
+
198
+ # Returns the string representation of the object
199
+ # @return [String] String presentation of the object
200
+ def to_s
201
+ to_hash.to_s
202
+ end
203
+
204
+ # to_body is an alias to to_hash (backward compatibility)
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_body
207
+ to_hash
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ next if value.nil?
217
+ hash[param] = _to_hash(value)
218
+ end
219
+ hash
220
+ end
221
+
222
+ # Outputs non-array value in the form of hash
223
+ # For object, use to_hash. Otherwise, just return the value
224
+ # @param [Object] value Any valid value
225
+ # @return [Hash] Returns the value in the form of hash
226
+ def _to_hash(value)
227
+ if value.is_a?(Array)
228
+ value.compact.map { |v| _to_hash(v) }
229
+ elsif value.is_a?(Hash)
230
+ {}.tap do |hash|
231
+ value.each { |k, v| hash[k] = _to_hash(v) }
232
+ end
233
+ elsif value.respond_to? :to_hash
234
+ value.to_hash
235
+ else
236
+ value
237
+ end
238
+ end
239
+
240
+ end
241
+ end