groupdocs_conversion_cloud 19.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. checksums.yaml +7 -0
  2. data/lib/groupdocs_conversion_cloud.rb +205 -0
  3. data/lib/groupdocs_conversion_cloud/api/conversion_api.rb +336 -0
  4. data/lib/groupdocs_conversion_cloud/api/file_api.rb +729 -0
  5. data/lib/groupdocs_conversion_cloud/api/folder_api.rb +694 -0
  6. data/lib/groupdocs_conversion_cloud/api/storage_api.rb +541 -0
  7. data/lib/groupdocs_conversion_cloud/api_client.rb +380 -0
  8. data/lib/groupdocs_conversion_cloud/api_error.rb +58 -0
  9. data/lib/groupdocs_conversion_cloud/configuration.rb +95 -0
  10. data/lib/groupdocs_conversion_cloud/models/bmp_convert_options.rb +361 -0
  11. data/lib/groupdocs_conversion_cloud/models/bmp_load_options.rb +214 -0
  12. data/lib/groupdocs_conversion_cloud/models/cad_load_options.rb +246 -0
  13. data/lib/groupdocs_conversion_cloud/models/cgm_convert_options.rb +361 -0
  14. data/lib/groupdocs_conversion_cloud/models/convert_options.rb +246 -0
  15. data/lib/groupdocs_conversion_cloud/models/convert_settings.rb +312 -0
  16. data/lib/groupdocs_conversion_cloud/models/csv_load_options.rb +279 -0
  17. data/lib/groupdocs_conversion_cloud/models/dcm_convert_options.rb +361 -0
  18. data/lib/groupdocs_conversion_cloud/models/dcm_load_options.rb +214 -0
  19. data/lib/groupdocs_conversion_cloud/models/dgn_load_options.rb +246 -0
  20. data/lib/groupdocs_conversion_cloud/models/diagram_load_options.rb +214 -0
  21. data/lib/groupdocs_conversion_cloud/models/disc_usage.rb +234 -0
  22. data/lib/groupdocs_conversion_cloud/models/djvu_convert_options.rb +361 -0
  23. data/lib/groupdocs_conversion_cloud/models/dng_convert_options.rb +361 -0
  24. data/lib/groupdocs_conversion_cloud/models/dng_load_options.rb +214 -0
  25. data/lib/groupdocs_conversion_cloud/models/doc_convert_options.rb +326 -0
  26. data/lib/groupdocs_conversion_cloud/models/doc_load_options.rb +281 -0
  27. data/lib/groupdocs_conversion_cloud/models/docm_convert_options.rb +326 -0
  28. data/lib/groupdocs_conversion_cloud/models/docm_load_options.rb +281 -0
  29. data/lib/groupdocs_conversion_cloud/models/docx_convert_options.rb +326 -0
  30. data/lib/groupdocs_conversion_cloud/models/docx_load_options.rb +281 -0
  31. data/lib/groupdocs_conversion_cloud/models/dot_convert_options.rb +326 -0
  32. data/lib/groupdocs_conversion_cloud/models/dot_load_options.rb +281 -0
  33. data/lib/groupdocs_conversion_cloud/models/dotm_convert_options.rb +326 -0
  34. data/lib/groupdocs_conversion_cloud/models/dotm_load_options.rb +281 -0
  35. data/lib/groupdocs_conversion_cloud/models/dotx_convert_options.rb +326 -0
  36. data/lib/groupdocs_conversion_cloud/models/dotx_load_options.rb +281 -0
  37. data/lib/groupdocs_conversion_cloud/models/dwf_load_options.rb +246 -0
  38. data/lib/groupdocs_conversion_cloud/models/dwg_load_options.rb +246 -0
  39. data/lib/groupdocs_conversion_cloud/models/dxf_load_options.rb +246 -0
  40. data/lib/groupdocs_conversion_cloud/models/email_load_options.rb +294 -0
  41. data/lib/groupdocs_conversion_cloud/models/emf_convert_options.rb +361 -0
  42. data/lib/groupdocs_conversion_cloud/models/emf_load_options.rb +214 -0
  43. data/lib/groupdocs_conversion_cloud/models/eml_load_options.rb +294 -0
  44. data/lib/groupdocs_conversion_cloud/models/emlx_load_options.rb +294 -0
  45. data/lib/groupdocs_conversion_cloud/models/epub_convert_options.rb +386 -0
  46. data/lib/groupdocs_conversion_cloud/models/error.rb +244 -0
  47. data/lib/groupdocs_conversion_cloud/models/error_details.rb +229 -0
  48. data/lib/groupdocs_conversion_cloud/models/file_version.rb +289 -0
  49. data/lib/groupdocs_conversion_cloud/models/file_versions.rb +216 -0
  50. data/lib/groupdocs_conversion_cloud/models/files_list.rb +216 -0
  51. data/lib/groupdocs_conversion_cloud/models/files_upload_result.rb +228 -0
  52. data/lib/groupdocs_conversion_cloud/models/gif_convert_options.rb +361 -0
  53. data/lib/groupdocs_conversion_cloud/models/gif_load_options.rb +214 -0
  54. data/lib/groupdocs_conversion_cloud/models/html_convert_options.rb +301 -0
  55. data/lib/groupdocs_conversion_cloud/models/ico_convert_options.rb +361 -0
  56. data/lib/groupdocs_conversion_cloud/models/ico_load_options.rb +214 -0
  57. data/lib/groupdocs_conversion_cloud/models/ifc_load_options.rb +246 -0
  58. data/lib/groupdocs_conversion_cloud/models/igs_load_options.rb +246 -0
  59. data/lib/groupdocs_conversion_cloud/models/image_convert_options.rb +361 -0
  60. data/lib/groupdocs_conversion_cloud/models/image_load_options.rb +214 -0
  61. data/lib/groupdocs_conversion_cloud/models/j2c_convert_options.rb +376 -0
  62. data/lib/groupdocs_conversion_cloud/models/j2c_load_options.rb +214 -0
  63. data/lib/groupdocs_conversion_cloud/models/j2k_convert_options.rb +376 -0
  64. data/lib/groupdocs_conversion_cloud/models/j2k_load_options.rb +214 -0
  65. data/lib/groupdocs_conversion_cloud/models/jp2_convert_options.rb +376 -0
  66. data/lib/groupdocs_conversion_cloud/models/jp2_load_options.rb +214 -0
  67. data/lib/groupdocs_conversion_cloud/models/jpeg_convert_options.rb +376 -0
  68. data/lib/groupdocs_conversion_cloud/models/jpeg_load_options.rb +214 -0
  69. data/lib/groupdocs_conversion_cloud/models/jpf_convert_options.rb +376 -0
  70. data/lib/groupdocs_conversion_cloud/models/jpf_load_options.rb +214 -0
  71. data/lib/groupdocs_conversion_cloud/models/jpg_convert_options.rb +376 -0
  72. data/lib/groupdocs_conversion_cloud/models/jpg_load_options.rb +214 -0
  73. data/lib/groupdocs_conversion_cloud/models/jpm_convert_options.rb +376 -0
  74. data/lib/groupdocs_conversion_cloud/models/jpm_load_options.rb +214 -0
  75. data/lib/groupdocs_conversion_cloud/models/jpx_convert_options.rb +376 -0
  76. data/lib/groupdocs_conversion_cloud/models/jpx_load_options.rb +214 -0
  77. data/lib/groupdocs_conversion_cloud/models/load_options.rb +204 -0
  78. data/lib/groupdocs_conversion_cloud/models/mht_load_options.rb +294 -0
  79. data/lib/groupdocs_conversion_cloud/models/mobi_load_options.rb +281 -0
  80. data/lib/groupdocs_conversion_cloud/models/msg_load_options.rb +294 -0
  81. data/lib/groupdocs_conversion_cloud/models/object_exist.rb +234 -0
  82. data/lib/groupdocs_conversion_cloud/models/odg_convert_options.rb +361 -0
  83. data/lib/groupdocs_conversion_cloud/models/odg_load_options.rb +214 -0
  84. data/lib/groupdocs_conversion_cloud/models/odp_convert_options.rb +281 -0
  85. data/lib/groupdocs_conversion_cloud/models/odp_load_options.rb +266 -0
  86. data/lib/groupdocs_conversion_cloud/models/ods_convert_options.rb +296 -0
  87. data/lib/groupdocs_conversion_cloud/models/ods_load_options.rb +321 -0
  88. data/lib/groupdocs_conversion_cloud/models/odt_convert_options.rb +326 -0
  89. data/lib/groupdocs_conversion_cloud/models/odt_load_options.rb +281 -0
  90. data/lib/groupdocs_conversion_cloud/models/one_load_options.rb +236 -0
  91. data/lib/groupdocs_conversion_cloud/models/ost_load_options.rb +294 -0
  92. data/lib/groupdocs_conversion_cloud/models/otp_convert_options.rb +281 -0
  93. data/lib/groupdocs_conversion_cloud/models/otp_load_options.rb +266 -0
  94. data/lib/groupdocs_conversion_cloud/models/ots_convert_options.rb +296 -0
  95. data/lib/groupdocs_conversion_cloud/models/ots_load_options.rb +321 -0
  96. data/lib/groupdocs_conversion_cloud/models/ott_convert_options.rb +326 -0
  97. data/lib/groupdocs_conversion_cloud/models/ott_load_options.rb +281 -0
  98. data/lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb +863 -0
  99. data/lib/groupdocs_conversion_cloud/models/pdf_load_options.rb +259 -0
  100. data/lib/groupdocs_conversion_cloud/models/plt_load_options.rb +246 -0
  101. data/lib/groupdocs_conversion_cloud/models/png_convert_options.rb +361 -0
  102. data/lib/groupdocs_conversion_cloud/models/png_load_options.rb +214 -0
  103. data/lib/groupdocs_conversion_cloud/models/potm_convert_options.rb +281 -0
  104. data/lib/groupdocs_conversion_cloud/models/potm_load_options.rb +266 -0
  105. data/lib/groupdocs_conversion_cloud/models/potx_convert_options.rb +281 -0
  106. data/lib/groupdocs_conversion_cloud/models/potx_load_options.rb +266 -0
  107. data/lib/groupdocs_conversion_cloud/models/pps_convert_options.rb +281 -0
  108. data/lib/groupdocs_conversion_cloud/models/pps_load_options.rb +266 -0
  109. data/lib/groupdocs_conversion_cloud/models/ppsm_convert_options.rb +281 -0
  110. data/lib/groupdocs_conversion_cloud/models/ppsm_load_options.rb +266 -0
  111. data/lib/groupdocs_conversion_cloud/models/ppsx_convert_options.rb +281 -0
  112. data/lib/groupdocs_conversion_cloud/models/ppsx_load_options.rb +266 -0
  113. data/lib/groupdocs_conversion_cloud/models/ppt_convert_options.rb +281 -0
  114. data/lib/groupdocs_conversion_cloud/models/ppt_load_options.rb +266 -0
  115. data/lib/groupdocs_conversion_cloud/models/pptm_convert_options.rb +281 -0
  116. data/lib/groupdocs_conversion_cloud/models/pptm_load_options.rb +266 -0
  117. data/lib/groupdocs_conversion_cloud/models/pptx_convert_options.rb +281 -0
  118. data/lib/groupdocs_conversion_cloud/models/pptx_load_options.rb +266 -0
  119. data/lib/groupdocs_conversion_cloud/models/presentation_convert_options.rb +281 -0
  120. data/lib/groupdocs_conversion_cloud/models/presentation_load_options.rb +266 -0
  121. data/lib/groupdocs_conversion_cloud/models/psd_convert_options.rb +489 -0
  122. data/lib/groupdocs_conversion_cloud/models/psd_load_options.rb +214 -0
  123. data/lib/groupdocs_conversion_cloud/models/pst_load_options.rb +294 -0
  124. data/lib/groupdocs_conversion_cloud/models/rtf_convert_options.rb +341 -0
  125. data/lib/groupdocs_conversion_cloud/models/spreadsheet_convert_options.rb +296 -0
  126. data/lib/groupdocs_conversion_cloud/models/spreadsheet_load_options.rb +321 -0
  127. data/lib/groupdocs_conversion_cloud/models/stl_load_options.rb +246 -0
  128. data/lib/groupdocs_conversion_cloud/models/storage_exist.rb +219 -0
  129. data/lib/groupdocs_conversion_cloud/models/storage_file.rb +264 -0
  130. data/lib/groupdocs_conversion_cloud/models/stored_converted_result.rb +249 -0
  131. data/lib/groupdocs_conversion_cloud/models/supported_format.rb +226 -0
  132. data/lib/groupdocs_conversion_cloud/models/svg_convert_options.rb +331 -0
  133. data/lib/groupdocs_conversion_cloud/models/tif_convert_options.rb +408 -0
  134. data/lib/groupdocs_conversion_cloud/models/tif_load_options.rb +214 -0
  135. data/lib/groupdocs_conversion_cloud/models/tiff_convert_options.rb +408 -0
  136. data/lib/groupdocs_conversion_cloud/models/tiff_load_options.rb +214 -0
  137. data/lib/groupdocs_conversion_cloud/models/tsv_convert_options.rb +296 -0
  138. data/lib/groupdocs_conversion_cloud/models/tsv_load_options.rb +321 -0
  139. data/lib/groupdocs_conversion_cloud/models/txt_convert_options.rb +246 -0
  140. data/lib/groupdocs_conversion_cloud/models/txt_load_options.rb +302 -0
  141. data/lib/groupdocs_conversion_cloud/models/vdw_load_options.rb +214 -0
  142. data/lib/groupdocs_conversion_cloud/models/vdx_load_options.rb +214 -0
  143. data/lib/groupdocs_conversion_cloud/models/vsd_load_options.rb +214 -0
  144. data/lib/groupdocs_conversion_cloud/models/vsdm_load_options.rb +214 -0
  145. data/lib/groupdocs_conversion_cloud/models/vsdx_load_options.rb +214 -0
  146. data/lib/groupdocs_conversion_cloud/models/vss_load_options.rb +214 -0
  147. data/lib/groupdocs_conversion_cloud/models/vssm_load_options.rb +214 -0
  148. data/lib/groupdocs_conversion_cloud/models/vssx_load_options.rb +214 -0
  149. data/lib/groupdocs_conversion_cloud/models/vst_load_options.rb +214 -0
  150. data/lib/groupdocs_conversion_cloud/models/vstm_load_options.rb +214 -0
  151. data/lib/groupdocs_conversion_cloud/models/vstx_load_options.rb +214 -0
  152. data/lib/groupdocs_conversion_cloud/models/vsx_load_options.rb +214 -0
  153. data/lib/groupdocs_conversion_cloud/models/vtx_load_options.rb +214 -0
  154. data/lib/groupdocs_conversion_cloud/models/watermark_options.rb +364 -0
  155. data/lib/groupdocs_conversion_cloud/models/webp_convert_options.rb +376 -0
  156. data/lib/groupdocs_conversion_cloud/models/webp_load_options.rb +214 -0
  157. data/lib/groupdocs_conversion_cloud/models/wmf_convert_options.rb +361 -0
  158. data/lib/groupdocs_conversion_cloud/models/wmf_load_options.rb +214 -0
  159. data/lib/groupdocs_conversion_cloud/models/word_processing_convert_options.rb +326 -0
  160. data/lib/groupdocs_conversion_cloud/models/word_processing_load_options.rb +281 -0
  161. data/lib/groupdocs_conversion_cloud/models/xls2003_convert_options.rb +296 -0
  162. data/lib/groupdocs_conversion_cloud/models/xls2003_load_options.rb +321 -0
  163. data/lib/groupdocs_conversion_cloud/models/xls_convert_options.rb +296 -0
  164. data/lib/groupdocs_conversion_cloud/models/xls_load_options.rb +321 -0
  165. data/lib/groupdocs_conversion_cloud/models/xlsb_convert_options.rb +296 -0
  166. data/lib/groupdocs_conversion_cloud/models/xlsb_load_options.rb +321 -0
  167. data/lib/groupdocs_conversion_cloud/models/xlsm_convert_options.rb +296 -0
  168. data/lib/groupdocs_conversion_cloud/models/xlsm_load_options.rb +321 -0
  169. data/lib/groupdocs_conversion_cloud/models/xlsx_convert_options.rb +296 -0
  170. data/lib/groupdocs_conversion_cloud/models/xlsx_load_options.rb +321 -0
  171. data/lib/groupdocs_conversion_cloud/models/xltm_convert_options.rb +296 -0
  172. data/lib/groupdocs_conversion_cloud/models/xltm_load_options.rb +321 -0
  173. data/lib/groupdocs_conversion_cloud/models/xltx_convert_options.rb +296 -0
  174. data/lib/groupdocs_conversion_cloud/models/xltx_load_options.rb +321 -0
  175. data/lib/groupdocs_conversion_cloud/models/xml_load_options.rb +230 -0
  176. data/lib/groupdocs_conversion_cloud/models/xps_convert_options.rb +386 -0
  177. data/lib/groupdocs_conversion_cloud/version.rb +29 -0
  178. metadata +288 -0
@@ -0,0 +1,341 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="rtf_convert_options.rb">
4
+ # Copyright (c) 2003-2019 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
+ # Rtf convert options
32
+ class RtfConvertOptions
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 after conversion
44
+ attr_accessor :width
45
+
46
+ # Desired page height 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
+ # 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
+ attr_accessor :zoom
57
+
58
+ # Watermark specific options
59
+ attr_accessor :watermark_options
60
+
61
+ # Specifies whether the keywords for \"old readers\" are written to RTF or not. This can significantly affect the size of the RTF document. Default is False.
62
+ attr_accessor :export_images_for_old_readers
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'from_page' => :'FromPage',
68
+ :'pages_count' => :'PagesCount',
69
+ :'pages' => :'Pages',
70
+ :'width' => :'Width',
71
+ :'height' => :'Height',
72
+ :'dpi' => :'Dpi',
73
+ :'password' => :'Password',
74
+ :'zoom' => :'Zoom',
75
+ :'watermark_options' => :'WatermarkOptions',
76
+ :'export_images_for_old_readers' => :'ExportImagesForOldReaders'
77
+ }
78
+ end
79
+
80
+ # Attribute type mapping.
81
+ def self.swagger_types
82
+ {
83
+ :'from_page' => :'Integer',
84
+ :'pages_count' => :'Integer',
85
+ :'pages' => :'Array<Integer>',
86
+ :'width' => :'Integer',
87
+ :'height' => :'Integer',
88
+ :'dpi' => :'Float',
89
+ :'password' => :'String',
90
+ :'zoom' => :'Integer',
91
+ :'watermark_options' => :'WatermarkOptions',
92
+ :'export_images_for_old_readers' => :'BOOLEAN'
93
+ }
94
+ end
95
+
96
+ # Initializes the object
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ def initialize(attributes = {})
99
+ return unless attributes.is_a?(Hash)
100
+
101
+ # convert string to symbol for hash key
102
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
103
+
104
+ if attributes.key?(:'FromPage')
105
+ self.from_page = attributes[:'FromPage']
106
+ end
107
+
108
+ if attributes.key?(:'PagesCount')
109
+ self.pages_count = attributes[:'PagesCount']
110
+ end
111
+
112
+ if attributes.key?(:'Pages')
113
+ if (value = attributes[:'Pages']).is_a?(Array)
114
+ self.pages = value
115
+ end
116
+ end
117
+
118
+ if attributes.key?(:'Width')
119
+ self.width = attributes[:'Width']
120
+ end
121
+
122
+ if attributes.key?(:'Height')
123
+ self.height = attributes[:'Height']
124
+ end
125
+
126
+ if attributes.key?(:'Dpi')
127
+ self.dpi = attributes[:'Dpi']
128
+ end
129
+
130
+ if attributes.key?(:'Password')
131
+ self.password = attributes[:'Password']
132
+ end
133
+
134
+ if attributes.key?(:'Zoom')
135
+ self.zoom = attributes[:'Zoom']
136
+ end
137
+
138
+ if attributes.key?(:'WatermarkOptions')
139
+ self.watermark_options = attributes[:'WatermarkOptions']
140
+ end
141
+
142
+ if attributes.key?(:'ExportImagesForOldReaders')
143
+ self.export_images_for_old_readers = attributes[:'ExportImagesForOldReaders']
144
+ end
145
+
146
+ end
147
+
148
+ # Show invalid properties with the reasons. Usually used together with valid?
149
+ # @return Array for valid properies with the reasons
150
+ def list_invalid_properties
151
+ invalid_properties = []
152
+ if @from_page.nil?
153
+ invalid_properties.push("invalid value for 'from_page', from_page cannot be nil.")
154
+ end
155
+
156
+ if @pages_count.nil?
157
+ invalid_properties.push("invalid value for 'pages_count', pages_count cannot be nil.")
158
+ end
159
+
160
+ if @width.nil?
161
+ invalid_properties.push("invalid value for 'width', width cannot be nil.")
162
+ end
163
+
164
+ if @height.nil?
165
+ invalid_properties.push("invalid value for 'height', height cannot be nil.")
166
+ end
167
+
168
+ if @dpi.nil?
169
+ invalid_properties.push("invalid value for 'dpi', dpi cannot be nil.")
170
+ end
171
+
172
+ if @zoom.nil?
173
+ invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
174
+ end
175
+
176
+ if @export_images_for_old_readers.nil?
177
+ invalid_properties.push("invalid value for 'export_images_for_old_readers', export_images_for_old_readers cannot be nil.")
178
+ end
179
+
180
+ return invalid_properties
181
+ end
182
+
183
+ # Check to see if the all the properties in the model are valid
184
+ # @return true if the model is valid
185
+ def valid?
186
+ return false if @from_page.nil?
187
+ return false if @pages_count.nil?
188
+ return false if @width.nil?
189
+ return false if @height.nil?
190
+ return false if @dpi.nil?
191
+ return false if @zoom.nil?
192
+ return false if @export_images_for_old_readers.nil?
193
+ return true
194
+ end
195
+
196
+ # Checks equality by comparing each attribute.
197
+ # @param [Object] Object to be compared
198
+ def ==(other)
199
+ return true if self.equal?(other)
200
+ self.class == other.class &&
201
+ from_page == other.from_page &&
202
+ pages_count == other.pages_count &&
203
+ pages == other.pages &&
204
+ width == other.width &&
205
+ height == other.height &&
206
+ dpi == other.dpi &&
207
+ password == other.password &&
208
+ zoom == other.zoom &&
209
+ watermark_options == other.watermark_options &&
210
+ export_images_for_old_readers == other.export_images_for_old_readers
211
+ end
212
+
213
+ # @see the `==` method
214
+ # @param [Object] Object to be compared
215
+ def eql?(other)
216
+ self == other
217
+ end
218
+
219
+ # Calculates hash code according to all attributes.
220
+ # @return [Fixnum] Hash code
221
+ def hash
222
+ [from_page, pages_count, pages, width, height, dpi, password, zoom, watermark_options, export_images_for_old_readers].hash
223
+ end
224
+
225
+ # Downcases first letter.
226
+ # @return downcased string
227
+ def uncap(str)
228
+ str[0, 1].downcase + str[1..-1]
229
+ end
230
+
231
+ # Builds the object from hash
232
+ # @param [Hash] attributes Model attributes in the form of hash
233
+ # @return [Object] Returns the model itself
234
+ def build_from_hash(attributes)
235
+ return nil unless attributes.is_a?(Hash)
236
+ self.class.swagger_types.each_pair do |key, type|
237
+ pname = uncap(self.class.attribute_map[key]).intern
238
+ value = attributes[pname]
239
+ if type =~ /\AArray<(.*)>/i
240
+ # check to ensure the input is an array given that the the attribute
241
+ # is documented as an array but the input is not
242
+ if value.is_a?(Array)
243
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
244
+ end
245
+ elsif !value.nil?
246
+ self.send("#{key}=", _deserialize(type, value))
247
+ end
248
+ # or else data not found in attributes(hash), not an issue as the data can be optional
249
+ end
250
+
251
+ self
252
+ end
253
+
254
+ # Deserializes the data based on type
255
+ # @param string type Data type
256
+ # @param string value Value to be deserialized
257
+ # @return [Object] Deserialized data
258
+ def _deserialize(type, value)
259
+ case type.to_sym
260
+ when :DateTime
261
+ Date.parse value
262
+ when :Date
263
+ Date.parse value
264
+ when :String
265
+ value.to_s
266
+ when :Integer
267
+ value.to_i
268
+ when :Float
269
+ value.to_f
270
+ when :BOOLEAN
271
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
272
+ true
273
+ else
274
+ false
275
+ end
276
+ when :Object
277
+ # generic object (usually a Hash), return directly
278
+ value
279
+ when /\AArray<(?<inner_type>.+)>\z/
280
+ inner_type = Regexp.last_match[:inner_type]
281
+ value.map { |v| _deserialize(inner_type, v) }
282
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
283
+ k_type = Regexp.last_match[:k_type]
284
+ v_type = Regexp.last_match[:v_type]
285
+ {}.tap do |hash|
286
+ value.each do |k, v|
287
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
288
+ end
289
+ end
290
+ else
291
+ # model
292
+ temp_model = GroupDocsConversionCloud.const_get(type).new
293
+ temp_model.build_from_hash(value)
294
+ end
295
+ end
296
+
297
+ # Returns the string representation of the object
298
+ # @return [String] String presentation of the object
299
+ def to_s
300
+ to_hash.to_s
301
+ end
302
+
303
+ # to_body is an alias to to_hash (backward compatibility)
304
+ # @return [Hash] Returns the object in the form of hash
305
+ def to_body
306
+ to_hash
307
+ end
308
+
309
+ # Returns the object in the form of hash
310
+ # @return [Hash] Returns the object in the form of hash
311
+ def to_hash
312
+ hash = {}
313
+ self.class.attribute_map.each_pair do |attr, param|
314
+ value = self.send(attr)
315
+ next if value.nil?
316
+ hash[param] = _to_hash(value)
317
+ end
318
+ hash
319
+ end
320
+
321
+ # Outputs non-array value in the form of hash
322
+ # For object, use to_hash. Otherwise, just return the value
323
+ # @param [Object] value Any valid value
324
+ # @return [Hash] Returns the value in the form of hash
325
+ def _to_hash(value)
326
+ if value.is_a?(Array)
327
+ value.compact.map { |v| _to_hash(v) }
328
+ elsif value.is_a?(Hash)
329
+ {}.tap do |hash|
330
+ value.each { |k, v| hash[k] = _to_hash(v) }
331
+ end
332
+ elsif value.respond_to? :to_hash
333
+ value.to_hash
334
+ else
335
+ value
336
+ end
337
+ end
338
+
339
+ end
340
+
341
+ end
@@ -0,0 +1,296 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="spreadsheet_convert_options.rb">
4
+ # Copyright (c) 2003-2019 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
+ # Spreadsheet сonvert options class
32
+ class SpreadsheetConvertOptions
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
+ # Set this property if you want to protect the converted document with a password
44
+ attr_accessor :password
45
+
46
+ # Specifies the zoom level in percentage. Default is 100.
47
+ attr_accessor :zoom
48
+
49
+ # If true, the input firstly is converted to PDF and after that to desired format
50
+ attr_accessor :use_pdf
51
+
52
+ # Watermark specific options
53
+ attr_accessor :watermark_options
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+ :'from_page' => :'FromPage',
59
+ :'pages_count' => :'PagesCount',
60
+ :'pages' => :'Pages',
61
+ :'password' => :'Password',
62
+ :'zoom' => :'Zoom',
63
+ :'use_pdf' => :'UsePdf',
64
+ :'watermark_options' => :'WatermarkOptions'
65
+ }
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.swagger_types
70
+ {
71
+ :'from_page' => :'Integer',
72
+ :'pages_count' => :'Integer',
73
+ :'pages' => :'Array<Integer>',
74
+ :'password' => :'String',
75
+ :'zoom' => :'Integer',
76
+ :'use_pdf' => :'BOOLEAN',
77
+ :'watermark_options' => :'WatermarkOptions'
78
+ }
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ return unless attributes.is_a?(Hash)
85
+
86
+ # convert string to symbol for hash key
87
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
88
+
89
+ if attributes.key?(:'FromPage')
90
+ self.from_page = attributes[:'FromPage']
91
+ end
92
+
93
+ if attributes.key?(:'PagesCount')
94
+ self.pages_count = attributes[:'PagesCount']
95
+ end
96
+
97
+ if attributes.key?(:'Pages')
98
+ if (value = attributes[:'Pages']).is_a?(Array)
99
+ self.pages = value
100
+ end
101
+ end
102
+
103
+ if attributes.key?(:'Password')
104
+ self.password = attributes[:'Password']
105
+ end
106
+
107
+ if attributes.key?(:'Zoom')
108
+ self.zoom = attributes[:'Zoom']
109
+ end
110
+
111
+ if attributes.key?(:'UsePdf')
112
+ self.use_pdf = attributes[:'UsePdf']
113
+ end
114
+
115
+ if attributes.key?(:'WatermarkOptions')
116
+ self.watermark_options = attributes[:'WatermarkOptions']
117
+ end
118
+
119
+ end
120
+
121
+ # Show invalid properties with the reasons. Usually used together with valid?
122
+ # @return Array for valid properies with the reasons
123
+ def list_invalid_properties
124
+ invalid_properties = []
125
+ if @from_page.nil?
126
+ invalid_properties.push("invalid value for 'from_page', from_page cannot be nil.")
127
+ end
128
+
129
+ if @pages_count.nil?
130
+ invalid_properties.push("invalid value for 'pages_count', pages_count cannot be nil.")
131
+ end
132
+
133
+ if @zoom.nil?
134
+ invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
135
+ end
136
+
137
+ if @use_pdf.nil?
138
+ invalid_properties.push("invalid value for 'use_pdf', use_pdf cannot be nil.")
139
+ end
140
+
141
+ return invalid_properties
142
+ end
143
+
144
+ # Check to see if the all the properties in the model are valid
145
+ # @return true if the model is valid
146
+ def valid?
147
+ return false if @from_page.nil?
148
+ return false if @pages_count.nil?
149
+ return false if @zoom.nil?
150
+ return false if @use_pdf.nil?
151
+ return true
152
+ end
153
+
154
+ # Checks equality by comparing each attribute.
155
+ # @param [Object] Object to be compared
156
+ def ==(other)
157
+ return true if self.equal?(other)
158
+ self.class == other.class &&
159
+ from_page == other.from_page &&
160
+ pages_count == other.pages_count &&
161
+ pages == other.pages &&
162
+ password == other.password &&
163
+ zoom == other.zoom &&
164
+ use_pdf == other.use_pdf &&
165
+ watermark_options == other.watermark_options
166
+ end
167
+
168
+ # @see the `==` method
169
+ # @param [Object] Object to be compared
170
+ def eql?(other)
171
+ self == other
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Fixnum] Hash code
176
+ def hash
177
+ [from_page, pages_count, pages, password, zoom, use_pdf, watermark_options].hash
178
+ end
179
+
180
+ # Downcases first letter.
181
+ # @return downcased string
182
+ def uncap(str)
183
+ str[0, 1].downcase + str[1..-1]
184
+ end
185
+
186
+ # Builds the object from hash
187
+ # @param [Hash] attributes Model attributes in the form of hash
188
+ # @return [Object] Returns the model itself
189
+ def build_from_hash(attributes)
190
+ return nil unless attributes.is_a?(Hash)
191
+ self.class.swagger_types.each_pair do |key, type|
192
+ pname = uncap(self.class.attribute_map[key]).intern
193
+ value = attributes[pname]
194
+ if type =~ /\AArray<(.*)>/i
195
+ # check to ensure the input is an array given that the the attribute
196
+ # is documented as an array but the input is not
197
+ if value.is_a?(Array)
198
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
199
+ end
200
+ elsif !value.nil?
201
+ self.send("#{key}=", _deserialize(type, value))
202
+ end
203
+ # or else data not found in attributes(hash), not an issue as the data can be optional
204
+ end
205
+
206
+ self
207
+ end
208
+
209
+ # Deserializes the data based on type
210
+ # @param string type Data type
211
+ # @param string value Value to be deserialized
212
+ # @return [Object] Deserialized data
213
+ def _deserialize(type, value)
214
+ case type.to_sym
215
+ when :DateTime
216
+ Date.parse value
217
+ when :Date
218
+ Date.parse value
219
+ when :String
220
+ value.to_s
221
+ when :Integer
222
+ value.to_i
223
+ when :Float
224
+ value.to_f
225
+ when :BOOLEAN
226
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
227
+ true
228
+ else
229
+ false
230
+ end
231
+ when :Object
232
+ # generic object (usually a Hash), return directly
233
+ value
234
+ when /\AArray<(?<inner_type>.+)>\z/
235
+ inner_type = Regexp.last_match[:inner_type]
236
+ value.map { |v| _deserialize(inner_type, v) }
237
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
238
+ k_type = Regexp.last_match[:k_type]
239
+ v_type = Regexp.last_match[:v_type]
240
+ {}.tap do |hash|
241
+ value.each do |k, v|
242
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
243
+ end
244
+ end
245
+ else
246
+ # model
247
+ temp_model = GroupDocsConversionCloud.const_get(type).new
248
+ temp_model.build_from_hash(value)
249
+ end
250
+ end
251
+
252
+ # Returns the string representation of the object
253
+ # @return [String] String presentation of the object
254
+ def to_s
255
+ to_hash.to_s
256
+ end
257
+
258
+ # to_body is an alias to to_hash (backward compatibility)
259
+ # @return [Hash] Returns the object in the form of hash
260
+ def to_body
261
+ to_hash
262
+ end
263
+
264
+ # Returns the object in the form of hash
265
+ # @return [Hash] Returns the object in the form of hash
266
+ def to_hash
267
+ hash = {}
268
+ self.class.attribute_map.each_pair do |attr, param|
269
+ value = self.send(attr)
270
+ next if value.nil?
271
+ hash[param] = _to_hash(value)
272
+ end
273
+ hash
274
+ end
275
+
276
+ # Outputs non-array value in the form of hash
277
+ # For object, use to_hash. Otherwise, just return the value
278
+ # @param [Object] value Any valid value
279
+ # @return [Hash] Returns the value in the form of hash
280
+ def _to_hash(value)
281
+ if value.is_a?(Array)
282
+ value.compact.map { |v| _to_hash(v) }
283
+ elsif value.is_a?(Hash)
284
+ {}.tap do |hash|
285
+ value.each { |k, v| hash[k] = _to_hash(v) }
286
+ end
287
+ elsif value.respond_to? :to_hash
288
+ value.to_hash
289
+ else
290
+ value
291
+ end
292
+ end
293
+
294
+ end
295
+
296
+ end