aspose_words_cloud 25.3 → 25.5

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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose_words_cloud/models/azw3_save_options_data.rb +11 -1
  3. data/lib/aspose_words_cloud/models/bmp_save_options_data.rb +11 -1
  4. data/lib/aspose_words_cloud/models/comment_range_end.rb +231 -0
  5. data/lib/aspose_words_cloud/models/comment_range_start.rb +231 -0
  6. data/lib/aspose_words_cloud/models/compare_options.rb +27 -1
  7. data/lib/aspose_words_cloud/models/doc_save_options_data.rb +11 -1
  8. data/lib/aspose_words_cloud/models/docm_save_options_data.rb +11 -1
  9. data/lib/aspose_words_cloud/models/docx_save_options_data.rb +11 -1
  10. data/lib/aspose_words_cloud/models/dot_save_options_data.rb +11 -1
  11. data/lib/aspose_words_cloud/models/dotm_save_options_data.rb +11 -1
  12. data/lib/aspose_words_cloud/models/dotx_save_options_data.rb +11 -1
  13. data/lib/aspose_words_cloud/models/emf_save_options_data.rb +11 -1
  14. data/lib/aspose_words_cloud/models/eps_save_options_data.rb +11 -1
  15. data/lib/aspose_words_cloud/models/epub_save_options_data.rb +11 -1
  16. data/lib/aspose_words_cloud/models/flat_opc_macro_save_options_data.rb +11 -1
  17. data/lib/aspose_words_cloud/models/flat_opc_save_options_data.rb +11 -1
  18. data/lib/aspose_words_cloud/models/flat_opc_template_macro_save_options_data.rb +11 -1
  19. data/lib/aspose_words_cloud/models/flat_opc_template_save_options_data.rb +11 -1
  20. data/lib/aspose_words_cloud/models/form_field_checkbox_link.rb +218 -0
  21. data/lib/aspose_words_cloud/models/form_field_drop_down_link.rb +218 -0
  22. data/lib/aspose_words_cloud/models/form_field_text_input_link.rb +218 -0
  23. data/lib/aspose_words_cloud/models/gif_save_options_data.rb +11 -1
  24. data/lib/aspose_words_cloud/models/html_fixed_save_options_data.rb +11 -1
  25. data/lib/aspose_words_cloud/models/html_save_options_data.rb +11 -1
  26. data/lib/aspose_words_cloud/models/jpeg_save_options_data.rb +11 -1
  27. data/lib/aspose_words_cloud/models/markdown_save_options_data.rb +11 -1
  28. data/lib/aspose_words_cloud/models/mhtml_save_options_data.rb +11 -1
  29. data/lib/aspose_words_cloud/models/odt_save_options_data.rb +11 -1
  30. data/lib/aspose_words_cloud/models/open_xps_save_options_data.rb +11 -1
  31. data/lib/aspose_words_cloud/models/ott_save_options_data.rb +11 -1
  32. data/lib/aspose_words_cloud/models/page_setup.rb +2 -2
  33. data/lib/aspose_words_cloud/models/pcl_save_options_data.rb +11 -1
  34. data/lib/aspose_words_cloud/models/pdf_save_options_data.rb +40 -1
  35. data/lib/aspose_words_cloud/models/png_save_options_data.rb +11 -1
  36. data/lib/aspose_words_cloud/models/ps_save_options_data.rb +11 -1
  37. data/lib/aspose_words_cloud/models/rtf_save_options_data.rb +11 -1
  38. data/lib/aspose_words_cloud/models/svg_save_options_data.rb +11 -1
  39. data/lib/aspose_words_cloud/models/text_save_options_data.rb +11 -1
  40. data/lib/aspose_words_cloud/models/tiff_save_options_data.rb +11 -1
  41. data/lib/aspose_words_cloud/models/word_ml_save_options_data.rb +11 -1
  42. data/lib/aspose_words_cloud/models/xaml_fixed_save_options_data.rb +11 -1
  43. data/lib/aspose_words_cloud/models/xaml_flow_pack_save_options_data.rb +11 -1
  44. data/lib/aspose_words_cloud/models/xaml_flow_save_options_data.rb +11 -1
  45. data/lib/aspose_words_cloud/models/xps_save_options_data.rb +11 -1
  46. data/lib/aspose_words_cloud/version.rb +1 -1
  47. data/lib/aspose_words_cloud.rb +5 -0
  48. metadata +7 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3afe9ff4270704ea7cff88c8af84af47e828376393416c3ccf3b705c50b5a0f
4
- data.tar.gz: 51d365c2a42d545a4edde56b4e792bf67fb2c74e6101fc379b831bb1d01e45db
3
+ metadata.gz: e8e03d673e2be1832468d7a1b6b7be8f3e9a125f598f7da74736ffaf54525caa
4
+ data.tar.gz: 6fc51678410ac87dfa44cea8216d96881d3c98a974e8f3c57d49e7ab2e6c27a2
5
5
  SHA512:
6
- metadata.gz: ac0ef723320abb3e231293de3e64dba7071c9671d2fe3e1825b3e9f7af128796ad1d5e658606306eaad736159a6f87a882a7797947dbcdf8e0f2b4d323f62d74
7
- data.tar.gz: 754be49b6fc86ab2669b04100b75f31e0a770c2e9f9407a9f8c2fe36d7bfd11a7cc83011bf5aed27cd08d35eb6ebc6bb4ed4e8fecab5f5da6149e75e6f57279b
6
+ metadata.gz: 7050930ee87227f7dace54c4fb857b7305c554197b25cb21460287f68a76faf1acad4bfaaf34bc2493dc0ef3be8acbe26a2ff76de24864d6d8608e7482f45260
7
+ data.tar.gz: 7baa8489cb15967d13a2db057d743419d4de2dd39086e2e1a3a5c0597f10070fde366d5cb5e0016d9125a5139ca433d360a8e44e518ba61b67eaba9f273a769f
@@ -60,6 +60,9 @@ module AsposeWordsCloud
60
60
  # The default value is Aspose.Words.Saving.ImlRenderingMode.InkML.
61
61
  attr_accessor :iml_rendering_mode
62
62
 
63
+ # Gets or sets a value indicating whether the font attributes will be changed according to the character code being used.
64
+ attr_accessor :update_ambiguous_text_font
65
+
63
66
  # Gets or sets a value determining whether the Aspose.Words.Properties.BuiltInDocumentProperties.CreatedTime property is updated before saving.
64
67
  # Default value is false.
65
68
  attr_accessor :update_created_time_property
@@ -253,6 +256,7 @@ module AsposeWordsCloud
253
256
  :'dml_rendering_mode' => :'DmlRenderingMode',
254
257
  :'file_name' => :'FileName',
255
258
  :'iml_rendering_mode' => :'ImlRenderingMode',
259
+ :'update_ambiguous_text_font' => :'UpdateAmbiguousTextFont',
256
260
  :'update_created_time_property' => :'UpdateCreatedTimeProperty',
257
261
  :'update_fields' => :'UpdateFields',
258
262
  :'update_last_printed_property' => :'UpdateLastPrintedProperty',
@@ -312,6 +316,7 @@ module AsposeWordsCloud
312
316
  :'dml_rendering_mode' => :'String',
313
317
  :'file_name' => :'String',
314
318
  :'iml_rendering_mode' => :'String',
319
+ :'update_ambiguous_text_font' => :'BOOLEAN',
315
320
  :'update_created_time_property' => :'BOOLEAN',
316
321
  :'update_fields' => :'BOOLEAN',
317
322
  :'update_last_printed_property' => :'BOOLEAN',
@@ -399,6 +404,10 @@ module AsposeWordsCloud
399
404
  self.iml_rendering_mode = attributes[:'ImlRenderingMode']
400
405
  end
401
406
 
407
+ if attributes.key?(:'UpdateAmbiguousTextFont')
408
+ self.update_ambiguous_text_font = attributes[:'UpdateAmbiguousTextFont']
409
+ end
410
+
402
411
  if attributes.key?(:'UpdateCreatedTimeProperty')
403
412
  self.update_created_time_property = attributes[:'UpdateCreatedTimeProperty']
404
413
  end
@@ -792,6 +801,7 @@ module AsposeWordsCloud
792
801
  dml_rendering_mode == other.dml_rendering_mode &&
793
802
  file_name == other.file_name &&
794
803
  iml_rendering_mode == other.iml_rendering_mode &&
804
+ update_ambiguous_text_font == other.update_ambiguous_text_font &&
795
805
  update_created_time_property == other.update_created_time_property &&
796
806
  update_fields == other.update_fields &&
797
807
  update_last_printed_property == other.update_last_printed_property &&
@@ -849,7 +859,7 @@ module AsposeWordsCloud
849
859
  # Calculates hash code according to all attributes.
850
860
  # @return [Fixnum] Hash code
851
861
  def hash
852
- [allow_embedding_post_script_fonts, custom_time_zone_info_data, dml3_d_effects_rendering_mode, dml_effects_rendering_mode, dml_rendering_mode, file_name, iml_rendering_mode, update_created_time_property, update_fields, update_last_printed_property, update_last_saved_time_property, zip_output, allow_negative_indent, css_class_name_prefix, css_style_sheet_file_name, css_style_sheet_type, document_split_criteria, document_split_heading_level, encoding, export_document_properties, export_drop_down_form_field_as_text, export_font_resources, export_fonts_as_base64, export_headers_footers_mode, export_images_as_base64, export_language_information, export_list_labels, export_original_url_for_linked_images, export_page_margins, export_page_setup, export_relative_font_size, export_roundtrip_information, export_text_input_form_field_as_text, export_toc_page_numbers, export_xhtml_transitional, font_resources_subsetting_size_threshold, fonts_folder, fonts_folder_alias, html_version, image_resolution, images_folder, images_folder_alias, metafile_format, office_math_output_mode, pretty_format, replace_backslash_with_yen_sign, resolve_font_names, resource_folder, resource_folder_alias, scale_image_to_shape_size, table_width_output_mode, navigation_map_level, save_format].hash
862
+ [allow_embedding_post_script_fonts, custom_time_zone_info_data, dml3_d_effects_rendering_mode, dml_effects_rendering_mode, dml_rendering_mode, file_name, iml_rendering_mode, update_ambiguous_text_font, update_created_time_property, update_fields, update_last_printed_property, update_last_saved_time_property, zip_output, allow_negative_indent, css_class_name_prefix, css_style_sheet_file_name, css_style_sheet_type, document_split_criteria, document_split_heading_level, encoding, export_document_properties, export_drop_down_form_field_as_text, export_font_resources, export_fonts_as_base64, export_headers_footers_mode, export_images_as_base64, export_language_information, export_list_labels, export_original_url_for_linked_images, export_page_margins, export_page_setup, export_relative_font_size, export_roundtrip_information, export_text_input_form_field_as_text, export_toc_page_numbers, export_xhtml_transitional, font_resources_subsetting_size_threshold, fonts_folder, fonts_folder_alias, html_version, image_resolution, images_folder, images_folder_alias, metafile_format, office_math_output_mode, pretty_format, replace_backslash_with_yen_sign, resolve_font_names, resource_folder, resource_folder_alias, scale_image_to_shape_size, table_width_output_mode, navigation_map_level, save_format].hash
853
863
  end
854
864
 
855
865
  # Builds the object from hash
@@ -60,6 +60,9 @@ module AsposeWordsCloud
60
60
  # The default value is Aspose.Words.Saving.ImlRenderingMode.InkML.
61
61
  attr_accessor :iml_rendering_mode
62
62
 
63
+ # Gets or sets a value indicating whether the font attributes will be changed according to the character code being used.
64
+ attr_accessor :update_ambiguous_text_font
65
+
63
66
  # Gets or sets a value determining whether the Aspose.Words.Properties.BuiltInDocumentProperties.CreatedTime property is updated before saving.
64
67
  # Default value is false.
65
68
  attr_accessor :update_created_time_property
@@ -193,6 +196,7 @@ module AsposeWordsCloud
193
196
  :'dml_rendering_mode' => :'DmlRenderingMode',
194
197
  :'file_name' => :'FileName',
195
198
  :'iml_rendering_mode' => :'ImlRenderingMode',
199
+ :'update_ambiguous_text_font' => :'UpdateAmbiguousTextFont',
196
200
  :'update_created_time_property' => :'UpdateCreatedTimeProperty',
197
201
  :'update_fields' => :'UpdateFields',
198
202
  :'update_last_printed_property' => :'UpdateLastPrintedProperty',
@@ -233,6 +237,7 @@ module AsposeWordsCloud
233
237
  :'dml_rendering_mode' => :'String',
234
238
  :'file_name' => :'String',
235
239
  :'iml_rendering_mode' => :'String',
240
+ :'update_ambiguous_text_font' => :'BOOLEAN',
236
241
  :'update_created_time_property' => :'BOOLEAN',
237
242
  :'update_fields' => :'BOOLEAN',
238
243
  :'update_last_printed_property' => :'BOOLEAN',
@@ -301,6 +306,10 @@ module AsposeWordsCloud
301
306
  self.iml_rendering_mode = attributes[:'ImlRenderingMode']
302
307
  end
303
308
 
309
+ if attributes.key?(:'UpdateAmbiguousTextFont')
310
+ self.update_ambiguous_text_font = attributes[:'UpdateAmbiguousTextFont']
311
+ end
312
+
304
313
  if attributes.key?(:'UpdateCreatedTimeProperty')
305
314
  self.update_created_time_property = attributes[:'UpdateCreatedTimeProperty']
306
315
  end
@@ -554,6 +563,7 @@ module AsposeWordsCloud
554
563
  dml_rendering_mode == other.dml_rendering_mode &&
555
564
  file_name == other.file_name &&
556
565
  iml_rendering_mode == other.iml_rendering_mode &&
566
+ update_ambiguous_text_font == other.update_ambiguous_text_font &&
557
567
  update_created_time_property == other.update_created_time_property &&
558
568
  update_fields == other.update_fields &&
559
569
  update_last_printed_property == other.update_last_printed_property &&
@@ -592,7 +602,7 @@ module AsposeWordsCloud
592
602
  # Calculates hash code according to all attributes.
593
603
  # @return [Fixnum] Hash code
594
604
  def hash
595
- [allow_embedding_post_script_fonts, custom_time_zone_info_data, dml3_d_effects_rendering_mode, dml_effects_rendering_mode, dml_rendering_mode, file_name, iml_rendering_mode, update_created_time_property, update_fields, update_last_printed_property, update_last_saved_time_property, 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_high_quality_rendering, vertical_resolution, image_height, image_width, use_gdi_emf_renderer, save_format].hash
605
+ [allow_embedding_post_script_fonts, custom_time_zone_info_data, dml3_d_effects_rendering_mode, dml_effects_rendering_mode, dml_rendering_mode, file_name, iml_rendering_mode, update_ambiguous_text_font, update_created_time_property, update_fields, update_last_printed_property, update_last_saved_time_property, 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_high_quality_rendering, vertical_resolution, image_height, image_width, use_gdi_emf_renderer, save_format].hash
596
606
  end
597
607
 
598
608
  # Builds the object from hash
@@ -0,0 +1,231 @@
1
+ # ------------------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="comment_range_end.rb">
3
+ # Copyright (c) 2025 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
+ # Comment range end link.
31
+ class CommentRangeEnd
32
+ # Gets or sets the link to the document.
33
+ attr_accessor :link
34
+
35
+ # Gets or sets the node id.
36
+ attr_accessor :node_id
37
+
38
+ # Gets or sets the link to comment.
39
+ attr_accessor :comment_link
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'link' => :'Link',
44
+ :'node_id' => :'NodeId',
45
+ :'comment_link' => :'CommentLink'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.swagger_types
51
+ {
52
+ :'link' => :'WordsApiLink',
53
+ :'node_id' => :'String',
54
+ :'comment_link' => :'CommentLink'
55
+ }
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ return unless attributes.is_a?(Hash)
62
+
63
+ # convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
65
+
66
+ if attributes.key?(:'Link')
67
+ self.link = attributes[:'Link']
68
+ end
69
+
70
+ if attributes.key?(:'NodeId')
71
+ self.node_id = attributes[:'NodeId']
72
+ end
73
+
74
+ if attributes.key?(:'CommentLink')
75
+ self.comment_link = attributes[:'CommentLink']
76
+ end
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ return true
83
+ end
84
+
85
+ # Checks equality by comparing each attribute.
86
+ # @param [Object] Object to be compared
87
+ def ==(other)
88
+ return true if self.equal?(other)
89
+ self.class == other.class &&
90
+ link == other.link &&
91
+ node_id == other.node_id &&
92
+ comment_link == other.comment_link
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(other)
98
+ self == other
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Fixnum] Hash code
103
+ def hash
104
+ [link, node_id, comment_link].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ self.class.swagger_types.each_pair do |key, type|
113
+ if type =~ /\AArray<(.*)>/i
114
+ # check to ensure the input is an array given that the the attribute
115
+ # is documented as an array but the input is not
116
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
117
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
118
+ end
119
+ elsif !attributes[self.class.attribute_map[key]].nil?
120
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
121
+ end
122
+ # or else data not found in attributes(hash), not an issue as the data can be optional
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :DateTime
135
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
136
+ when :Date
137
+ Time.at(/\d/.match(value)[0].to_f).to_date
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :BOOLEAN
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else
165
+ # model
166
+ if value[:'$type']
167
+ type = value[:'$type'][0..-4]
168
+ end
169
+
170
+ temp_model = AsposeWordsCloud.const_get(type).new
171
+ temp_model.build_from_hash(value)
172
+ end
173
+ end
174
+
175
+ # Returns the string representation of the object
176
+ # @return [String] String presentation of the object
177
+ def to_s
178
+ to_hash.to_s
179
+ end
180
+
181
+ # to_body is an alias to to_hash (backward compatibility)
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_body
184
+ to_hash
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = self.send(attr)
193
+ next if value.nil?
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map { |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to? :to_hash
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+
217
+ def collectFilesContent(resultFilesContent)
218
+ end
219
+
220
+ def validate()
221
+ unless self.link.nil?
222
+ self.link.validate
223
+ end
224
+ unless self.comment_link.nil?
225
+ self.comment_link.validate
226
+ end
227
+
228
+ end
229
+
230
+ end
231
+ end
@@ -0,0 +1,231 @@
1
+ # ------------------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="comment_range_start.rb">
3
+ # Copyright (c) 2025 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
+ # Comment range start link.
31
+ class CommentRangeStart
32
+ # Gets or sets the link to the document.
33
+ attr_accessor :link
34
+
35
+ # Gets or sets the node id.
36
+ attr_accessor :node_id
37
+
38
+ # Gets or sets the link to comment.
39
+ attr_accessor :comment_link
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'link' => :'Link',
44
+ :'node_id' => :'NodeId',
45
+ :'comment_link' => :'CommentLink'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.swagger_types
51
+ {
52
+ :'link' => :'WordsApiLink',
53
+ :'node_id' => :'String',
54
+ :'comment_link' => :'CommentLink'
55
+ }
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ return unless attributes.is_a?(Hash)
62
+
63
+ # convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
65
+
66
+ if attributes.key?(:'Link')
67
+ self.link = attributes[:'Link']
68
+ end
69
+
70
+ if attributes.key?(:'NodeId')
71
+ self.node_id = attributes[:'NodeId']
72
+ end
73
+
74
+ if attributes.key?(:'CommentLink')
75
+ self.comment_link = attributes[:'CommentLink']
76
+ end
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ return true
83
+ end
84
+
85
+ # Checks equality by comparing each attribute.
86
+ # @param [Object] Object to be compared
87
+ def ==(other)
88
+ return true if self.equal?(other)
89
+ self.class == other.class &&
90
+ link == other.link &&
91
+ node_id == other.node_id &&
92
+ comment_link == other.comment_link
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(other)
98
+ self == other
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Fixnum] Hash code
103
+ def hash
104
+ [link, node_id, comment_link].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ self.class.swagger_types.each_pair do |key, type|
113
+ if type =~ /\AArray<(.*)>/i
114
+ # check to ensure the input is an array given that the the attribute
115
+ # is documented as an array but the input is not
116
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
117
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
118
+ end
119
+ elsif !attributes[self.class.attribute_map[key]].nil?
120
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
121
+ end
122
+ # or else data not found in attributes(hash), not an issue as the data can be optional
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :DateTime
135
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
136
+ when :Date
137
+ Time.at(/\d/.match(value)[0].to_f).to_date
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :BOOLEAN
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else
165
+ # model
166
+ if value[:'$type']
167
+ type = value[:'$type'][0..-4]
168
+ end
169
+
170
+ temp_model = AsposeWordsCloud.const_get(type).new
171
+ temp_model.build_from_hash(value)
172
+ end
173
+ end
174
+
175
+ # Returns the string representation of the object
176
+ # @return [String] String presentation of the object
177
+ def to_s
178
+ to_hash.to_s
179
+ end
180
+
181
+ # to_body is an alias to to_hash (backward compatibility)
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_body
184
+ to_hash
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = self.send(attr)
193
+ next if value.nil?
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map { |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to? :to_hash
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+
217
+ def collectFilesContent(resultFilesContent)
218
+ end
219
+
220
+ def validate()
221
+ unless self.link.nil?
222
+ self.link.validate
223
+ end
224
+ unless self.comment_link.nil?
225
+ self.comment_link.validate
226
+ end
227
+
228
+ end
229
+
230
+ end
231
+ end
@@ -32,6 +32,9 @@ module AsposeWordsCloud
32
32
  # Gets or sets whether accept revisions before comparison or not.
33
33
  attr_accessor :accept_all_revisions_before_comparison
34
34
 
35
+ # Gets or sets the option indicating whether changes are tracked by character or by word.
36
+ attr_accessor :granularity
37
+
35
38
  # Gets or sets a value indicating whether documents comparison is case insensitive. By default comparison is case sensitive.
36
39
  attr_accessor :ignore_case_changes
37
40
 
@@ -85,6 +88,7 @@ module AsposeWordsCloud
85
88
  def self.attribute_map
86
89
  {
87
90
  :'accept_all_revisions_before_comparison' => :'AcceptAllRevisionsBeforeComparison',
91
+ :'granularity' => :'Granularity',
88
92
  :'ignore_case_changes' => :'IgnoreCaseChanges',
89
93
  :'ignore_comments' => :'IgnoreComments',
90
94
  :'ignore_fields' => :'IgnoreFields',
@@ -101,6 +105,7 @@ module AsposeWordsCloud
101
105
  def self.swagger_types
102
106
  {
103
107
  :'accept_all_revisions_before_comparison' => :'BOOLEAN',
108
+ :'granularity' => :'String',
104
109
  :'ignore_case_changes' => :'BOOLEAN',
105
110
  :'ignore_comments' => :'BOOLEAN',
106
111
  :'ignore_fields' => :'BOOLEAN',
@@ -125,6 +130,10 @@ module AsposeWordsCloud
125
130
  self.accept_all_revisions_before_comparison = attributes[:'AcceptAllRevisionsBeforeComparison']
126
131
  end
127
132
 
133
+ if attributes.key?(:'Granularity')
134
+ self.granularity = attributes[:'Granularity']
135
+ end
136
+
128
137
  if attributes.key?(:'IgnoreCaseChanges')
129
138
  self.ignore_case_changes = attributes[:'IgnoreCaseChanges']
130
139
  end
@@ -165,12 +174,28 @@ module AsposeWordsCloud
165
174
  # Check to see if the all the properties in the model are valid
166
175
  # @return true if the model is valid
167
176
  def valid?
177
+ granularity_validator = EnumAttributeValidator.new('String', ["CharLevel", "WordLevel"])
178
+ return false unless granularity_validator.valid?(@granularity)
168
179
  target_validator = EnumAttributeValidator.new('String', ["Current", "New"])
169
180
  return false unless target_validator.valid?(@target)
170
181
 
171
182
  return true
172
183
  end
173
184
 
185
+ # Custom attribute writer method checking allowed values (enum).
186
+ # @param [Object] granularity Object to be assigned
187
+ def granularity=(granularity)
188
+ validator = EnumAttributeValidator.new('String', ["CharLevel", "WordLevel"])
189
+ if granularity.to_i == 0
190
+ unless validator.valid?(granularity)
191
+ raise ArgumentError, "invalid value for 'granularity', must be one of #{validator.allowable_values}."
192
+ end
193
+ @granularity = granularity
194
+ else
195
+ @granularity = validator.allowable_values[granularity.to_i]
196
+ end
197
+ end
198
+
174
199
  # Custom attribute writer method checking allowed values (enum).
175
200
  # @param [Object] target Object to be assigned
176
201
  def target=(target)
@@ -192,6 +217,7 @@ module AsposeWordsCloud
192
217
  return true if self.equal?(other)
193
218
  self.class == other.class &&
194
219
  accept_all_revisions_before_comparison == other.accept_all_revisions_before_comparison &&
220
+ granularity == other.granularity &&
195
221
  ignore_case_changes == other.ignore_case_changes &&
196
222
  ignore_comments == other.ignore_comments &&
197
223
  ignore_fields == other.ignore_fields &&
@@ -212,7 +238,7 @@ module AsposeWordsCloud
212
238
  # Calculates hash code according to all attributes.
213
239
  # @return [Fixnum] Hash code
214
240
  def hash
215
- [accept_all_revisions_before_comparison, ignore_case_changes, ignore_comments, ignore_fields, ignore_footnotes, ignore_formatting, ignore_headers_and_footers, ignore_tables, ignore_textboxes, target].hash
241
+ [accept_all_revisions_before_comparison, granularity, ignore_case_changes, ignore_comments, ignore_fields, ignore_footnotes, ignore_formatting, ignore_headers_and_footers, ignore_tables, ignore_textboxes, target].hash
216
242
  end
217
243
 
218
244
  # Builds the object from hash