aspose_words_cloud 22.1.0 → 22.2.0

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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose_words_cloud/api_client.rb +1 -0
  3. data/lib/aspose_words_cloud/models/bmp_save_options_data.rb +12 -14
  4. data/lib/aspose_words_cloud/models/doc_save_options_data.rb +9 -11
  5. data/lib/aspose_words_cloud/models/{ooxml_save_options_data.rb → docm_save_options_data.rb} +15 -17
  6. data/lib/aspose_words_cloud/models/docx_save_options_data.rb +440 -0
  7. data/lib/aspose_words_cloud/models/dot_save_options_data.rb +426 -0
  8. data/lib/aspose_words_cloud/models/dotm_save_options_data.rb +440 -0
  9. data/lib/aspose_words_cloud/models/dotx_save_options_data.rb +440 -0
  10. data/lib/aspose_words_cloud/models/emf_save_options_data.rb +12 -14
  11. data/lib/aspose_words_cloud/models/epub_save_options_data.rb +12 -14
  12. data/lib/aspose_words_cloud/models/flat_opc_macro_save_options_data.rb +440 -0
  13. data/lib/aspose_words_cloud/models/{txt_save_options_base_data.rb → flat_opc_save_options_data.rb} +50 -54
  14. data/lib/aspose_words_cloud/models/flat_opc_template_macro_save_options_data.rb +440 -0
  15. data/lib/aspose_words_cloud/models/flat_opc_template_save_options_data.rb +440 -0
  16. data/lib/aspose_words_cloud/models/gif_save_options_data.rb +12 -14
  17. data/lib/aspose_words_cloud/models/html_fixed_save_options_data.rb +9 -11
  18. data/lib/aspose_words_cloud/models/html_save_options_data.rb +9 -11
  19. data/lib/aspose_words_cloud/models/jpeg_save_options_data.rb +12 -14
  20. data/lib/aspose_words_cloud/models/markdown_save_options_data.rb +9 -11
  21. data/lib/aspose_words_cloud/models/mhtml_save_options_data.rb +12 -14
  22. data/lib/aspose_words_cloud/models/odt_save_options_data.rb +12 -14
  23. data/lib/aspose_words_cloud/models/{fixed_page_save_options_data.rb → open_xps_save_options_data.rb} +55 -17
  24. data/lib/aspose_words_cloud/models/ott_save_options_data.rb +441 -0
  25. data/lib/aspose_words_cloud/models/pcl_save_options_data.rb +12 -14
  26. data/lib/aspose_words_cloud/models/pdf_save_options_data.rb +9 -11
  27. data/lib/aspose_words_cloud/models/png_save_options_data.rb +12 -14
  28. data/lib/aspose_words_cloud/models/ps_save_options_data.rb +9 -11
  29. data/lib/aspose_words_cloud/models/rtf_save_options_data.rb +9 -11
  30. data/lib/aspose_words_cloud/models/svg_save_options_data.rb +9 -11
  31. data/lib/aspose_words_cloud/models/text_save_options_data.rb +9 -11
  32. data/lib/aspose_words_cloud/models/tiff_save_options_data.rb +9 -11
  33. data/lib/aspose_words_cloud/models/word_ml_save_options_data.rb +12 -14
  34. data/lib/aspose_words_cloud/models/xaml_fixed_save_options_data.rb +12 -14
  35. data/lib/aspose_words_cloud/models/{save_options_data.rb → xaml_flow_pack_save_options_data.rb} +35 -17
  36. data/lib/aspose_words_cloud/models/xaml_flow_save_options_data.rb +12 -14
  37. data/lib/aspose_words_cloud/models/xps_save_options_data.rb +9 -11
  38. data/lib/aspose_words_cloud/version.rb +1 -1
  39. data/lib/aspose_words_cloud.rb +12 -10
  40. metadata +14 -12
  41. data/lib/aspose_words_cloud/models/comment_base.rb +0 -251
  42. data/lib/aspose_words_cloud/models/document_property_base.rb +0 -201
  43. data/lib/aspose_words_cloud/models/field_base.rb +0 -211
  44. data/lib/aspose_words_cloud/models/footnote_base.rb +0 -273
  45. data/lib/aspose_words_cloud/models/image_save_options_data.rb +0 -585
  46. data/lib/aspose_words_cloud/models/run_base.rb +0 -201
@@ -1,585 +0,0 @@
1
- # ------------------------------------------------------------------------------------
2
- # <copyright company="Aspose" file="image_save_options_data.rb">
3
- # Copyright (c) 2022 Aspose.Words for Cloud
4
- # </copyright>
5
- # <summary>
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in all
14
- # copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- # SOFTWARE.
23
- # </summary>
24
- # ------------------------------------------------------------------------------------
25
-
26
- require 'date'
27
-
28
- module AsposeWordsCloud
29
-
30
- # Container abstract class for image save options.
31
- class ImageSaveOptionsData
32
- # Gets or sets a boolean value indicating whether to allow embedding fonts with PostScript outlines when embedding TrueType fonts in a document upon it is saved. The default value is false..
33
- attr_accessor :allow_embedding_post_script_fonts
34
-
35
- # Gets or sets CustomTimeZoneInfo.
36
- attr_accessor :custom_time_zone_info_data
37
-
38
- # Gets or sets the value determining how 3D effects are rendered.
39
- attr_accessor :dml3_d_effects_rendering_mode
40
-
41
- # Gets or sets the value determining how DrawingML effects are rendered.
42
- # { Simplified | None | Fine }.
43
- attr_accessor :dml_effects_rendering_mode
44
-
45
- # Gets or sets the option that controls how DrawingML shapes are rendered.
46
- attr_accessor :dml_rendering_mode
47
-
48
- # Gets or sets the name of destination file.
49
- attr_accessor :file_name
50
-
51
- # Gets or sets value determining which document formats are allowed to be mapped by Aspose.Words.Markup.StructuredDocumentTag.XmlMapping.
52
- # By default only Aspose.Words.LoadFormat.FlatOpc document format is allowed to be mapped.
53
- attr_accessor :flat_opc_xml_mapping_only
54
-
55
- # Gets or sets the value determining how ink (InkML) objects are rendered.
56
- attr_accessor :iml_rendering_mode
57
-
58
- # Gets or sets the format of save.
59
- attr_accessor :save_format
60
-
61
- # Gets or sets a value determining whether the Aspose.Words.Properties.BuiltInDocumentProperties.CreatedTime property is updated before saving.
62
- # Default value is false.
63
- attr_accessor :update_created_time_property
64
-
65
- # Gets or sets a value indicating whether fields should be updated before saving the document to a fixed page format. The default value is true.
66
- attr_accessor :update_fields
67
-
68
- # Gets or sets a value indicating whether the Aspose.Words.Properties.BuiltInDocumentProperties.LastPrinted property is updated before saving.
69
- attr_accessor :update_last_printed_property
70
-
71
- # Gets or sets a value indicating whether the Aspose.Words.Properties.BuiltInDocumentProperties.LastSavedTime property is updated before saving.
72
- attr_accessor :update_last_saved_time_property
73
-
74
- # Gets or sets a value indicating whether content of StructuredDocumentTag is updated before saving.
75
- attr_accessor :update_sdt_content
76
-
77
- # Gets or sets a value indicating whether to zip output or not.
78
- # The default value is false.
79
- attr_accessor :zip_output
80
-
81
- # Gets or sets the value determining how colors are rendered.
82
- # { Normal | Grayscale}.
83
- attr_accessor :color_mode
84
-
85
- # Gets or sets the quality of the JPEG images inside PDF document.
86
- attr_accessor :jpeg_quality
87
-
88
- # Gets or sets the metafile rendering options.
89
- attr_accessor :metafile_rendering_options
90
-
91
- # Gets or sets the symbol set, that is used to represent numbers while rendering to fixed page formats.
92
- attr_accessor :numeral_format
93
-
94
- # Gets or sets a value indicating whether it is required to optimize output of XPS.
95
- # If this flag is set redundant nested canvases and empty canvases are removed, also neighbor glyphs with the same formatting are concatenated.
96
- # Note: The accuracy of the content display may be affected if this property is set to true.. The default value is false.
97
- attr_accessor :optimize_output
98
-
99
- # Gets or sets the number of pages to render.
100
- attr_accessor :page_count
101
-
102
- # Gets or sets the 0-based index of the first page to render.
103
- attr_accessor :page_index
104
-
105
- # Gets or sets the horizontal resolution in dots per inch for the generated images.
106
- # This property has effect only when saving to raster image formats.
107
- # The default value is 96.
108
- attr_accessor :horizontal_resolution
109
-
110
- # Gets or sets the brightness level of the image.
111
- attr_accessor :image_brightness
112
-
113
- # Gets or sets the color mode of the image.
114
- attr_accessor :image_color_mode
115
-
116
- # Gets or sets the contrast level of the image.
117
- attr_accessor :image_contrast
118
-
119
- # Gets or sets the background (paper) color of the image.
120
- attr_accessor :paper_color
121
-
122
- # Gets or sets the pixel format of the image.
123
- attr_accessor :pixel_format
124
-
125
- # Gets or sets both horizontal and vertical resolution in dots per inch for the generated images.
126
- # This property has effect only when saving to raster image formats.
127
- # The default value is 96.
128
- attr_accessor :resolution
129
-
130
- # Gets or sets the zoom factor of the image.
131
- attr_accessor :scale
132
-
133
- # Gets or sets a value indicating whether to use anti-aliasing for rendering.
134
- attr_accessor :use_anti_aliasing
135
-
136
- # Gets or sets a value indicating whether to use GDI+ or Aspose.Words metafile renderer when saving to EMF.
137
- attr_accessor :use_gdi_emf_renderer
138
-
139
- # Gets or sets a value indicating whether to use high quality (i.e. slow) rendering algorithms.
140
- attr_accessor :use_high_quality_rendering
141
-
142
- # Gets or sets the vertical resolution in dots per inch for the generated images.
143
- # This property has effect only when saving to raster image formats.
144
- # The default value is 96.
145
- attr_accessor :vertical_resolution
146
-
147
- class EnumAttributeValidator
148
- attr_reader :datatype
149
- attr_reader :allowable_values
150
-
151
- def initialize(datatype, allowable_values)
152
- @allowable_values = allowable_values.map do |value|
153
- case datatype.to_s
154
- when /Integer/i
155
- value.to_i
156
- when /Float/i
157
- value.to_f
158
- else
159
- value
160
- end
161
- end
162
- end
163
-
164
- def valid?(value)
165
- !value || allowable_values.include?(value)
166
- end
167
- end
168
-
169
- # Attribute mapping from ruby-style variable name to JSON key.
170
- def self.attribute_map
171
- {
172
- :'allow_embedding_post_script_fonts' => :'AllowEmbeddingPostScriptFonts',
173
- :'custom_time_zone_info_data' => :'CustomTimeZoneInfoData',
174
- :'dml3_d_effects_rendering_mode' => :'Dml3DEffectsRenderingMode',
175
- :'dml_effects_rendering_mode' => :'DmlEffectsRenderingMode',
176
- :'dml_rendering_mode' => :'DmlRenderingMode',
177
- :'file_name' => :'FileName',
178
- :'flat_opc_xml_mapping_only' => :'FlatOpcXmlMappingOnly',
179
- :'iml_rendering_mode' => :'ImlRenderingMode',
180
- :'save_format' => :'SaveFormat',
181
- :'update_created_time_property' => :'UpdateCreatedTimeProperty',
182
- :'update_fields' => :'UpdateFields',
183
- :'update_last_printed_property' => :'UpdateLastPrintedProperty',
184
- :'update_last_saved_time_property' => :'UpdateLastSavedTimeProperty',
185
- :'update_sdt_content' => :'UpdateSdtContent',
186
- :'zip_output' => :'ZipOutput',
187
- :'color_mode' => :'ColorMode',
188
- :'jpeg_quality' => :'JpegQuality',
189
- :'metafile_rendering_options' => :'MetafileRenderingOptions',
190
- :'numeral_format' => :'NumeralFormat',
191
- :'optimize_output' => :'OptimizeOutput',
192
- :'page_count' => :'PageCount',
193
- :'page_index' => :'PageIndex',
194
- :'horizontal_resolution' => :'HorizontalResolution',
195
- :'image_brightness' => :'ImageBrightness',
196
- :'image_color_mode' => :'ImageColorMode',
197
- :'image_contrast' => :'ImageContrast',
198
- :'paper_color' => :'PaperColor',
199
- :'pixel_format' => :'PixelFormat',
200
- :'resolution' => :'Resolution',
201
- :'scale' => :'Scale',
202
- :'use_anti_aliasing' => :'UseAntiAliasing',
203
- :'use_gdi_emf_renderer' => :'UseGdiEmfRenderer',
204
- :'use_high_quality_rendering' => :'UseHighQualityRendering',
205
- :'vertical_resolution' => :'VerticalResolution'
206
- }
207
- end
208
-
209
- # Attribute type mapping.
210
- def self.swagger_types
211
- {
212
- :'allow_embedding_post_script_fonts' => :'BOOLEAN',
213
- :'custom_time_zone_info_data' => :'TimeZoneInfoData',
214
- :'dml3_d_effects_rendering_mode' => :'String',
215
- :'dml_effects_rendering_mode' => :'String',
216
- :'dml_rendering_mode' => :'String',
217
- :'file_name' => :'String',
218
- :'flat_opc_xml_mapping_only' => :'BOOLEAN',
219
- :'iml_rendering_mode' => :'String',
220
- :'save_format' => :'String',
221
- :'update_created_time_property' => :'BOOLEAN',
222
- :'update_fields' => :'BOOLEAN',
223
- :'update_last_printed_property' => :'BOOLEAN',
224
- :'update_last_saved_time_property' => :'BOOLEAN',
225
- :'update_sdt_content' => :'BOOLEAN',
226
- :'zip_output' => :'BOOLEAN',
227
- :'color_mode' => :'String',
228
- :'jpeg_quality' => :'Integer',
229
- :'metafile_rendering_options' => :'MetafileRenderingOptionsData',
230
- :'numeral_format' => :'String',
231
- :'optimize_output' => :'BOOLEAN',
232
- :'page_count' => :'Integer',
233
- :'page_index' => :'Integer',
234
- :'horizontal_resolution' => :'Float',
235
- :'image_brightness' => :'Float',
236
- :'image_color_mode' => :'String',
237
- :'image_contrast' => :'Float',
238
- :'paper_color' => :'String',
239
- :'pixel_format' => :'String',
240
- :'resolution' => :'Float',
241
- :'scale' => :'Float',
242
- :'use_anti_aliasing' => :'BOOLEAN',
243
- :'use_gdi_emf_renderer' => :'BOOLEAN',
244
- :'use_high_quality_rendering' => :'BOOLEAN',
245
- :'vertical_resolution' => :'Float'
246
- }
247
- end
248
-
249
- # Initializes the object
250
- # @param [Hash] attributes Model attributes in the form of hash
251
- def initialize(attributes = {})
252
- return unless attributes.is_a?(Hash)
253
-
254
- # convert string to symbol for hash key
255
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
256
-
257
- if attributes.key?(:'AllowEmbeddingPostScriptFonts')
258
- self.allow_embedding_post_script_fonts = attributes[:'AllowEmbeddingPostScriptFonts']
259
- end
260
-
261
- if attributes.key?(:'CustomTimeZoneInfoData')
262
- self.custom_time_zone_info_data = attributes[:'CustomTimeZoneInfoData']
263
- end
264
-
265
- if attributes.key?(:'Dml3DEffectsRenderingMode')
266
- self.dml3_d_effects_rendering_mode = attributes[:'Dml3DEffectsRenderingMode']
267
- end
268
-
269
- if attributes.key?(:'DmlEffectsRenderingMode')
270
- self.dml_effects_rendering_mode = attributes[:'DmlEffectsRenderingMode']
271
- end
272
-
273
- if attributes.key?(:'DmlRenderingMode')
274
- self.dml_rendering_mode = attributes[:'DmlRenderingMode']
275
- end
276
-
277
- if attributes.key?(:'FileName')
278
- self.file_name = attributes[:'FileName']
279
- end
280
-
281
- if attributes.key?(:'FlatOpcXmlMappingOnly')
282
- self.flat_opc_xml_mapping_only = attributes[:'FlatOpcXmlMappingOnly']
283
- end
284
-
285
- if attributes.key?(:'ImlRenderingMode')
286
- self.iml_rendering_mode = attributes[:'ImlRenderingMode']
287
- end
288
-
289
- if attributes.key?(:'SaveFormat')
290
- self.save_format = attributes[:'SaveFormat']
291
- end
292
-
293
- if attributes.key?(:'UpdateCreatedTimeProperty')
294
- self.update_created_time_property = attributes[:'UpdateCreatedTimeProperty']
295
- end
296
-
297
- if attributes.key?(:'UpdateFields')
298
- self.update_fields = attributes[:'UpdateFields']
299
- end
300
-
301
- if attributes.key?(:'UpdateLastPrintedProperty')
302
- self.update_last_printed_property = attributes[:'UpdateLastPrintedProperty']
303
- end
304
-
305
- if attributes.key?(:'UpdateLastSavedTimeProperty')
306
- self.update_last_saved_time_property = attributes[:'UpdateLastSavedTimeProperty']
307
- end
308
-
309
- if attributes.key?(:'UpdateSdtContent')
310
- self.update_sdt_content = attributes[:'UpdateSdtContent']
311
- end
312
-
313
- if attributes.key?(:'ZipOutput')
314
- self.zip_output = attributes[:'ZipOutput']
315
- end
316
-
317
- if attributes.key?(:'ColorMode')
318
- self.color_mode = attributes[:'ColorMode']
319
- end
320
-
321
- if attributes.key?(:'JpegQuality')
322
- self.jpeg_quality = attributes[:'JpegQuality']
323
- end
324
-
325
- if attributes.key?(:'MetafileRenderingOptions')
326
- self.metafile_rendering_options = attributes[:'MetafileRenderingOptions']
327
- end
328
-
329
- if attributes.key?(:'NumeralFormat')
330
- self.numeral_format = attributes[:'NumeralFormat']
331
- end
332
-
333
- if attributes.key?(:'OptimizeOutput')
334
- self.optimize_output = attributes[:'OptimizeOutput']
335
- end
336
-
337
- if attributes.key?(:'PageCount')
338
- self.page_count = attributes[:'PageCount']
339
- end
340
-
341
- if attributes.key?(:'PageIndex')
342
- self.page_index = attributes[:'PageIndex']
343
- end
344
-
345
- if attributes.key?(:'HorizontalResolution')
346
- self.horizontal_resolution = attributes[:'HorizontalResolution']
347
- end
348
-
349
- if attributes.key?(:'ImageBrightness')
350
- self.image_brightness = attributes[:'ImageBrightness']
351
- end
352
-
353
- if attributes.key?(:'ImageColorMode')
354
- self.image_color_mode = attributes[:'ImageColorMode']
355
- end
356
-
357
- if attributes.key?(:'ImageContrast')
358
- self.image_contrast = attributes[:'ImageContrast']
359
- end
360
-
361
- if attributes.key?(:'PaperColor')
362
- self.paper_color = attributes[:'PaperColor']
363
- end
364
-
365
- if attributes.key?(:'PixelFormat')
366
- self.pixel_format = attributes[:'PixelFormat']
367
- end
368
-
369
- if attributes.key?(:'Resolution')
370
- self.resolution = attributes[:'Resolution']
371
- end
372
-
373
- if attributes.key?(:'Scale')
374
- self.scale = attributes[:'Scale']
375
- end
376
-
377
- if attributes.key?(:'UseAntiAliasing')
378
- self.use_anti_aliasing = attributes[:'UseAntiAliasing']
379
- end
380
-
381
- if attributes.key?(:'UseGdiEmfRenderer')
382
- self.use_gdi_emf_renderer = attributes[:'UseGdiEmfRenderer']
383
- end
384
-
385
- if attributes.key?(:'UseHighQualityRendering')
386
- self.use_high_quality_rendering = attributes[:'UseHighQualityRendering']
387
- end
388
-
389
- if attributes.key?(:'VerticalResolution')
390
- self.vertical_resolution = attributes[:'VerticalResolution']
391
- end
392
- end
393
-
394
- # Show invalid properties with the reasons. Usually used together with valid?
395
- # @return Array for valid properies with the reasons
396
- def list_invalid_properties
397
- invalid_properties = []
398
- return invalid_properties
399
- end
400
-
401
- # Check to see if the all the properties in the model are valid
402
- # @return true if the model is valid
403
- def valid?
404
- dml3_d_effects_rendering_mode_validator = EnumAttributeValidator.new('String', ["Basic", "Advanced"])
405
- return false unless dml3_d_effects_rendering_mode_validator.valid?(@dml3_d_effects_rendering_mode)
406
-
407
- return true
408
- end
409
-
410
- # Custom attribute writer method checking allowed values (enum).
411
- # @param [Object] dml3_d_effects_rendering_mode Object to be assigned
412
- def dml3_d_effects_rendering_mode=(dml3_d_effects_rendering_mode)
413
- validator = EnumAttributeValidator.new('String', ["Basic", "Advanced"])
414
- if dml3_d_effects_rendering_mode.to_i == 0
415
- unless validator.valid?(dml3_d_effects_rendering_mode)
416
- raise ArgumentError, "invalid value for 'dml3_d_effects_rendering_mode', must be one of #{validator.allowable_values}."
417
- end
418
- @dml3_d_effects_rendering_mode = dml3_d_effects_rendering_mode
419
- else
420
- @dml3_d_effects_rendering_mode = validator.allowable_values[dml3_d_effects_rendering_mode.to_i]
421
- end
422
- end
423
-
424
-
425
- # Checks equality by comparing each attribute.
426
- # @param [Object] Object to be compared
427
- def ==(other)
428
- return true if self.equal?(other)
429
- self.class == other.class &&
430
- allow_embedding_post_script_fonts == other.allow_embedding_post_script_fonts &&
431
- custom_time_zone_info_data == other.custom_time_zone_info_data &&
432
- dml3_d_effects_rendering_mode == other.dml3_d_effects_rendering_mode &&
433
- dml_effects_rendering_mode == other.dml_effects_rendering_mode &&
434
- dml_rendering_mode == other.dml_rendering_mode &&
435
- file_name == other.file_name &&
436
- flat_opc_xml_mapping_only == other.flat_opc_xml_mapping_only &&
437
- iml_rendering_mode == other.iml_rendering_mode &&
438
- save_format == other.save_format &&
439
- update_created_time_property == other.update_created_time_property &&
440
- update_fields == other.update_fields &&
441
- update_last_printed_property == other.update_last_printed_property &&
442
- update_last_saved_time_property == other.update_last_saved_time_property &&
443
- update_sdt_content == other.update_sdt_content &&
444
- zip_output == other.zip_output &&
445
- color_mode == other.color_mode &&
446
- jpeg_quality == other.jpeg_quality &&
447
- metafile_rendering_options == other.metafile_rendering_options &&
448
- numeral_format == other.numeral_format &&
449
- optimize_output == other.optimize_output &&
450
- page_count == other.page_count &&
451
- page_index == other.page_index &&
452
- horizontal_resolution == other.horizontal_resolution &&
453
- image_brightness == other.image_brightness &&
454
- image_color_mode == other.image_color_mode &&
455
- image_contrast == other.image_contrast &&
456
- paper_color == other.paper_color &&
457
- pixel_format == other.pixel_format &&
458
- resolution == other.resolution &&
459
- scale == other.scale &&
460
- use_anti_aliasing == other.use_anti_aliasing &&
461
- use_gdi_emf_renderer == other.use_gdi_emf_renderer &&
462
- use_high_quality_rendering == other.use_high_quality_rendering &&
463
- vertical_resolution == other.vertical_resolution
464
- end
465
-
466
- # @see the `==` method
467
- # @param [Object] Object to be compared
468
- def eql?(other)
469
- self == other
470
- end
471
-
472
- # Calculates hash code according to all attributes.
473
- # @return [Fixnum] Hash code
474
- def hash
475
- [allow_embedding_post_script_fonts, custom_time_zone_info_data, dml3_d_effects_rendering_mode, dml_effects_rendering_mode, dml_rendering_mode, file_name, flat_opc_xml_mapping_only, iml_rendering_mode, save_format, update_created_time_property, update_fields, update_last_printed_property, update_last_saved_time_property, update_sdt_content, zip_output, color_mode, jpeg_quality, metafile_rendering_options, numeral_format, optimize_output, page_count, page_index, horizontal_resolution, image_brightness, image_color_mode, image_contrast, paper_color, pixel_format, resolution, scale, use_anti_aliasing, use_gdi_emf_renderer, use_high_quality_rendering, vertical_resolution].hash
476
- end
477
-
478
- # Builds the object from hash
479
- # @param [Hash] attributes Model attributes in the form of hash
480
- # @return [Object] Returns the model itself
481
- def build_from_hash(attributes)
482
- return nil unless attributes.is_a?(Hash)
483
- self.class.swagger_types.each_pair do |key, type|
484
- if type =~ /\AArray<(.*)>/i
485
- # check to ensure the input is an array given that the the attribute
486
- # is documented as an array but the input is not
487
- if attributes[self.class.attribute_map[key]].is_a?(Array)
488
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
489
- end
490
- elsif !attributes[self.class.attribute_map[key]].nil?
491
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
492
- end
493
- # or else data not found in attributes(hash), not an issue as the data can be optional
494
- end
495
-
496
- self
497
- end
498
-
499
- # Deserializes the data based on type
500
- # @param string type Data type
501
- # @param string value Value to be deserialized
502
- # @return [Object] Deserialized data
503
- def _deserialize(type, value)
504
- case type.to_sym
505
- when :DateTime
506
- Time.at(/\d/.match(value)[0].to_f).to_datetime
507
- when :Date
508
- Time.at(/\d/.match(value)[0].to_f).to_date
509
- when :String
510
- value.to_s
511
- when :Integer
512
- value.to_i
513
- when :Float
514
- value.to_f
515
- when :BOOLEAN
516
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
517
- true
518
- else
519
- false
520
- end
521
- when :Object
522
- # generic object (usually a Hash), return directly
523
- value
524
- when /\AArray<(?<inner_type>.+)>\z/
525
- inner_type = Regexp.last_match[:inner_type]
526
- value.map { |v| _deserialize(inner_type, v) }
527
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
528
- k_type = Regexp.last_match[:k_type]
529
- v_type = Regexp.last_match[:v_type]
530
- {}.tap do |hash|
531
- value.each do |k, v|
532
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
533
- end
534
- end
535
- else
536
- # model
537
- temp_model = AsposeWordsCloud.const_get(type).new
538
- temp_model.build_from_hash(value)
539
- end
540
- end
541
-
542
- # Returns the string representation of the object
543
- # @return [String] String presentation of the object
544
- def to_s
545
- to_hash.to_s
546
- end
547
-
548
- # to_body is an alias to to_hash (backward compatibility)
549
- # @return [Hash] Returns the object in the form of hash
550
- def to_body
551
- to_hash
552
- end
553
-
554
- # Returns the object in the form of hash
555
- # @return [Hash] Returns the object in the form of hash
556
- def to_hash
557
- hash = {}
558
- self.class.attribute_map.each_pair do |attr, param|
559
- value = self.send(attr)
560
- next if value.nil?
561
- hash[param] = _to_hash(value)
562
- end
563
- hash
564
- end
565
-
566
- # Outputs non-array value in the form of hash
567
- # For object, use to_hash. Otherwise, just return the value
568
- # @param [Object] value Any valid value
569
- # @return [Hash] Returns the value in the form of hash
570
- def _to_hash(value)
571
- if value.is_a?(Array)
572
- value.compact.map { |v| _to_hash(v) }
573
- elsif value.is_a?(Hash)
574
- {}.tap do |hash|
575
- value.each { |k, v| hash[k] = _to_hash(v) }
576
- end
577
- elsif value.respond_to? :to_hash
578
- value.to_hash
579
- else
580
- value
581
- end
582
- end
583
-
584
- end
585
- end