groupdocs_conversion_cloud 25.8 → 25.9

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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_conversion_cloud/version.rb +1 -1
  3. data/lib/groupdocs_conversion_cloud.rb +0 -79
  4. metadata +2 -81
  5. data/lib/groupdocs_conversion_cloud/models/bmp_load_options.rb +0 -224
  6. data/lib/groupdocs_conversion_cloud/models/cf2_load_options.rb +0 -298
  7. data/lib/groupdocs_conversion_cloud/models/dcm_load_options.rb +0 -224
  8. data/lib/groupdocs_conversion_cloud/models/dgn_load_options.rb +0 -298
  9. data/lib/groupdocs_conversion_cloud/models/dng_load_options.rb +0 -224
  10. data/lib/groupdocs_conversion_cloud/models/doc_load_options.rb +0 -658
  11. data/lib/groupdocs_conversion_cloud/models/docm_load_options.rb +0 -658
  12. data/lib/groupdocs_conversion_cloud/models/docx_load_options.rb +0 -658
  13. data/lib/groupdocs_conversion_cloud/models/dot_load_options.rb +0 -658
  14. data/lib/groupdocs_conversion_cloud/models/dotm_load_options.rb +0 -658
  15. data/lib/groupdocs_conversion_cloud/models/dotx_load_options.rb +0 -658
  16. data/lib/groupdocs_conversion_cloud/models/dwf_load_options.rb +0 -298
  17. data/lib/groupdocs_conversion_cloud/models/dwfx_load_options.rb +0 -298
  18. data/lib/groupdocs_conversion_cloud/models/dwg_load_options.rb +0 -298
  19. data/lib/groupdocs_conversion_cloud/models/dwt_load_options.rb +0 -298
  20. data/lib/groupdocs_conversion_cloud/models/dxf_load_options.rb +0 -298
  21. data/lib/groupdocs_conversion_cloud/models/emf_load_options.rb +0 -224
  22. data/lib/groupdocs_conversion_cloud/models/eml_load_options.rb +0 -406
  23. data/lib/groupdocs_conversion_cloud/models/emlx_load_options.rb +0 -406
  24. data/lib/groupdocs_conversion_cloud/models/gif_load_options.rb +0 -224
  25. data/lib/groupdocs_conversion_cloud/models/ico_load_options.rb +0 -224
  26. data/lib/groupdocs_conversion_cloud/models/ifc_load_options.rb +0 -298
  27. data/lib/groupdocs_conversion_cloud/models/igs_load_options.rb +0 -298
  28. data/lib/groupdocs_conversion_cloud/models/j2c_load_options.rb +0 -224
  29. data/lib/groupdocs_conversion_cloud/models/j2k_load_options.rb +0 -224
  30. data/lib/groupdocs_conversion_cloud/models/jp2_load_options.rb +0 -224
  31. data/lib/groupdocs_conversion_cloud/models/jpeg_load_options.rb +0 -224
  32. data/lib/groupdocs_conversion_cloud/models/jpf_load_options.rb +0 -224
  33. data/lib/groupdocs_conversion_cloud/models/jpg_load_options.rb +0 -224
  34. data/lib/groupdocs_conversion_cloud/models/jpm_load_options.rb +0 -224
  35. data/lib/groupdocs_conversion_cloud/models/jpx_load_options.rb +0 -224
  36. data/lib/groupdocs_conversion_cloud/models/mht_load_options.rb +0 -406
  37. data/lib/groupdocs_conversion_cloud/models/mobi_load_options.rb +0 -658
  38. data/lib/groupdocs_conversion_cloud/models/msg_load_options.rb +0 -406
  39. data/lib/groupdocs_conversion_cloud/models/odg_load_options.rb +0 -224
  40. data/lib/groupdocs_conversion_cloud/models/odp_load_options.rb +0 -434
  41. data/lib/groupdocs_conversion_cloud/models/ods_load_options.rb +0 -537
  42. data/lib/groupdocs_conversion_cloud/models/odt_load_options.rb +0 -658
  43. data/lib/groupdocs_conversion_cloud/models/ost_load_options.rb +0 -406
  44. data/lib/groupdocs_conversion_cloud/models/otp_load_options.rb +0 -434
  45. data/lib/groupdocs_conversion_cloud/models/ots_load_options.rb +0 -537
  46. data/lib/groupdocs_conversion_cloud/models/ott_load_options.rb +0 -658
  47. data/lib/groupdocs_conversion_cloud/models/plt_load_options.rb +0 -298
  48. data/lib/groupdocs_conversion_cloud/models/png_load_options.rb +0 -224
  49. data/lib/groupdocs_conversion_cloud/models/potm_load_options.rb +0 -434
  50. data/lib/groupdocs_conversion_cloud/models/potx_load_options.rb +0 -434
  51. data/lib/groupdocs_conversion_cloud/models/pps_load_options.rb +0 -434
  52. data/lib/groupdocs_conversion_cloud/models/ppsm_load_options.rb +0 -434
  53. data/lib/groupdocs_conversion_cloud/models/ppsx_load_options.rb +0 -434
  54. data/lib/groupdocs_conversion_cloud/models/ppt_load_options.rb +0 -434
  55. data/lib/groupdocs_conversion_cloud/models/pptm_load_options.rb +0 -434
  56. data/lib/groupdocs_conversion_cloud/models/pptx_load_options.rb +0 -434
  57. data/lib/groupdocs_conversion_cloud/models/psd_load_options.rb +0 -224
  58. data/lib/groupdocs_conversion_cloud/models/pst_load_options.rb +0 -406
  59. data/lib/groupdocs_conversion_cloud/models/stl_load_options.rb +0 -298
  60. data/lib/groupdocs_conversion_cloud/models/tif_load_options.rb +0 -224
  61. data/lib/groupdocs_conversion_cloud/models/tiff_load_options.rb +0 -224
  62. data/lib/groupdocs_conversion_cloud/models/vdw_load_options.rb +0 -224
  63. data/lib/groupdocs_conversion_cloud/models/vdx_load_options.rb +0 -224
  64. data/lib/groupdocs_conversion_cloud/models/vsd_load_options.rb +0 -224
  65. data/lib/groupdocs_conversion_cloud/models/vsdm_load_options.rb +0 -224
  66. data/lib/groupdocs_conversion_cloud/models/vsdx_load_options.rb +0 -224
  67. data/lib/groupdocs_conversion_cloud/models/vss_load_options.rb +0 -224
  68. data/lib/groupdocs_conversion_cloud/models/vssm_load_options.rb +0 -224
  69. data/lib/groupdocs_conversion_cloud/models/vssx_load_options.rb +0 -224
  70. data/lib/groupdocs_conversion_cloud/models/vst_load_options.rb +0 -224
  71. data/lib/groupdocs_conversion_cloud/models/vstm_load_options.rb +0 -224
  72. data/lib/groupdocs_conversion_cloud/models/vstx_load_options.rb +0 -224
  73. data/lib/groupdocs_conversion_cloud/models/vsx_load_options.rb +0 -224
  74. data/lib/groupdocs_conversion_cloud/models/vtx_load_options.rb +0 -224
  75. data/lib/groupdocs_conversion_cloud/models/webp_load_options.rb +0 -224
  76. data/lib/groupdocs_conversion_cloud/models/wmf_load_options.rb +0 -224
  77. data/lib/groupdocs_conversion_cloud/models/xls2003_load_options.rb +0 -537
  78. data/lib/groupdocs_conversion_cloud/models/xls_load_options.rb +0 -537
  79. data/lib/groupdocs_conversion_cloud/models/xlsb_load_options.rb +0 -537
  80. data/lib/groupdocs_conversion_cloud/models/xlsm_load_options.rb +0 -537
  81. data/lib/groupdocs_conversion_cloud/models/xlsx_load_options.rb +0 -537
  82. data/lib/groupdocs_conversion_cloud/models/xltm_load_options.rb +0 -537
  83. data/lib/groupdocs_conversion_cloud/models/xltx_load_options.rb +0 -537
@@ -1,537 +0,0 @@
1
- #
2
- # --------------------------------------------------------------------------------------------------------------------
3
- # <copyright company="Aspose Pty Ltd" file="xlsx_load_options.rb">
4
- # Copyright (c) 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
- # Xlsx load options
32
- class XlsxLoadOptions
33
-
34
- # The format of input file, (\"docx\", for example). This field must be filled with correct input file format when using ConvertDirect method, which accept input file as binary stream, and, because of that, API can correctly handle LoadOptions. In regular conversion, the input file format taken from the input file name and this field ignored.
35
- attr_accessor :format
36
-
37
- # Clear custom document properties. Default is false.
38
- attr_accessor :clear_custom_document_properties
39
-
40
- # Clear built-in document properties. Default is false.
41
- attr_accessor :clear_built_in_document_properties
42
-
43
- # Split a worksheet into pages by rows. Default is 0, no pagination.
44
- attr_accessor :rows_per_page
45
-
46
- # Split a worksheet into pages by columns. Default is 0, no pagination.
47
- attr_accessor :columns_per_page
48
-
49
- # Autofits all rows when converting
50
- attr_accessor :auto_fit_rows
51
-
52
- # If AllColumnsInOnePagePerSheet is true, all column content of one sheet will output to only one page in result. The width of paper size of pagesetup will be invalid, and the other settings of pagesetup will still take effect.
53
- attr_accessor :all_columns_in_one_page_per_sheet
54
-
55
- # System culture info at the time file is loaded
56
- attr_accessor :culture_info
57
-
58
- # Whether check restriction of excel file when user modify cells related objects. For example, excel does not allow inputting string value longer than 32K. When you input a value longer than 32K, if this property is true, you will get an Exception. If this property is false, we will accept your input string value as the cell's value so that later you can output the complete string value for other file formats such as CSV. However, if you have set such kind of value that is invalid for excel file format, you should not save the workbook as excel file format later. Otherwise there may be unexpected error for the generated excel file.
59
- attr_accessor :check_excel_restriction
60
-
61
- # Set password to unprotect protected document
62
- attr_accessor :password
63
-
64
- # Skips empty rows and columns when converting. Default is True.
65
- attr_accessor :skip_empty_rows_and_columns
66
-
67
- # Convert specific range when converting to other than cells format. Example: \"D1:F8\"
68
- attr_accessor :convert_range
69
-
70
- # If True and converting to Pdf the conversion is optimized for better file size than print quality.
71
- attr_accessor :optimize_pdf_size
72
-
73
- # If OnePagePerSheet is true the content of the sheet will be converted to one page in the PDF document. Default value is true.
74
- attr_accessor :one_page_per_sheet
75
-
76
- # Show hidden sheets when converting Excel files
77
- attr_accessor :show_hidden_sheets
78
-
79
- # Show grid lines when converting Excel files
80
- attr_accessor :show_grid_lines
81
-
82
- # Substitute specific fonts when converting Cells document.
83
- attr_accessor :font_substitutes
84
-
85
- # Default font for Cells document. The following font will be used if a font is missing.
86
- attr_accessor :default_font
87
-
88
- # List of sheet indexes to convert. The indexes must be zero-based
89
- attr_accessor :sheet_indexes
90
-
91
- # List of sheet names to convert
92
- attr_accessor :sheets
93
-
94
- # Represents the way comments are printed with the sheet. Default is PrintNoComments.
95
- attr_accessor :print_comments
96
-
97
- # Reset font folders before loading document
98
- attr_accessor :reset_font_folders
99
- class EnumAttributeValidator
100
- attr_reader :datatype
101
- attr_reader :allowable_values
102
-
103
- def initialize(datatype, allowable_values)
104
- @allowable_values = allowable_values.map do |value|
105
- case datatype.to_s
106
- when /Integer/i
107
- value.to_i
108
- when /Float/i
109
- value.to_f
110
- else
111
- value
112
- end
113
- end
114
- end
115
-
116
- def valid?(value)
117
- !value || allowable_values.include?(value)
118
- end
119
- end
120
-
121
- # Attribute mapping from ruby-style variable name to JSON key.
122
- def self.attribute_map
123
- {
124
- :'format' => :'Format',
125
- :'clear_custom_document_properties' => :'ClearCustomDocumentProperties',
126
- :'clear_built_in_document_properties' => :'ClearBuiltInDocumentProperties',
127
- :'rows_per_page' => :'RowsPerPage',
128
- :'columns_per_page' => :'ColumnsPerPage',
129
- :'auto_fit_rows' => :'AutoFitRows',
130
- :'all_columns_in_one_page_per_sheet' => :'AllColumnsInOnePagePerSheet',
131
- :'culture_info' => :'CultureInfo',
132
- :'check_excel_restriction' => :'CheckExcelRestriction',
133
- :'password' => :'Password',
134
- :'skip_empty_rows_and_columns' => :'SkipEmptyRowsAndColumns',
135
- :'convert_range' => :'ConvertRange',
136
- :'optimize_pdf_size' => :'OptimizePdfSize',
137
- :'one_page_per_sheet' => :'OnePagePerSheet',
138
- :'show_hidden_sheets' => :'ShowHiddenSheets',
139
- :'show_grid_lines' => :'ShowGridLines',
140
- :'font_substitutes' => :'FontSubstitutes',
141
- :'default_font' => :'DefaultFont',
142
- :'sheet_indexes' => :'SheetIndexes',
143
- :'sheets' => :'Sheets',
144
- :'print_comments' => :'PrintComments',
145
- :'reset_font_folders' => :'ResetFontFolders'
146
- }
147
- end
148
-
149
- # Attribute type mapping.
150
- def self.swagger_types
151
- {
152
- :'format' => :'String',
153
- :'clear_custom_document_properties' => :'BOOLEAN',
154
- :'clear_built_in_document_properties' => :'BOOLEAN',
155
- :'rows_per_page' => :'Integer',
156
- :'columns_per_page' => :'Integer',
157
- :'auto_fit_rows' => :'BOOLEAN',
158
- :'all_columns_in_one_page_per_sheet' => :'BOOLEAN',
159
- :'culture_info' => :'String',
160
- :'check_excel_restriction' => :'BOOLEAN',
161
- :'password' => :'String',
162
- :'skip_empty_rows_and_columns' => :'BOOLEAN',
163
- :'convert_range' => :'String',
164
- :'optimize_pdf_size' => :'BOOLEAN',
165
- :'one_page_per_sheet' => :'BOOLEAN',
166
- :'show_hidden_sheets' => :'BOOLEAN',
167
- :'show_grid_lines' => :'BOOLEAN',
168
- :'font_substitutes' => :'Hash<String, String>',
169
- :'default_font' => :'String',
170
- :'sheet_indexes' => :'Array<Integer>',
171
- :'sheets' => :'Array<String>',
172
- :'print_comments' => :'String',
173
- :'reset_font_folders' => :'BOOLEAN'
174
- }
175
- end
176
-
177
- # Initializes the object
178
- # @param [Hash] attributes Model attributes in the form of hash
179
- def initialize(attributes = {})
180
- return unless attributes.is_a?(Hash)
181
-
182
- # convert string to symbol for hash key
183
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
184
-
185
- if attributes.key?(:'Format')
186
- self.format = attributes[:'Format']
187
- end
188
-
189
- if attributes.key?(:'ClearCustomDocumentProperties')
190
- self.clear_custom_document_properties = attributes[:'ClearCustomDocumentProperties']
191
- end
192
-
193
- if attributes.key?(:'ClearBuiltInDocumentProperties')
194
- self.clear_built_in_document_properties = attributes[:'ClearBuiltInDocumentProperties']
195
- end
196
-
197
- if attributes.key?(:'RowsPerPage')
198
- self.rows_per_page = attributes[:'RowsPerPage']
199
- end
200
-
201
- if attributes.key?(:'ColumnsPerPage')
202
- self.columns_per_page = attributes[:'ColumnsPerPage']
203
- end
204
-
205
- if attributes.key?(:'AutoFitRows')
206
- self.auto_fit_rows = attributes[:'AutoFitRows']
207
- end
208
-
209
- if attributes.key?(:'AllColumnsInOnePagePerSheet')
210
- self.all_columns_in_one_page_per_sheet = attributes[:'AllColumnsInOnePagePerSheet']
211
- end
212
-
213
- if attributes.key?(:'CultureInfo')
214
- self.culture_info = attributes[:'CultureInfo']
215
- end
216
-
217
- if attributes.key?(:'CheckExcelRestriction')
218
- self.check_excel_restriction = attributes[:'CheckExcelRestriction']
219
- end
220
-
221
- if attributes.key?(:'Password')
222
- self.password = attributes[:'Password']
223
- end
224
-
225
- if attributes.key?(:'SkipEmptyRowsAndColumns')
226
- self.skip_empty_rows_and_columns = attributes[:'SkipEmptyRowsAndColumns']
227
- end
228
-
229
- if attributes.key?(:'ConvertRange')
230
- self.convert_range = attributes[:'ConvertRange']
231
- end
232
-
233
- if attributes.key?(:'OptimizePdfSize')
234
- self.optimize_pdf_size = attributes[:'OptimizePdfSize']
235
- end
236
-
237
- if attributes.key?(:'OnePagePerSheet')
238
- self.one_page_per_sheet = attributes[:'OnePagePerSheet']
239
- end
240
-
241
- if attributes.key?(:'ShowHiddenSheets')
242
- self.show_hidden_sheets = attributes[:'ShowHiddenSheets']
243
- end
244
-
245
- if attributes.key?(:'ShowGridLines')
246
- self.show_grid_lines = attributes[:'ShowGridLines']
247
- end
248
-
249
- if attributes.key?(:'FontSubstitutes')
250
- if (value = attributes[:'FontSubstitutes']).is_a?(Hash)
251
- self.font_substitutes = value
252
- end
253
- end
254
-
255
- if attributes.key?(:'DefaultFont')
256
- self.default_font = attributes[:'DefaultFont']
257
- end
258
-
259
- if attributes.key?(:'SheetIndexes')
260
- if (value = attributes[:'SheetIndexes']).is_a?(Array)
261
- self.sheet_indexes = value
262
- end
263
- end
264
-
265
- if attributes.key?(:'Sheets')
266
- if (value = attributes[:'Sheets']).is_a?(Array)
267
- self.sheets = value
268
- end
269
- end
270
-
271
- if attributes.key?(:'PrintComments')
272
- self.print_comments = attributes[:'PrintComments']
273
- end
274
-
275
- if attributes.key?(:'ResetFontFolders')
276
- self.reset_font_folders = attributes[:'ResetFontFolders']
277
- end
278
-
279
- end
280
-
281
- # Show invalid properties with the reasons. Usually used together with valid?
282
- # @return Array for valid properies with the reasons
283
- def list_invalid_properties
284
- invalid_properties = []
285
- if @clear_custom_document_properties.nil?
286
- invalid_properties.push("invalid value for 'clear_custom_document_properties', clear_custom_document_properties cannot be nil.")
287
- end
288
-
289
- if @clear_built_in_document_properties.nil?
290
- invalid_properties.push("invalid value for 'clear_built_in_document_properties', clear_built_in_document_properties cannot be nil.")
291
- end
292
-
293
- if @rows_per_page.nil?
294
- invalid_properties.push("invalid value for 'rows_per_page', rows_per_page cannot be nil.")
295
- end
296
-
297
- if @columns_per_page.nil?
298
- invalid_properties.push("invalid value for 'columns_per_page', columns_per_page cannot be nil.")
299
- end
300
-
301
- if @auto_fit_rows.nil?
302
- invalid_properties.push("invalid value for 'auto_fit_rows', auto_fit_rows cannot be nil.")
303
- end
304
-
305
- if @all_columns_in_one_page_per_sheet.nil?
306
- invalid_properties.push("invalid value for 'all_columns_in_one_page_per_sheet', all_columns_in_one_page_per_sheet cannot be nil.")
307
- end
308
-
309
- if @check_excel_restriction.nil?
310
- invalid_properties.push("invalid value for 'check_excel_restriction', check_excel_restriction cannot be nil.")
311
- end
312
-
313
- if @skip_empty_rows_and_columns.nil?
314
- invalid_properties.push("invalid value for 'skip_empty_rows_and_columns', skip_empty_rows_and_columns cannot be nil.")
315
- end
316
-
317
- if @optimize_pdf_size.nil?
318
- invalid_properties.push("invalid value for 'optimize_pdf_size', optimize_pdf_size cannot be nil.")
319
- end
320
-
321
- if @one_page_per_sheet.nil?
322
- invalid_properties.push("invalid value for 'one_page_per_sheet', one_page_per_sheet cannot be nil.")
323
- end
324
-
325
- if @show_hidden_sheets.nil?
326
- invalid_properties.push("invalid value for 'show_hidden_sheets', show_hidden_sheets cannot be nil.")
327
- end
328
-
329
- if @show_grid_lines.nil?
330
- invalid_properties.push("invalid value for 'show_grid_lines', show_grid_lines cannot be nil.")
331
- end
332
-
333
- if @print_comments.nil?
334
- invalid_properties.push("invalid value for 'print_comments', print_comments cannot be nil.")
335
- end
336
-
337
- if @reset_font_folders.nil?
338
- invalid_properties.push("invalid value for 'reset_font_folders', reset_font_folders cannot be nil.")
339
- end
340
-
341
- return invalid_properties
342
- end
343
-
344
- # Check to see if the all the properties in the model are valid
345
- # @return true if the model is valid
346
- def valid?
347
- return false if @clear_custom_document_properties.nil?
348
- return false if @clear_built_in_document_properties.nil?
349
- return false if @rows_per_page.nil?
350
- return false if @columns_per_page.nil?
351
- return false if @auto_fit_rows.nil?
352
- return false if @all_columns_in_one_page_per_sheet.nil?
353
- return false if @check_excel_restriction.nil?
354
- return false if @skip_empty_rows_and_columns.nil?
355
- return false if @optimize_pdf_size.nil?
356
- return false if @one_page_per_sheet.nil?
357
- return false if @show_hidden_sheets.nil?
358
- return false if @show_grid_lines.nil?
359
- return false if @print_comments.nil?
360
- print_comments_validator = EnumAttributeValidator.new('String', ["PrintInPlace", "PrintNoComments", "PrintSheetEnd", "PrintWithThreadedComments"])
361
- return false unless print_comments_validator.valid?(@print_comments)
362
- return false if @reset_font_folders.nil?
363
- return true
364
- end
365
-
366
- # Custom attribute writer method checking allowed values (enum).
367
- # @param [Object] print_comments Object to be assigned
368
- def print_comments=(print_comments)
369
- validator = EnumAttributeValidator.new('String', ["PrintInPlace", "PrintNoComments", "PrintSheetEnd", "PrintWithThreadedComments"])
370
- if print_comments.to_i == 0
371
- unless validator.valid?(print_comments)
372
- raise ArgumentError, "invalid value for 'print_comments', must be one of #{validator.allowable_values}."
373
- end
374
- @print_comments = print_comments
375
- else
376
- @print_comments = validator.allowable_values[print_comments.to_i]
377
- end
378
- end
379
-
380
- # Checks equality by comparing each attribute.
381
- # @param [Object] Object to be compared
382
- def ==(other)
383
- return true if self.equal?(other)
384
- self.class == other.class &&
385
- format == other.format &&
386
- clear_custom_document_properties == other.clear_custom_document_properties &&
387
- clear_built_in_document_properties == other.clear_built_in_document_properties &&
388
- rows_per_page == other.rows_per_page &&
389
- columns_per_page == other.columns_per_page &&
390
- auto_fit_rows == other.auto_fit_rows &&
391
- all_columns_in_one_page_per_sheet == other.all_columns_in_one_page_per_sheet &&
392
- culture_info == other.culture_info &&
393
- check_excel_restriction == other.check_excel_restriction &&
394
- password == other.password &&
395
- skip_empty_rows_and_columns == other.skip_empty_rows_and_columns &&
396
- convert_range == other.convert_range &&
397
- optimize_pdf_size == other.optimize_pdf_size &&
398
- one_page_per_sheet == other.one_page_per_sheet &&
399
- show_hidden_sheets == other.show_hidden_sheets &&
400
- show_grid_lines == other.show_grid_lines &&
401
- font_substitutes == other.font_substitutes &&
402
- default_font == other.default_font &&
403
- sheet_indexes == other.sheet_indexes &&
404
- sheets == other.sheets &&
405
- print_comments == other.print_comments &&
406
- reset_font_folders == other.reset_font_folders
407
- end
408
-
409
- # @see the `==` method
410
- # @param [Object] Object to be compared
411
- def eql?(other)
412
- self == other
413
- end
414
-
415
- # Calculates hash code according to all attributes.
416
- # @return [Fixnum] Hash code
417
- def hash
418
- [format, clear_custom_document_properties, clear_built_in_document_properties, rows_per_page, columns_per_page, auto_fit_rows, all_columns_in_one_page_per_sheet, culture_info, check_excel_restriction, password, skip_empty_rows_and_columns, convert_range, optimize_pdf_size, one_page_per_sheet, show_hidden_sheets, show_grid_lines, font_substitutes, default_font, sheet_indexes, sheets, print_comments, reset_font_folders].hash
419
- end
420
-
421
- # Downcases first letter.
422
- # @return downcased string
423
- def uncap(str)
424
- str[0, 1].downcase + str[1..-1]
425
- end
426
-
427
- # Builds the object from hash
428
- # @param [Hash] attributes Model attributes in the form of hash
429
- # @return [Object] Returns the model itself
430
- def build_from_hash(attributes)
431
- return nil unless attributes.is_a?(Hash)
432
- self.class.swagger_types.each_pair do |key, type|
433
- pname = uncap(self.class.attribute_map[key]).intern
434
- value = attributes[pname]
435
- if type =~ /\AArray<(.*)>/i
436
- # check to ensure the input is an array given that the the attribute
437
- # is documented as an array but the input is not
438
- if value.is_a?(Array)
439
- self.send("#{key}=", value.map { |v| _deserialize($1, v) })
440
- end
441
- elsif !value.nil?
442
- self.send("#{key}=", _deserialize(type, value))
443
- end
444
- # or else data not found in attributes(hash), not an issue as the data can be optional
445
- end
446
-
447
- self
448
- end
449
-
450
- # Deserializes the data based on type
451
- # @param string type Data type
452
- # @param string value Value to be deserialized
453
- # @return [Object] Deserialized data
454
- def _deserialize(type, value)
455
- case type.to_sym
456
- when :DateTime
457
- Date.parse value
458
- when :Date
459
- Date.parse value
460
- when :String
461
- value.to_s
462
- when :Integer
463
- value.to_i
464
- when :Float
465
- value.to_f
466
- when :BOOLEAN
467
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
468
- true
469
- else
470
- false
471
- end
472
- when :Object
473
- # generic object (usually a Hash), return directly
474
- value
475
- when /\AArray<(?<inner_type>.+)>\z/
476
- inner_type = Regexp.last_match[:inner_type]
477
- value.map { |v| _deserialize(inner_type, v) }
478
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
479
- k_type = Regexp.last_match[:k_type]
480
- v_type = Regexp.last_match[:v_type]
481
- {}.tap do |hash|
482
- value.each do |k, v|
483
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
484
- end
485
- end
486
- else
487
- # model
488
- temp_model = GroupDocsConversionCloud.const_get(type).new
489
- temp_model.build_from_hash(value)
490
- end
491
- end
492
-
493
- # Returns the string representation of the object
494
- # @return [String] String presentation of the object
495
- def to_s
496
- to_hash.to_s
497
- end
498
-
499
- # to_body is an alias to to_hash (backward compatibility)
500
- # @return [Hash] Returns the object in the form of hash
501
- def to_body
502
- to_hash
503
- end
504
-
505
- # Returns the object in the form of hash
506
- # @return [Hash] Returns the object in the form of hash
507
- def to_hash
508
- hash = {}
509
- self.class.attribute_map.each_pair do |attr, param|
510
- value = self.send(attr)
511
- next if value.nil?
512
- hash[param] = _to_hash(value)
513
- end
514
- hash
515
- end
516
-
517
- # Outputs non-array value in the form of hash
518
- # For object, use to_hash. Otherwise, just return the value
519
- # @param [Object] value Any valid value
520
- # @return [Hash] Returns the value in the form of hash
521
- def _to_hash(value)
522
- if value.is_a?(Array)
523
- value.compact.map { |v| _to_hash(v) }
524
- elsif value.is_a?(Hash)
525
- {}.tap do |hash|
526
- value.each { |k, v| hash[k] = _to_hash(v) }
527
- end
528
- elsif value.respond_to? :to_hash
529
- value.to_hash
530
- else
531
- value
532
- end
533
- end
534
-
535
- end
536
-
537
- end