groupdocs_conversion_cloud 19.4 → 19.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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_conversion_cloud.rb +3 -1
  3. data/lib/groupdocs_conversion_cloud/api/convert_api.rb +218 -0
  4. data/lib/groupdocs_conversion_cloud/api/file_api.rb +1 -1
  5. data/lib/groupdocs_conversion_cloud/api/folder_api.rb +1 -1
  6. data/lib/groupdocs_conversion_cloud/api/{conversion_api.rb → info_api.rb} +51 -40
  7. data/lib/groupdocs_conversion_cloud/models/bmp_convert_options.rb +101 -4
  8. data/lib/groupdocs_conversion_cloud/models/cgm_convert_options.rb +101 -4
  9. data/lib/groupdocs_conversion_cloud/models/dcm_convert_options.rb +101 -4
  10. data/lib/groupdocs_conversion_cloud/models/djvu_convert_options.rb +101 -4
  11. data/lib/groupdocs_conversion_cloud/models/dng_convert_options.rb +101 -4
  12. data/lib/groupdocs_conversion_cloud/models/document_metadata.rb +396 -0
  13. data/lib/groupdocs_conversion_cloud/models/emf_convert_options.rb +101 -4
  14. data/lib/groupdocs_conversion_cloud/models/gif_convert_options.rb +101 -4
  15. data/lib/groupdocs_conversion_cloud/models/ico_convert_options.rb +101 -4
  16. data/lib/groupdocs_conversion_cloud/models/image_convert_options.rb +101 -4
  17. data/lib/groupdocs_conversion_cloud/models/j2c_convert_options.rb +98 -1
  18. data/lib/groupdocs_conversion_cloud/models/j2k_convert_options.rb +98 -1
  19. data/lib/groupdocs_conversion_cloud/models/jp2_convert_options.rb +98 -1
  20. data/lib/groupdocs_conversion_cloud/models/jpeg_convert_options.rb +98 -1
  21. data/lib/groupdocs_conversion_cloud/models/jpf_convert_options.rb +98 -1
  22. data/lib/groupdocs_conversion_cloud/models/jpg_convert_options.rb +98 -1
  23. data/lib/groupdocs_conversion_cloud/models/jpm_convert_options.rb +98 -1
  24. data/lib/groupdocs_conversion_cloud/models/jpx_convert_options.rb +98 -1
  25. data/lib/groupdocs_conversion_cloud/models/odg_convert_options.rb +101 -4
  26. data/lib/groupdocs_conversion_cloud/models/png_convert_options.rb +101 -4
  27. data/lib/groupdocs_conversion_cloud/models/psd_convert_options.rb +77 -1
  28. data/lib/groupdocs_conversion_cloud/models/tif_convert_options.rb +77 -1
  29. data/lib/groupdocs_conversion_cloud/models/tiff_convert_options.rb +77 -1
  30. data/lib/groupdocs_conversion_cloud/models/webp_convert_options.rb +98 -1
  31. data/lib/groupdocs_conversion_cloud/models/wmf_convert_options.rb +101 -4
  32. data/lib/groupdocs_conversion_cloud/version.rb +1 -1
  33. metadata +5 -3
@@ -64,6 +64,39 @@ module GroupDocsConversionCloud
64
64
  # Watermark specific options
65
65
  attr_accessor :watermark_options
66
66
 
67
+ # Adjust image brightness
68
+ attr_accessor :brightness
69
+
70
+ # Adjust image contrast
71
+ attr_accessor :contrast
72
+
73
+ # Adjust image gamma
74
+ attr_accessor :gamma
75
+
76
+ # Image flip mode
77
+ attr_accessor :flip_mode
78
+ class EnumAttributeValidator
79
+ attr_reader :datatype
80
+ attr_reader :allowable_values
81
+
82
+ def initialize(datatype, allowable_values)
83
+ @allowable_values = allowable_values.map do |value|
84
+ case datatype.to_s
85
+ when /Integer/i
86
+ value.to_i
87
+ when /Float/i
88
+ value.to_f
89
+ else
90
+ value
91
+ end
92
+ end
93
+ end
94
+
95
+ def valid?(value)
96
+ !value || allowable_values.include?(value)
97
+ end
98
+ end
99
+
67
100
  # Attribute mapping from ruby-style variable name to JSON key.
68
101
  def self.attribute_map
69
102
  {
@@ -77,7 +110,11 @@ module GroupDocsConversionCloud
77
110
  :'grayscale' => :'Grayscale',
78
111
  :'rotate_angle' => :'RotateAngle',
79
112
  :'use_pdf' => :'UsePdf',
80
- :'watermark_options' => :'WatermarkOptions'
113
+ :'watermark_options' => :'WatermarkOptions',
114
+ :'brightness' => :'Brightness',
115
+ :'contrast' => :'Contrast',
116
+ :'gamma' => :'Gamma',
117
+ :'flip_mode' => :'FlipMode'
81
118
  }
82
119
  end
83
120
 
@@ -94,7 +131,11 @@ module GroupDocsConversionCloud
94
131
  :'grayscale' => :'BOOLEAN',
95
132
  :'rotate_angle' => :'Integer',
96
133
  :'use_pdf' => :'BOOLEAN',
97
- :'watermark_options' => :'WatermarkOptions'
134
+ :'watermark_options' => :'WatermarkOptions',
135
+ :'brightness' => :'Integer',
136
+ :'contrast' => :'Integer',
137
+ :'gamma' => :'Float',
138
+ :'flip_mode' => :'String'
98
139
  }
99
140
  end
100
141
 
@@ -152,6 +193,22 @@ module GroupDocsConversionCloud
152
193
  self.watermark_options = attributes[:'WatermarkOptions']
153
194
  end
154
195
 
196
+ if attributes.key?(:'Brightness')
197
+ self.brightness = attributes[:'Brightness']
198
+ end
199
+
200
+ if attributes.key?(:'Contrast')
201
+ self.contrast = attributes[:'Contrast']
202
+ end
203
+
204
+ if attributes.key?(:'Gamma')
205
+ self.gamma = attributes[:'Gamma']
206
+ end
207
+
208
+ if attributes.key?(:'FlipMode')
209
+ self.flip_mode = attributes[:'FlipMode']
210
+ end
211
+
155
212
  end
156
213
 
157
214
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -194,6 +251,22 @@ module GroupDocsConversionCloud
194
251
  invalid_properties.push("invalid value for 'use_pdf', use_pdf cannot be nil.")
195
252
  end
196
253
 
254
+ if @brightness.nil?
255
+ invalid_properties.push("invalid value for 'brightness', brightness cannot be nil.")
256
+ end
257
+
258
+ if @contrast.nil?
259
+ invalid_properties.push("invalid value for 'contrast', contrast cannot be nil.")
260
+ end
261
+
262
+ if @gamma.nil?
263
+ invalid_properties.push("invalid value for 'gamma', gamma cannot be nil.")
264
+ end
265
+
266
+ if @flip_mode.nil?
267
+ invalid_properties.push("invalid value for 'flip_mode', flip_mode cannot be nil.")
268
+ end
269
+
197
270
  return invalid_properties
198
271
  end
199
272
 
@@ -209,9 +282,29 @@ module GroupDocsConversionCloud
209
282
  return false if @grayscale.nil?
210
283
  return false if @rotate_angle.nil?
211
284
  return false if @use_pdf.nil?
285
+ return false if @brightness.nil?
286
+ return false if @contrast.nil?
287
+ return false if @gamma.nil?
288
+ return false if @flip_mode.nil?
289
+ flip_mode_validator = EnumAttributeValidator.new('String', ["None", "FlipX", "FlipY", "FlipXY"])
290
+ return false unless flip_mode_validator.valid?(@flip_mode)
212
291
  return true
213
292
  end
214
293
 
294
+ # Custom attribute writer method checking allowed values (enum).
295
+ # @param [Object] flip_mode Object to be assigned
296
+ def flip_mode=(flip_mode)
297
+ validator = EnumAttributeValidator.new('String', ["None", "FlipX", "FlipY", "FlipXY"])
298
+ if flip_mode.to_i == 0
299
+ unless validator.valid?(flip_mode)
300
+ raise ArgumentError, "invalid value for 'flip_mode', must be one of #{validator.allowable_values}."
301
+ end
302
+ @flip_mode = flip_mode
303
+ else
304
+ @flip_mode = validator.allowable_values[flip_mode.to_i]
305
+ end
306
+ end
307
+
215
308
  # Checks equality by comparing each attribute.
216
309
  # @param [Object] Object to be compared
217
310
  def ==(other)
@@ -227,7 +320,11 @@ module GroupDocsConversionCloud
227
320
  grayscale == other.grayscale &&
228
321
  rotate_angle == other.rotate_angle &&
229
322
  use_pdf == other.use_pdf &&
230
- watermark_options == other.watermark_options
323
+ watermark_options == other.watermark_options &&
324
+ brightness == other.brightness &&
325
+ contrast == other.contrast &&
326
+ gamma == other.gamma &&
327
+ flip_mode == other.flip_mode
231
328
  end
232
329
 
233
330
  # @see the `==` method
@@ -239,7 +336,7 @@ module GroupDocsConversionCloud
239
336
  # Calculates hash code according to all attributes.
240
337
  # @return [Fixnum] Hash code
241
338
  def hash
242
- [from_page, pages_count, pages, width, height, horizontal_resolution, vertical_resolution, grayscale, rotate_angle, use_pdf, watermark_options].hash
339
+ [from_page, pages_count, pages, width, height, horizontal_resolution, vertical_resolution, grayscale, rotate_angle, use_pdf, watermark_options, brightness, contrast, gamma, flip_mode].hash
243
340
  end
244
341
 
245
342
  # Downcases first letter.
@@ -64,6 +64,39 @@ module GroupDocsConversionCloud
64
64
  # Watermark specific options
65
65
  attr_accessor :watermark_options
66
66
 
67
+ # Adjust image brightness
68
+ attr_accessor :brightness
69
+
70
+ # Adjust image contrast
71
+ attr_accessor :contrast
72
+
73
+ # Adjust image gamma
74
+ attr_accessor :gamma
75
+
76
+ # Image flip mode
77
+ attr_accessor :flip_mode
78
+ class EnumAttributeValidator
79
+ attr_reader :datatype
80
+ attr_reader :allowable_values
81
+
82
+ def initialize(datatype, allowable_values)
83
+ @allowable_values = allowable_values.map do |value|
84
+ case datatype.to_s
85
+ when /Integer/i
86
+ value.to_i
87
+ when /Float/i
88
+ value.to_f
89
+ else
90
+ value
91
+ end
92
+ end
93
+ end
94
+
95
+ def valid?(value)
96
+ !value || allowable_values.include?(value)
97
+ end
98
+ end
99
+
67
100
  # Attribute mapping from ruby-style variable name to JSON key.
68
101
  def self.attribute_map
69
102
  {
@@ -77,7 +110,11 @@ module GroupDocsConversionCloud
77
110
  :'grayscale' => :'Grayscale',
78
111
  :'rotate_angle' => :'RotateAngle',
79
112
  :'use_pdf' => :'UsePdf',
80
- :'watermark_options' => :'WatermarkOptions'
113
+ :'watermark_options' => :'WatermarkOptions',
114
+ :'brightness' => :'Brightness',
115
+ :'contrast' => :'Contrast',
116
+ :'gamma' => :'Gamma',
117
+ :'flip_mode' => :'FlipMode'
81
118
  }
82
119
  end
83
120
 
@@ -94,7 +131,11 @@ module GroupDocsConversionCloud
94
131
  :'grayscale' => :'BOOLEAN',
95
132
  :'rotate_angle' => :'Integer',
96
133
  :'use_pdf' => :'BOOLEAN',
97
- :'watermark_options' => :'WatermarkOptions'
134
+ :'watermark_options' => :'WatermarkOptions',
135
+ :'brightness' => :'Integer',
136
+ :'contrast' => :'Integer',
137
+ :'gamma' => :'Float',
138
+ :'flip_mode' => :'String'
98
139
  }
99
140
  end
100
141
 
@@ -152,6 +193,22 @@ module GroupDocsConversionCloud
152
193
  self.watermark_options = attributes[:'WatermarkOptions']
153
194
  end
154
195
 
196
+ if attributes.key?(:'Brightness')
197
+ self.brightness = attributes[:'Brightness']
198
+ end
199
+
200
+ if attributes.key?(:'Contrast')
201
+ self.contrast = attributes[:'Contrast']
202
+ end
203
+
204
+ if attributes.key?(:'Gamma')
205
+ self.gamma = attributes[:'Gamma']
206
+ end
207
+
208
+ if attributes.key?(:'FlipMode')
209
+ self.flip_mode = attributes[:'FlipMode']
210
+ end
211
+
155
212
  end
156
213
 
157
214
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -194,6 +251,22 @@ module GroupDocsConversionCloud
194
251
  invalid_properties.push("invalid value for 'use_pdf', use_pdf cannot be nil.")
195
252
  end
196
253
 
254
+ if @brightness.nil?
255
+ invalid_properties.push("invalid value for 'brightness', brightness cannot be nil.")
256
+ end
257
+
258
+ if @contrast.nil?
259
+ invalid_properties.push("invalid value for 'contrast', contrast cannot be nil.")
260
+ end
261
+
262
+ if @gamma.nil?
263
+ invalid_properties.push("invalid value for 'gamma', gamma cannot be nil.")
264
+ end
265
+
266
+ if @flip_mode.nil?
267
+ invalid_properties.push("invalid value for 'flip_mode', flip_mode cannot be nil.")
268
+ end
269
+
197
270
  return invalid_properties
198
271
  end
199
272
 
@@ -209,9 +282,29 @@ module GroupDocsConversionCloud
209
282
  return false if @grayscale.nil?
210
283
  return false if @rotate_angle.nil?
211
284
  return false if @use_pdf.nil?
285
+ return false if @brightness.nil?
286
+ return false if @contrast.nil?
287
+ return false if @gamma.nil?
288
+ return false if @flip_mode.nil?
289
+ flip_mode_validator = EnumAttributeValidator.new('String', ["None", "FlipX", "FlipY", "FlipXY"])
290
+ return false unless flip_mode_validator.valid?(@flip_mode)
212
291
  return true
213
292
  end
214
293
 
294
+ # Custom attribute writer method checking allowed values (enum).
295
+ # @param [Object] flip_mode Object to be assigned
296
+ def flip_mode=(flip_mode)
297
+ validator = EnumAttributeValidator.new('String', ["None", "FlipX", "FlipY", "FlipXY"])
298
+ if flip_mode.to_i == 0
299
+ unless validator.valid?(flip_mode)
300
+ raise ArgumentError, "invalid value for 'flip_mode', must be one of #{validator.allowable_values}."
301
+ end
302
+ @flip_mode = flip_mode
303
+ else
304
+ @flip_mode = validator.allowable_values[flip_mode.to_i]
305
+ end
306
+ end
307
+
215
308
  # Checks equality by comparing each attribute.
216
309
  # @param [Object] Object to be compared
217
310
  def ==(other)
@@ -227,7 +320,11 @@ module GroupDocsConversionCloud
227
320
  grayscale == other.grayscale &&
228
321
  rotate_angle == other.rotate_angle &&
229
322
  use_pdf == other.use_pdf &&
230
- watermark_options == other.watermark_options
323
+ watermark_options == other.watermark_options &&
324
+ brightness == other.brightness &&
325
+ contrast == other.contrast &&
326
+ gamma == other.gamma &&
327
+ flip_mode == other.flip_mode
231
328
  end
232
329
 
233
330
  # @see the `==` method
@@ -239,7 +336,7 @@ module GroupDocsConversionCloud
239
336
  # Calculates hash code according to all attributes.
240
337
  # @return [Fixnum] Hash code
241
338
  def hash
242
- [from_page, pages_count, pages, width, height, horizontal_resolution, vertical_resolution, grayscale, rotate_angle, use_pdf, watermark_options].hash
339
+ [from_page, pages_count, pages, width, height, horizontal_resolution, vertical_resolution, grayscale, rotate_angle, use_pdf, watermark_options, brightness, contrast, gamma, flip_mode].hash
243
340
  end
244
341
 
245
342
  # Downcases first letter.
@@ -64,6 +64,18 @@ module GroupDocsConversionCloud
64
64
  # Watermark specific options
65
65
  attr_accessor :watermark_options
66
66
 
67
+ # Adjust image brightness
68
+ attr_accessor :brightness
69
+
70
+ # Adjust image contrast
71
+ attr_accessor :contrast
72
+
73
+ # Adjust image gamma
74
+ attr_accessor :gamma
75
+
76
+ # Image flip mode
77
+ attr_accessor :flip_mode
78
+
67
79
  # Bits count per color channel
68
80
  attr_accessor :channel_bits_count
69
81
 
@@ -114,6 +126,10 @@ module GroupDocsConversionCloud
114
126
  :'rotate_angle' => :'RotateAngle',
115
127
  :'use_pdf' => :'UsePdf',
116
128
  :'watermark_options' => :'WatermarkOptions',
129
+ :'brightness' => :'Brightness',
130
+ :'contrast' => :'Contrast',
131
+ :'gamma' => :'Gamma',
132
+ :'flip_mode' => :'FlipMode',
117
133
  :'channel_bits_count' => :'ChannelBitsCount',
118
134
  :'channels_count' => :'ChannelsCount',
119
135
  :'color_mode' => :'ColorMode',
@@ -136,6 +152,10 @@ module GroupDocsConversionCloud
136
152
  :'rotate_angle' => :'Integer',
137
153
  :'use_pdf' => :'BOOLEAN',
138
154
  :'watermark_options' => :'WatermarkOptions',
155
+ :'brightness' => :'Integer',
156
+ :'contrast' => :'Integer',
157
+ :'gamma' => :'Float',
158
+ :'flip_mode' => :'String',
139
159
  :'channel_bits_count' => :'Integer',
140
160
  :'channels_count' => :'Integer',
141
161
  :'color_mode' => :'String',
@@ -198,6 +218,22 @@ module GroupDocsConversionCloud
198
218
  self.watermark_options = attributes[:'WatermarkOptions']
199
219
  end
200
220
 
221
+ if attributes.key?(:'Brightness')
222
+ self.brightness = attributes[:'Brightness']
223
+ end
224
+
225
+ if attributes.key?(:'Contrast')
226
+ self.contrast = attributes[:'Contrast']
227
+ end
228
+
229
+ if attributes.key?(:'Gamma')
230
+ self.gamma = attributes[:'Gamma']
231
+ end
232
+
233
+ if attributes.key?(:'FlipMode')
234
+ self.flip_mode = attributes[:'FlipMode']
235
+ end
236
+
201
237
  if attributes.key?(:'ChannelBitsCount')
202
238
  self.channel_bits_count = attributes[:'ChannelBitsCount']
203
239
  end
@@ -260,6 +296,22 @@ module GroupDocsConversionCloud
260
296
  invalid_properties.push("invalid value for 'use_pdf', use_pdf cannot be nil.")
261
297
  end
262
298
 
299
+ if @brightness.nil?
300
+ invalid_properties.push("invalid value for 'brightness', brightness cannot be nil.")
301
+ end
302
+
303
+ if @contrast.nil?
304
+ invalid_properties.push("invalid value for 'contrast', contrast cannot be nil.")
305
+ end
306
+
307
+ if @gamma.nil?
308
+ invalid_properties.push("invalid value for 'gamma', gamma cannot be nil.")
309
+ end
310
+
311
+ if @flip_mode.nil?
312
+ invalid_properties.push("invalid value for 'flip_mode', flip_mode cannot be nil.")
313
+ end
314
+
263
315
  if @channel_bits_count.nil?
264
316
  invalid_properties.push("invalid value for 'channel_bits_count', channel_bits_count cannot be nil.")
265
317
  end
@@ -295,6 +347,12 @@ module GroupDocsConversionCloud
295
347
  return false if @grayscale.nil?
296
348
  return false if @rotate_angle.nil?
297
349
  return false if @use_pdf.nil?
350
+ return false if @brightness.nil?
351
+ return false if @contrast.nil?
352
+ return false if @gamma.nil?
353
+ return false if @flip_mode.nil?
354
+ flip_mode_validator = EnumAttributeValidator.new('String', ["None", "FlipX", "FlipY", "FlipXY"])
355
+ return false unless flip_mode_validator.valid?(@flip_mode)
298
356
  return false if @channel_bits_count.nil?
299
357
  return false if @channels_count.nil?
300
358
  return false if @color_mode.nil?
@@ -307,6 +365,20 @@ module GroupDocsConversionCloud
307
365
  return true
308
366
  end
309
367
 
368
+ # Custom attribute writer method checking allowed values (enum).
369
+ # @param [Object] flip_mode Object to be assigned
370
+ def flip_mode=(flip_mode)
371
+ validator = EnumAttributeValidator.new('String', ["None", "FlipX", "FlipY", "FlipXY"])
372
+ if flip_mode.to_i == 0
373
+ unless validator.valid?(flip_mode)
374
+ raise ArgumentError, "invalid value for 'flip_mode', must be one of #{validator.allowable_values}."
375
+ end
376
+ @flip_mode = flip_mode
377
+ else
378
+ @flip_mode = validator.allowable_values[flip_mode.to_i]
379
+ end
380
+ end
381
+
310
382
  # Custom attribute writer method checking allowed values (enum).
311
383
  # @param [Object] color_mode Object to be assigned
312
384
  def color_mode=(color_mode)
@@ -351,6 +423,10 @@ module GroupDocsConversionCloud
351
423
  rotate_angle == other.rotate_angle &&
352
424
  use_pdf == other.use_pdf &&
353
425
  watermark_options == other.watermark_options &&
426
+ brightness == other.brightness &&
427
+ contrast == other.contrast &&
428
+ gamma == other.gamma &&
429
+ flip_mode == other.flip_mode &&
354
430
  channel_bits_count == other.channel_bits_count &&
355
431
  channels_count == other.channels_count &&
356
432
  color_mode == other.color_mode &&
@@ -367,7 +443,7 @@ module GroupDocsConversionCloud
367
443
  # Calculates hash code according to all attributes.
368
444
  # @return [Fixnum] Hash code
369
445
  def hash
370
- [from_page, pages_count, pages, width, height, horizontal_resolution, vertical_resolution, grayscale, rotate_angle, use_pdf, watermark_options, channel_bits_count, channels_count, color_mode, compression_method, version].hash
446
+ [from_page, pages_count, pages, width, height, horizontal_resolution, vertical_resolution, grayscale, rotate_angle, use_pdf, watermark_options, brightness, contrast, gamma, flip_mode, channel_bits_count, channels_count, color_mode, compression_method, version].hash
371
447
  end
372
448
 
373
449
  # Downcases first letter.