groupdocs_conversion_cloud 23.2 → 23.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_conversion_cloud/models/bmp_convert_options.rb +11 -11
  3. data/lib/groupdocs_conversion_cloud/models/convert_options.rb +14 -4
  4. data/lib/groupdocs_conversion_cloud/models/dcm_convert_options.rb +11 -11
  5. data/lib/groupdocs_conversion_cloud/models/djvu_convert_options.rb +11 -11
  6. data/lib/groupdocs_conversion_cloud/models/dng_convert_options.rb +11 -11
  7. data/lib/groupdocs_conversion_cloud/models/doc_convert_options.rb +11 -11
  8. data/lib/groupdocs_conversion_cloud/models/docm_convert_options.rb +11 -11
  9. data/lib/groupdocs_conversion_cloud/models/docx_convert_options.rb +11 -11
  10. data/lib/groupdocs_conversion_cloud/models/dot_convert_options.rb +11 -11
  11. data/lib/groupdocs_conversion_cloud/models/dotm_convert_options.rb +11 -11
  12. data/lib/groupdocs_conversion_cloud/models/dotx_convert_options.rb +11 -11
  13. data/lib/groupdocs_conversion_cloud/models/{xps_convert_options.rb → e_book_convert_options.rb} +84 -131
  14. data/lib/groupdocs_conversion_cloud/models/emf_convert_options.rb +11 -11
  15. data/lib/groupdocs_conversion_cloud/models/gif_convert_options.rb +11 -11
  16. data/lib/groupdocs_conversion_cloud/models/ico_convert_options.rb +11 -11
  17. data/lib/groupdocs_conversion_cloud/models/image_convert_options.rb +11 -11
  18. data/lib/groupdocs_conversion_cloud/models/j2c_convert_options.rb +11 -11
  19. data/lib/groupdocs_conversion_cloud/models/j2k_convert_options.rb +11 -11
  20. data/lib/groupdocs_conversion_cloud/models/jp2_convert_options.rb +11 -11
  21. data/lib/groupdocs_conversion_cloud/models/jpeg_convert_options.rb +11 -11
  22. data/lib/groupdocs_conversion_cloud/models/jpf_convert_options.rb +11 -11
  23. data/lib/groupdocs_conversion_cloud/models/jpg_convert_options.rb +11 -11
  24. data/lib/groupdocs_conversion_cloud/models/jpm_convert_options.rb +11 -11
  25. data/lib/groupdocs_conversion_cloud/models/jpx_convert_options.rb +11 -11
  26. data/lib/groupdocs_conversion_cloud/models/odg_convert_options.rb +11 -11
  27. data/lib/groupdocs_conversion_cloud/models/odp_convert_options.rb +14 -14
  28. data/lib/groupdocs_conversion_cloud/models/ods_convert_options.rb +14 -14
  29. data/lib/groupdocs_conversion_cloud/models/odt_convert_options.rb +11 -11
  30. data/lib/groupdocs_conversion_cloud/models/otp_convert_options.rb +14 -14
  31. data/lib/groupdocs_conversion_cloud/models/ots_convert_options.rb +14 -14
  32. data/lib/groupdocs_conversion_cloud/models/ott_convert_options.rb +11 -11
  33. data/lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb +14 -14
  34. data/lib/groupdocs_conversion_cloud/models/{svg_convert_options.rb → pdl_convert_options.rb} +4 -79
  35. data/lib/groupdocs_conversion_cloud/models/png_convert_options.rb +11 -11
  36. data/lib/groupdocs_conversion_cloud/models/potm_convert_options.rb +14 -14
  37. data/lib/groupdocs_conversion_cloud/models/potx_convert_options.rb +14 -14
  38. data/lib/groupdocs_conversion_cloud/models/pps_convert_options.rb +14 -14
  39. data/lib/groupdocs_conversion_cloud/models/ppsm_convert_options.rb +14 -14
  40. data/lib/groupdocs_conversion_cloud/models/ppsx_convert_options.rb +14 -14
  41. data/lib/groupdocs_conversion_cloud/models/ppt_convert_options.rb +14 -14
  42. data/lib/groupdocs_conversion_cloud/models/pptm_convert_options.rb +14 -14
  43. data/lib/groupdocs_conversion_cloud/models/pptx_convert_options.rb +14 -14
  44. data/lib/groupdocs_conversion_cloud/models/presentation_convert_options.rb +14 -14
  45. data/lib/groupdocs_conversion_cloud/models/psd_convert_options.rb +11 -11
  46. data/lib/groupdocs_conversion_cloud/models/rtf_convert_options.rb +11 -11
  47. data/lib/groupdocs_conversion_cloud/models/spreadsheet_convert_options.rb +14 -14
  48. data/lib/groupdocs_conversion_cloud/models/tif_convert_options.rb +11 -11
  49. data/lib/groupdocs_conversion_cloud/models/tiff_convert_options.rb +11 -11
  50. data/lib/groupdocs_conversion_cloud/models/tsv_convert_options.rb +14 -14
  51. data/lib/groupdocs_conversion_cloud/models/txt_convert_options.rb +14 -4
  52. data/lib/groupdocs_conversion_cloud/models/{html_convert_options.rb → web_convert_options.rb} +16 -16
  53. data/lib/groupdocs_conversion_cloud/models/{html_load_options.rb → web_load_options.rb} +2 -2
  54. data/lib/groupdocs_conversion_cloud/models/webp_convert_options.rb +11 -11
  55. data/lib/groupdocs_conversion_cloud/models/wmf_convert_options.rb +11 -11
  56. data/lib/groupdocs_conversion_cloud/models/word_processing_convert_options.rb +11 -11
  57. data/lib/groupdocs_conversion_cloud/models/xls2003_convert_options.rb +14 -14
  58. data/lib/groupdocs_conversion_cloud/models/xls_convert_options.rb +14 -14
  59. data/lib/groupdocs_conversion_cloud/models/xlsb_convert_options.rb +14 -14
  60. data/lib/groupdocs_conversion_cloud/models/xlsm_convert_options.rb +14 -14
  61. data/lib/groupdocs_conversion_cloud/models/xlsx_convert_options.rb +14 -14
  62. data/lib/groupdocs_conversion_cloud/models/xltm_convert_options.rb +14 -14
  63. data/lib/groupdocs_conversion_cloud/models/xltx_convert_options.rb +14 -14
  64. data/lib/groupdocs_conversion_cloud/version.rb +1 -1
  65. data/lib/groupdocs_conversion_cloud.rb +4 -6
  66. metadata +6 -8
  67. data/lib/groupdocs_conversion_cloud/models/cgm_convert_options.rb +0 -458
  68. data/lib/groupdocs_conversion_cloud/models/epub_convert_options.rb +0 -386
@@ -1,386 +0,0 @@
1
- #
2
- # --------------------------------------------------------------------------------------------------------------------
3
- # <copyright company="Aspose Pty Ltd" file="epub_convert_options.rb">
4
- # Copyright (c) 2003-2023 Aspose Pty Ltd
5
- # </copyright>
6
- # <summary>
7
- # Permission is hereby granted, free of charge, to any person obtaining a copy
8
- # of this software and associated documentation files (the "Software"), to deal
9
- # in the Software without restriction, including without limitation the rights
10
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- # copies of the Software, and to permit persons to whom the Software is
12
- # furnished to do so, subject to the following conditions:
13
- #
14
- # The above copyright notice and this permission notice shall be included in all
15
- # copies or substantial portions of the Software.
16
- #
17
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- # SOFTWARE.
24
- # </summary>
25
- # --------------------------------------------------------------------------------------------------------------------
26
- #
27
-
28
- require 'date'
29
-
30
- module GroupDocsConversionCloud
31
- # Epub convert options
32
- class EpubConvertOptions
33
-
34
- # Start conversion from FromPage page
35
- attr_accessor :from_page
36
-
37
- # Number of pages to convert
38
- attr_accessor :pages_count
39
-
40
- # Convert specific pages. The list contains the page indexes of the pages to be converted
41
- attr_accessor :pages
42
-
43
- # Desired page width in pixels after conversion
44
- attr_accessor :width
45
-
46
- # Desired page height in pixels after conversion
47
- attr_accessor :height
48
-
49
- # Desired page DPI after conversion. The default resolution is: 96dpi
50
- attr_accessor :dpi
51
-
52
- # Set this property if you want to protect the converted document with a password
53
- attr_accessor :password
54
-
55
- # Desired page top margin in pixels after conversion
56
- attr_accessor :margin_top
57
-
58
- # Desired page bottom margin in pixels after conversion
59
- attr_accessor :margin_bottom
60
-
61
- # Desired page left margin in pixels after conversion
62
- attr_accessor :margin_left
63
-
64
- # Desired page right margin in pixels after conversion
65
- attr_accessor :margin_right
66
-
67
- # If true, the input firstly is converted to PDF and after that to desired format
68
- attr_accessor :use_pdf
69
-
70
- # Watermark specific options
71
- attr_accessor :watermark_options
72
-
73
- # Attribute mapping from ruby-style variable name to JSON key.
74
- def self.attribute_map
75
- {
76
- :'from_page' => :'FromPage',
77
- :'pages_count' => :'PagesCount',
78
- :'pages' => :'Pages',
79
- :'width' => :'Width',
80
- :'height' => :'Height',
81
- :'dpi' => :'Dpi',
82
- :'password' => :'Password',
83
- :'margin_top' => :'MarginTop',
84
- :'margin_bottom' => :'MarginBottom',
85
- :'margin_left' => :'MarginLeft',
86
- :'margin_right' => :'MarginRight',
87
- :'use_pdf' => :'UsePdf',
88
- :'watermark_options' => :'WatermarkOptions'
89
- }
90
- end
91
-
92
- # Attribute type mapping.
93
- def self.swagger_types
94
- {
95
- :'from_page' => :'Integer',
96
- :'pages_count' => :'Integer',
97
- :'pages' => :'Array<Integer>',
98
- :'width' => :'Integer',
99
- :'height' => :'Integer',
100
- :'dpi' => :'Float',
101
- :'password' => :'String',
102
- :'margin_top' => :'Integer',
103
- :'margin_bottom' => :'Integer',
104
- :'margin_left' => :'Integer',
105
- :'margin_right' => :'Integer',
106
- :'use_pdf' => :'BOOLEAN',
107
- :'watermark_options' => :'WatermarkOptions'
108
- }
109
- end
110
-
111
- # Initializes the object
112
- # @param [Hash] attributes Model attributes in the form of hash
113
- def initialize(attributes = {})
114
- return unless attributes.is_a?(Hash)
115
-
116
- # convert string to symbol for hash key
117
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
118
-
119
- if attributes.key?(:'FromPage')
120
- self.from_page = attributes[:'FromPage']
121
- end
122
-
123
- if attributes.key?(:'PagesCount')
124
- self.pages_count = attributes[:'PagesCount']
125
- end
126
-
127
- if attributes.key?(:'Pages')
128
- if (value = attributes[:'Pages']).is_a?(Array)
129
- self.pages = value
130
- end
131
- end
132
-
133
- if attributes.key?(:'Width')
134
- self.width = attributes[:'Width']
135
- end
136
-
137
- if attributes.key?(:'Height')
138
- self.height = attributes[:'Height']
139
- end
140
-
141
- if attributes.key?(:'Dpi')
142
- self.dpi = attributes[:'Dpi']
143
- end
144
-
145
- if attributes.key?(:'Password')
146
- self.password = attributes[:'Password']
147
- end
148
-
149
- if attributes.key?(:'MarginTop')
150
- self.margin_top = attributes[:'MarginTop']
151
- end
152
-
153
- if attributes.key?(:'MarginBottom')
154
- self.margin_bottom = attributes[:'MarginBottom']
155
- end
156
-
157
- if attributes.key?(:'MarginLeft')
158
- self.margin_left = attributes[:'MarginLeft']
159
- end
160
-
161
- if attributes.key?(:'MarginRight')
162
- self.margin_right = attributes[:'MarginRight']
163
- end
164
-
165
- if attributes.key?(:'UsePdf')
166
- self.use_pdf = attributes[:'UsePdf']
167
- end
168
-
169
- if attributes.key?(:'WatermarkOptions')
170
- self.watermark_options = attributes[:'WatermarkOptions']
171
- end
172
-
173
- end
174
-
175
- # Show invalid properties with the reasons. Usually used together with valid?
176
- # @return Array for valid properies with the reasons
177
- def list_invalid_properties
178
- invalid_properties = []
179
- if @from_page.nil?
180
- invalid_properties.push("invalid value for 'from_page', from_page cannot be nil.")
181
- end
182
-
183
- if @pages_count.nil?
184
- invalid_properties.push("invalid value for 'pages_count', pages_count cannot be nil.")
185
- end
186
-
187
- if @width.nil?
188
- invalid_properties.push("invalid value for 'width', width cannot be nil.")
189
- end
190
-
191
- if @height.nil?
192
- invalid_properties.push("invalid value for 'height', height cannot be nil.")
193
- end
194
-
195
- if @dpi.nil?
196
- invalid_properties.push("invalid value for 'dpi', dpi cannot be nil.")
197
- end
198
-
199
- if @margin_top.nil?
200
- invalid_properties.push("invalid value for 'margin_top', margin_top cannot be nil.")
201
- end
202
-
203
- if @margin_bottom.nil?
204
- invalid_properties.push("invalid value for 'margin_bottom', margin_bottom cannot be nil.")
205
- end
206
-
207
- if @margin_left.nil?
208
- invalid_properties.push("invalid value for 'margin_left', margin_left cannot be nil.")
209
- end
210
-
211
- if @margin_right.nil?
212
- invalid_properties.push("invalid value for 'margin_right', margin_right cannot be nil.")
213
- end
214
-
215
- if @use_pdf.nil?
216
- invalid_properties.push("invalid value for 'use_pdf', use_pdf cannot be nil.")
217
- end
218
-
219
- return invalid_properties
220
- end
221
-
222
- # Check to see if the all the properties in the model are valid
223
- # @return true if the model is valid
224
- def valid?
225
- return false if @from_page.nil?
226
- return false if @pages_count.nil?
227
- return false if @width.nil?
228
- return false if @height.nil?
229
- return false if @dpi.nil?
230
- return false if @margin_top.nil?
231
- return false if @margin_bottom.nil?
232
- return false if @margin_left.nil?
233
- return false if @margin_right.nil?
234
- return false if @use_pdf.nil?
235
- return true
236
- end
237
-
238
- # Checks equality by comparing each attribute.
239
- # @param [Object] Object to be compared
240
- def ==(other)
241
- return true if self.equal?(other)
242
- self.class == other.class &&
243
- from_page == other.from_page &&
244
- pages_count == other.pages_count &&
245
- pages == other.pages &&
246
- width == other.width &&
247
- height == other.height &&
248
- dpi == other.dpi &&
249
- password == other.password &&
250
- margin_top == other.margin_top &&
251
- margin_bottom == other.margin_bottom &&
252
- margin_left == other.margin_left &&
253
- margin_right == other.margin_right &&
254
- use_pdf == other.use_pdf &&
255
- watermark_options == other.watermark_options
256
- end
257
-
258
- # @see the `==` method
259
- # @param [Object] Object to be compared
260
- def eql?(other)
261
- self == other
262
- end
263
-
264
- # Calculates hash code according to all attributes.
265
- # @return [Fixnum] Hash code
266
- def hash
267
- [from_page, pages_count, pages, width, height, dpi, password, margin_top, margin_bottom, margin_left, margin_right, use_pdf, watermark_options].hash
268
- end
269
-
270
- # Downcases first letter.
271
- # @return downcased string
272
- def uncap(str)
273
- str[0, 1].downcase + str[1..-1]
274
- end
275
-
276
- # Builds the object from hash
277
- # @param [Hash] attributes Model attributes in the form of hash
278
- # @return [Object] Returns the model itself
279
- def build_from_hash(attributes)
280
- return nil unless attributes.is_a?(Hash)
281
- self.class.swagger_types.each_pair do |key, type|
282
- pname = uncap(self.class.attribute_map[key]).intern
283
- value = attributes[pname]
284
- if type =~ /\AArray<(.*)>/i
285
- # check to ensure the input is an array given that the the attribute
286
- # is documented as an array but the input is not
287
- if value.is_a?(Array)
288
- self.send("#{key}=", value.map { |v| _deserialize($1, v) })
289
- end
290
- elsif !value.nil?
291
- self.send("#{key}=", _deserialize(type, value))
292
- end
293
- # or else data not found in attributes(hash), not an issue as the data can be optional
294
- end
295
-
296
- self
297
- end
298
-
299
- # Deserializes the data based on type
300
- # @param string type Data type
301
- # @param string value Value to be deserialized
302
- # @return [Object] Deserialized data
303
- def _deserialize(type, value)
304
- case type.to_sym
305
- when :DateTime
306
- Date.parse value
307
- when :Date
308
- Date.parse value
309
- when :String
310
- value.to_s
311
- when :Integer
312
- value.to_i
313
- when :Float
314
- value.to_f
315
- when :BOOLEAN
316
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
317
- true
318
- else
319
- false
320
- end
321
- when :Object
322
- # generic object (usually a Hash), return directly
323
- value
324
- when /\AArray<(?<inner_type>.+)>\z/
325
- inner_type = Regexp.last_match[:inner_type]
326
- value.map { |v| _deserialize(inner_type, v) }
327
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
328
- k_type = Regexp.last_match[:k_type]
329
- v_type = Regexp.last_match[:v_type]
330
- {}.tap do |hash|
331
- value.each do |k, v|
332
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
333
- end
334
- end
335
- else
336
- # model
337
- temp_model = GroupDocsConversionCloud.const_get(type).new
338
- temp_model.build_from_hash(value)
339
- end
340
- end
341
-
342
- # Returns the string representation of the object
343
- # @return [String] String presentation of the object
344
- def to_s
345
- to_hash.to_s
346
- end
347
-
348
- # to_body is an alias to to_hash (backward compatibility)
349
- # @return [Hash] Returns the object in the form of hash
350
- def to_body
351
- to_hash
352
- end
353
-
354
- # Returns the object in the form of hash
355
- # @return [Hash] Returns the object in the form of hash
356
- def to_hash
357
- hash = {}
358
- self.class.attribute_map.each_pair do |attr, param|
359
- value = self.send(attr)
360
- next if value.nil?
361
- hash[param] = _to_hash(value)
362
- end
363
- hash
364
- end
365
-
366
- # Outputs non-array value in the form of hash
367
- # For object, use to_hash. Otherwise, just return the value
368
- # @param [Object] value Any valid value
369
- # @return [Hash] Returns the value in the form of hash
370
- def _to_hash(value)
371
- if value.is_a?(Array)
372
- value.compact.map { |v| _to_hash(v) }
373
- elsif value.is_a?(Hash)
374
- {}.tap do |hash|
375
- value.each { |k, v| hash[k] = _to_hash(v) }
376
- end
377
- elsif value.respond_to? :to_hash
378
- value.to_hash
379
- else
380
- value
381
- end
382
- end
383
-
384
- end
385
-
386
- end