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
@@ -40,6 +40,9 @@ module GroupDocsConversionCloud
40
40
  # Convert specific pages. The list contains the page indexes of the pages to be converted
41
41
  attr_accessor :pages
42
42
 
43
+ # Watermark specific options
44
+ attr_accessor :watermark_options
45
+
43
46
  # Desired page width after conversion
44
47
  attr_accessor :width
45
48
 
@@ -55,9 +58,6 @@ module GroupDocsConversionCloud
55
58
  # Specifies the zoom level in percentage. Default is 100. Default zoom is supported till Microsoft Word 2010. Starting from Microsoft Word 2013 default zoom is no longer set to document, instead it appears to use the zoom factor of the last document that was opened.
56
59
  attr_accessor :zoom
57
60
 
58
- # Watermark specific options
59
- attr_accessor :watermark_options
60
-
61
61
  # Recognition mode when converting from pdf
62
62
  attr_accessor :pdf_recognition_mode
63
63
 
@@ -94,12 +94,12 @@ module GroupDocsConversionCloud
94
94
  :'from_page' => :'FromPage',
95
95
  :'pages_count' => :'PagesCount',
96
96
  :'pages' => :'Pages',
97
+ :'watermark_options' => :'WatermarkOptions',
97
98
  :'width' => :'Width',
98
99
  :'height' => :'Height',
99
100
  :'dpi' => :'Dpi',
100
101
  :'password' => :'Password',
101
102
  :'zoom' => :'Zoom',
102
- :'watermark_options' => :'WatermarkOptions',
103
103
  :'pdf_recognition_mode' => :'PdfRecognitionMode',
104
104
  :'page_size' => :'PageSize',
105
105
  :'page_orientation' => :'PageOrientation'
@@ -112,12 +112,12 @@ module GroupDocsConversionCloud
112
112
  :'from_page' => :'Integer',
113
113
  :'pages_count' => :'Integer',
114
114
  :'pages' => :'Array<Integer>',
115
+ :'watermark_options' => :'WatermarkOptions',
115
116
  :'width' => :'Integer',
116
117
  :'height' => :'Integer',
117
118
  :'dpi' => :'Float',
118
119
  :'password' => :'String',
119
120
  :'zoom' => :'Integer',
120
- :'watermark_options' => :'WatermarkOptions',
121
121
  :'pdf_recognition_mode' => :'String',
122
122
  :'page_size' => :'String',
123
123
  :'page_orientation' => :'String'
@@ -146,6 +146,10 @@ module GroupDocsConversionCloud
146
146
  end
147
147
  end
148
148
 
149
+ if attributes.key?(:'WatermarkOptions')
150
+ self.watermark_options = attributes[:'WatermarkOptions']
151
+ end
152
+
149
153
  if attributes.key?(:'Width')
150
154
  self.width = attributes[:'Width']
151
155
  end
@@ -166,10 +170,6 @@ module GroupDocsConversionCloud
166
170
  self.zoom = attributes[:'Zoom']
167
171
  end
168
172
 
169
- if attributes.key?(:'WatermarkOptions')
170
- self.watermark_options = attributes[:'WatermarkOptions']
171
- end
172
-
173
173
  if attributes.key?(:'PdfRecognitionMode')
174
174
  self.pdf_recognition_mode = attributes[:'PdfRecognitionMode']
175
175
  end
@@ -298,12 +298,12 @@ module GroupDocsConversionCloud
298
298
  from_page == other.from_page &&
299
299
  pages_count == other.pages_count &&
300
300
  pages == other.pages &&
301
+ watermark_options == other.watermark_options &&
301
302
  width == other.width &&
302
303
  height == other.height &&
303
304
  dpi == other.dpi &&
304
305
  password == other.password &&
305
306
  zoom == other.zoom &&
306
- watermark_options == other.watermark_options &&
307
307
  pdf_recognition_mode == other.pdf_recognition_mode &&
308
308
  page_size == other.page_size &&
309
309
  page_orientation == other.page_orientation
@@ -318,7 +318,7 @@ module GroupDocsConversionCloud
318
318
  # Calculates hash code according to all attributes.
319
319
  # @return [Fixnum] Hash code
320
320
  def hash
321
- [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, pdf_recognition_mode, page_size, page_orientation].hash
321
+ [from_page, pages_count, pages, watermark_options, width, height, dpi, password, zoom, pdf_recognition_mode, page_size, page_orientation].hash
322
322
  end
323
323
 
324
324
  # Downcases first letter.
@@ -40,6 +40,9 @@ module GroupDocsConversionCloud
40
40
  # Convert specific pages. The list contains the page indexes of the pages to be converted
41
41
  attr_accessor :pages
42
42
 
43
+ # Watermark specific options
44
+ attr_accessor :watermark_options
45
+
43
46
  # Desired page width after conversion
44
47
  attr_accessor :width
45
48
 
@@ -55,9 +58,6 @@ module GroupDocsConversionCloud
55
58
  # Specifies the zoom level in percentage. Default is 100. Default zoom is supported till Microsoft Word 2010. Starting from Microsoft Word 2013 default zoom is no longer set to document, instead it appears to use the zoom factor of the last document that was opened.
56
59
  attr_accessor :zoom
57
60
 
58
- # Watermark specific options
59
- attr_accessor :watermark_options
60
-
61
61
  # Recognition mode when converting from pdf
62
62
  attr_accessor :pdf_recognition_mode
63
63
 
@@ -94,12 +94,12 @@ module GroupDocsConversionCloud
94
94
  :'from_page' => :'FromPage',
95
95
  :'pages_count' => :'PagesCount',
96
96
  :'pages' => :'Pages',
97
+ :'watermark_options' => :'WatermarkOptions',
97
98
  :'width' => :'Width',
98
99
  :'height' => :'Height',
99
100
  :'dpi' => :'Dpi',
100
101
  :'password' => :'Password',
101
102
  :'zoom' => :'Zoom',
102
- :'watermark_options' => :'WatermarkOptions',
103
103
  :'pdf_recognition_mode' => :'PdfRecognitionMode',
104
104
  :'page_size' => :'PageSize',
105
105
  :'page_orientation' => :'PageOrientation'
@@ -112,12 +112,12 @@ module GroupDocsConversionCloud
112
112
  :'from_page' => :'Integer',
113
113
  :'pages_count' => :'Integer',
114
114
  :'pages' => :'Array<Integer>',
115
+ :'watermark_options' => :'WatermarkOptions',
115
116
  :'width' => :'Integer',
116
117
  :'height' => :'Integer',
117
118
  :'dpi' => :'Float',
118
119
  :'password' => :'String',
119
120
  :'zoom' => :'Integer',
120
- :'watermark_options' => :'WatermarkOptions',
121
121
  :'pdf_recognition_mode' => :'String',
122
122
  :'page_size' => :'String',
123
123
  :'page_orientation' => :'String'
@@ -146,6 +146,10 @@ module GroupDocsConversionCloud
146
146
  end
147
147
  end
148
148
 
149
+ if attributes.key?(:'WatermarkOptions')
150
+ self.watermark_options = attributes[:'WatermarkOptions']
151
+ end
152
+
149
153
  if attributes.key?(:'Width')
150
154
  self.width = attributes[:'Width']
151
155
  end
@@ -166,10 +170,6 @@ module GroupDocsConversionCloud
166
170
  self.zoom = attributes[:'Zoom']
167
171
  end
168
172
 
169
- if attributes.key?(:'WatermarkOptions')
170
- self.watermark_options = attributes[:'WatermarkOptions']
171
- end
172
-
173
173
  if attributes.key?(:'PdfRecognitionMode')
174
174
  self.pdf_recognition_mode = attributes[:'PdfRecognitionMode']
175
175
  end
@@ -298,12 +298,12 @@ module GroupDocsConversionCloud
298
298
  from_page == other.from_page &&
299
299
  pages_count == other.pages_count &&
300
300
  pages == other.pages &&
301
+ watermark_options == other.watermark_options &&
301
302
  width == other.width &&
302
303
  height == other.height &&
303
304
  dpi == other.dpi &&
304
305
  password == other.password &&
305
306
  zoom == other.zoom &&
306
- watermark_options == other.watermark_options &&
307
307
  pdf_recognition_mode == other.pdf_recognition_mode &&
308
308
  page_size == other.page_size &&
309
309
  page_orientation == other.page_orientation
@@ -318,7 +318,7 @@ module GroupDocsConversionCloud
318
318
  # Calculates hash code according to all attributes.
319
319
  # @return [Fixnum] Hash code
320
320
  def hash
321
- [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, pdf_recognition_mode, page_size, page_orientation].hash
321
+ [from_page, pages_count, pages, watermark_options, width, height, dpi, password, zoom, pdf_recognition_mode, page_size, page_orientation].hash
322
322
  end
323
323
 
324
324
  # Downcases first letter.
@@ -40,6 +40,9 @@ module GroupDocsConversionCloud
40
40
  # Convert specific pages. The list contains the page indexes of the pages to be converted
41
41
  attr_accessor :pages
42
42
 
43
+ # Watermark specific options
44
+ attr_accessor :watermark_options
45
+
43
46
  # Desired page width after conversion
44
47
  attr_accessor :width
45
48
 
@@ -55,9 +58,6 @@ module GroupDocsConversionCloud
55
58
  # Specifies the zoom level in percentage. Default is 100. Default zoom is supported till Microsoft Word 2010. Starting from Microsoft Word 2013 default zoom is no longer set to document, instead it appears to use the zoom factor of the last document that was opened.
56
59
  attr_accessor :zoom
57
60
 
58
- # Watermark specific options
59
- attr_accessor :watermark_options
60
-
61
61
  # Recognition mode when converting from pdf
62
62
  attr_accessor :pdf_recognition_mode
63
63
 
@@ -94,12 +94,12 @@ module GroupDocsConversionCloud
94
94
  :'from_page' => :'FromPage',
95
95
  :'pages_count' => :'PagesCount',
96
96
  :'pages' => :'Pages',
97
+ :'watermark_options' => :'WatermarkOptions',
97
98
  :'width' => :'Width',
98
99
  :'height' => :'Height',
99
100
  :'dpi' => :'Dpi',
100
101
  :'password' => :'Password',
101
102
  :'zoom' => :'Zoom',
102
- :'watermark_options' => :'WatermarkOptions',
103
103
  :'pdf_recognition_mode' => :'PdfRecognitionMode',
104
104
  :'page_size' => :'PageSize',
105
105
  :'page_orientation' => :'PageOrientation'
@@ -112,12 +112,12 @@ module GroupDocsConversionCloud
112
112
  :'from_page' => :'Integer',
113
113
  :'pages_count' => :'Integer',
114
114
  :'pages' => :'Array<Integer>',
115
+ :'watermark_options' => :'WatermarkOptions',
115
116
  :'width' => :'Integer',
116
117
  :'height' => :'Integer',
117
118
  :'dpi' => :'Float',
118
119
  :'password' => :'String',
119
120
  :'zoom' => :'Integer',
120
- :'watermark_options' => :'WatermarkOptions',
121
121
  :'pdf_recognition_mode' => :'String',
122
122
  :'page_size' => :'String',
123
123
  :'page_orientation' => :'String'
@@ -146,6 +146,10 @@ module GroupDocsConversionCloud
146
146
  end
147
147
  end
148
148
 
149
+ if attributes.key?(:'WatermarkOptions')
150
+ self.watermark_options = attributes[:'WatermarkOptions']
151
+ end
152
+
149
153
  if attributes.key?(:'Width')
150
154
  self.width = attributes[:'Width']
151
155
  end
@@ -166,10 +170,6 @@ module GroupDocsConversionCloud
166
170
  self.zoom = attributes[:'Zoom']
167
171
  end
168
172
 
169
- if attributes.key?(:'WatermarkOptions')
170
- self.watermark_options = attributes[:'WatermarkOptions']
171
- end
172
-
173
173
  if attributes.key?(:'PdfRecognitionMode')
174
174
  self.pdf_recognition_mode = attributes[:'PdfRecognitionMode']
175
175
  end
@@ -298,12 +298,12 @@ module GroupDocsConversionCloud
298
298
  from_page == other.from_page &&
299
299
  pages_count == other.pages_count &&
300
300
  pages == other.pages &&
301
+ watermark_options == other.watermark_options &&
301
302
  width == other.width &&
302
303
  height == other.height &&
303
304
  dpi == other.dpi &&
304
305
  password == other.password &&
305
306
  zoom == other.zoom &&
306
- watermark_options == other.watermark_options &&
307
307
  pdf_recognition_mode == other.pdf_recognition_mode &&
308
308
  page_size == other.page_size &&
309
309
  page_orientation == other.page_orientation
@@ -318,7 +318,7 @@ module GroupDocsConversionCloud
318
318
  # Calculates hash code according to all attributes.
319
319
  # @return [Fixnum] Hash code
320
320
  def hash
321
- [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, pdf_recognition_mode, page_size, page_orientation].hash
321
+ [from_page, pages_count, pages, watermark_options, width, height, dpi, password, zoom, pdf_recognition_mode, page_size, page_orientation].hash
322
322
  end
323
323
 
324
324
  # Downcases first letter.
@@ -40,6 +40,9 @@ module GroupDocsConversionCloud
40
40
  # Convert specific pages. The list contains the page indexes of the pages to be converted
41
41
  attr_accessor :pages
42
42
 
43
+ # Watermark specific options
44
+ attr_accessor :watermark_options
45
+
43
46
  # Desired page width after conversion
44
47
  attr_accessor :width
45
48
 
@@ -55,9 +58,6 @@ module GroupDocsConversionCloud
55
58
  # Specifies the zoom level in percentage. Default is 100. Default zoom is supported till Microsoft Word 2010. Starting from Microsoft Word 2013 default zoom is no longer set to document, instead it appears to use the zoom factor of the last document that was opened.
56
59
  attr_accessor :zoom
57
60
 
58
- # Watermark specific options
59
- attr_accessor :watermark_options
60
-
61
61
  # Recognition mode when converting from pdf
62
62
  attr_accessor :pdf_recognition_mode
63
63
 
@@ -94,12 +94,12 @@ module GroupDocsConversionCloud
94
94
  :'from_page' => :'FromPage',
95
95
  :'pages_count' => :'PagesCount',
96
96
  :'pages' => :'Pages',
97
+ :'watermark_options' => :'WatermarkOptions',
97
98
  :'width' => :'Width',
98
99
  :'height' => :'Height',
99
100
  :'dpi' => :'Dpi',
100
101
  :'password' => :'Password',
101
102
  :'zoom' => :'Zoom',
102
- :'watermark_options' => :'WatermarkOptions',
103
103
  :'pdf_recognition_mode' => :'PdfRecognitionMode',
104
104
  :'page_size' => :'PageSize',
105
105
  :'page_orientation' => :'PageOrientation'
@@ -112,12 +112,12 @@ module GroupDocsConversionCloud
112
112
  :'from_page' => :'Integer',
113
113
  :'pages_count' => :'Integer',
114
114
  :'pages' => :'Array<Integer>',
115
+ :'watermark_options' => :'WatermarkOptions',
115
116
  :'width' => :'Integer',
116
117
  :'height' => :'Integer',
117
118
  :'dpi' => :'Float',
118
119
  :'password' => :'String',
119
120
  :'zoom' => :'Integer',
120
- :'watermark_options' => :'WatermarkOptions',
121
121
  :'pdf_recognition_mode' => :'String',
122
122
  :'page_size' => :'String',
123
123
  :'page_orientation' => :'String'
@@ -146,6 +146,10 @@ module GroupDocsConversionCloud
146
146
  end
147
147
  end
148
148
 
149
+ if attributes.key?(:'WatermarkOptions')
150
+ self.watermark_options = attributes[:'WatermarkOptions']
151
+ end
152
+
149
153
  if attributes.key?(:'Width')
150
154
  self.width = attributes[:'Width']
151
155
  end
@@ -166,10 +170,6 @@ module GroupDocsConversionCloud
166
170
  self.zoom = attributes[:'Zoom']
167
171
  end
168
172
 
169
- if attributes.key?(:'WatermarkOptions')
170
- self.watermark_options = attributes[:'WatermarkOptions']
171
- end
172
-
173
173
  if attributes.key?(:'PdfRecognitionMode')
174
174
  self.pdf_recognition_mode = attributes[:'PdfRecognitionMode']
175
175
  end
@@ -298,12 +298,12 @@ module GroupDocsConversionCloud
298
298
  from_page == other.from_page &&
299
299
  pages_count == other.pages_count &&
300
300
  pages == other.pages &&
301
+ watermark_options == other.watermark_options &&
301
302
  width == other.width &&
302
303
  height == other.height &&
303
304
  dpi == other.dpi &&
304
305
  password == other.password &&
305
306
  zoom == other.zoom &&
306
- watermark_options == other.watermark_options &&
307
307
  pdf_recognition_mode == other.pdf_recognition_mode &&
308
308
  page_size == other.page_size &&
309
309
  page_orientation == other.page_orientation
@@ -318,7 +318,7 @@ module GroupDocsConversionCloud
318
318
  # Calculates hash code according to all attributes.
319
319
  # @return [Fixnum] Hash code
320
320
  def hash
321
- [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, pdf_recognition_mode, page_size, page_orientation].hash
321
+ [from_page, pages_count, pages, watermark_options, width, height, dpi, password, zoom, pdf_recognition_mode, page_size, page_orientation].hash
322
322
  end
323
323
 
324
324
  # Downcases first letter.
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
- # <copyright company="Aspose Pty Ltd" file="xps_convert_options.rb">
3
+ # <copyright company="Aspose Pty Ltd" file="e_book_convert_options.rb">
4
4
  # Copyright (c) 2003-2023 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
@@ -28,8 +28,8 @@
28
28
  require 'date'
29
29
 
30
30
  module GroupDocsConversionCloud
31
- # Xps convert options
32
- class XpsConvertOptions
31
+ # Ebook convert options
32
+ class EBookConvertOptions
33
33
 
34
34
  # Start conversion from FromPage page
35
35
  attr_accessor :from_page
@@ -40,52 +40,45 @@ module GroupDocsConversionCloud
40
40
  # Convert specific pages. The list contains the page indexes of the pages to be converted
41
41
  attr_accessor :pages
42
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
43
  # Watermark specific options
71
44
  attr_accessor :watermark_options
72
45
 
46
+ # Specifies page size
47
+ attr_accessor :page_size
48
+
49
+ # Specifies page orientation
50
+ attr_accessor :page_orientation
51
+ class EnumAttributeValidator
52
+ attr_reader :datatype
53
+ attr_reader :allowable_values
54
+
55
+ def initialize(datatype, allowable_values)
56
+ @allowable_values = allowable_values.map do |value|
57
+ case datatype.to_s
58
+ when /Integer/i
59
+ value.to_i
60
+ when /Float/i
61
+ value.to_f
62
+ else
63
+ value
64
+ end
65
+ end
66
+ end
67
+
68
+ def valid?(value)
69
+ !value || allowable_values.include?(value)
70
+ end
71
+ end
72
+
73
73
  # Attribute mapping from ruby-style variable name to JSON key.
74
74
  def self.attribute_map
75
75
  {
76
76
  :'from_page' => :'FromPage',
77
77
  :'pages_count' => :'PagesCount',
78
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'
79
+ :'watermark_options' => :'WatermarkOptions',
80
+ :'page_size' => :'PageSize',
81
+ :'page_orientation' => :'PageOrientation'
89
82
  }
90
83
  end
91
84
 
@@ -95,16 +88,9 @@ module GroupDocsConversionCloud
95
88
  :'from_page' => :'Integer',
96
89
  :'pages_count' => :'Integer',
97
90
  :'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'
91
+ :'watermark_options' => :'WatermarkOptions',
92
+ :'page_size' => :'String',
93
+ :'page_orientation' => :'String'
108
94
  }
109
95
  end
110
96
 
@@ -130,44 +116,16 @@ module GroupDocsConversionCloud
130
116
  end
131
117
  end
132
118
 
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']
119
+ if attributes.key?(:'WatermarkOptions')
120
+ self.watermark_options = attributes[:'WatermarkOptions']
159
121
  end
160
122
 
161
- if attributes.key?(:'MarginRight')
162
- self.margin_right = attributes[:'MarginRight']
123
+ if attributes.key?(:'PageSize')
124
+ self.page_size = attributes[:'PageSize']
163
125
  end
164
126
 
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']
127
+ if attributes.key?(:'PageOrientation')
128
+ self.page_orientation = attributes[:'PageOrientation']
171
129
  end
172
130
 
173
131
  end
@@ -184,36 +142,12 @@ module GroupDocsConversionCloud
184
142
  invalid_properties.push("invalid value for 'pages_count', pages_count cannot be nil.")
185
143
  end
186
144
 
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.")
145
+ if @page_size.nil?
146
+ invalid_properties.push("invalid value for 'page_size', page_size cannot be nil.")
205
147
  end
206
148
 
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.")
149
+ if @page_orientation.nil?
150
+ invalid_properties.push("invalid value for 'page_orientation', page_orientation cannot be nil.")
217
151
  end
218
152
 
219
153
  return invalid_properties
@@ -224,17 +158,43 @@ module GroupDocsConversionCloud
224
158
  def valid?
225
159
  return false if @from_page.nil?
226
160
  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?
161
+ return false if @page_size.nil?
162
+ page_size_validator = EnumAttributeValidator.new('String', ["Default", "A3", "Statement", "Quarto", "Paper11x17", "Paper10x14", "Letter", "Legal", "Ledger", "Folio", "Executive", "EnvelopeDL", "Custom", "B5", "B4", "A5", "A4", "Tabloid"])
163
+ return false unless page_size_validator.valid?(@page_size)
164
+ return false if @page_orientation.nil?
165
+ page_orientation_validator = EnumAttributeValidator.new('String', ["Default", "Landscape", "Portrait"])
166
+ return false unless page_orientation_validator.valid?(@page_orientation)
235
167
  return true
236
168
  end
237
169
 
170
+ # Custom attribute writer method checking allowed values (enum).
171
+ # @param [Object] page_size Object to be assigned
172
+ def page_size=(page_size)
173
+ validator = EnumAttributeValidator.new('String', ["Default", "A3", "Statement", "Quarto", "Paper11x17", "Paper10x14", "Letter", "Legal", "Ledger", "Folio", "Executive", "EnvelopeDL", "Custom", "B5", "B4", "A5", "A4", "Tabloid"])
174
+ if page_size.to_i == 0
175
+ unless validator.valid?(page_size)
176
+ raise ArgumentError, "invalid value for 'page_size', must be one of #{validator.allowable_values}."
177
+ end
178
+ @page_size = page_size
179
+ else
180
+ @page_size = validator.allowable_values[page_size.to_i]
181
+ end
182
+ end
183
+
184
+ # Custom attribute writer method checking allowed values (enum).
185
+ # @param [Object] page_orientation Object to be assigned
186
+ def page_orientation=(page_orientation)
187
+ validator = EnumAttributeValidator.new('String', ["Default", "Landscape", "Portrait"])
188
+ if page_orientation.to_i == 0
189
+ unless validator.valid?(page_orientation)
190
+ raise ArgumentError, "invalid value for 'page_orientation', must be one of #{validator.allowable_values}."
191
+ end
192
+ @page_orientation = page_orientation
193
+ else
194
+ @page_orientation = validator.allowable_values[page_orientation.to_i]
195
+ end
196
+ end
197
+
238
198
  # Checks equality by comparing each attribute.
239
199
  # @param [Object] Object to be compared
240
200
  def ==(other)
@@ -243,16 +203,9 @@ module GroupDocsConversionCloud
243
203
  from_page == other.from_page &&
244
204
  pages_count == other.pages_count &&
245
205
  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
206
+ watermark_options == other.watermark_options &&
207
+ page_size == other.page_size &&
208
+ page_orientation == other.page_orientation
256
209
  end
257
210
 
258
211
  # @see the `==` method
@@ -264,7 +217,7 @@ module GroupDocsConversionCloud
264
217
  # Calculates hash code according to all attributes.
265
218
  # @return [Fixnum] Hash code
266
219
  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
220
+ [from_page, pages_count, pages, watermark_options, page_size, page_orientation].hash
268
221
  end
269
222
 
270
223
  # Downcases first letter.