aspose_words_cloud 23.1.0 → 23.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 (24) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose_words_cloud/api/words_api.rb +428 -0
  3. data/lib/aspose_words_cloud/models/requests/delete_structured_document_tag_online_request.rb +211 -0
  4. data/lib/aspose_words_cloud/models/requests/delete_structured_document_tag_request.rb +210 -0
  5. data/lib/aspose_words_cloud/models/requests/get_structured_document_tag_online_request.rb +190 -0
  6. data/lib/aspose_words_cloud/models/requests/get_structured_document_tag_request.rb +189 -0
  7. data/lib/aspose_words_cloud/models/requests/get_structured_document_tags_online_request.rb +179 -0
  8. data/lib/aspose_words_cloud/models/requests/get_structured_document_tags_request.rb +178 -0
  9. data/lib/aspose_words_cloud/models/requests/insert_structured_document_tag_online_request.rb +223 -0
  10. data/lib/aspose_words_cloud/models/requests/insert_structured_document_tag_request.rb +225 -0
  11. data/lib/aspose_words_cloud/models/requests/update_structured_document_tag_online_request.rb +234 -0
  12. data/lib/aspose_words_cloud/models/requests/update_structured_document_tag_request.rb +236 -0
  13. data/lib/aspose_words_cloud/models/responses/insert_structured_document_tag_online_response.rb +46 -0
  14. data/lib/aspose_words_cloud/models/responses/update_structured_document_tag_online_response.rb +46 -0
  15. data/lib/aspose_words_cloud/models/structured_document_tag.rb +564 -0
  16. data/lib/aspose_words_cloud/models/structured_document_tag_collection.rb +216 -0
  17. data/lib/aspose_words_cloud/models/structured_document_tag_insert.rb +564 -0
  18. data/lib/aspose_words_cloud/models/structured_document_tag_list_item.rb +214 -0
  19. data/lib/aspose_words_cloud/models/structured_document_tag_response.rb +214 -0
  20. data/lib/aspose_words_cloud/models/structured_document_tag_update.rb +564 -0
  21. data/lib/aspose_words_cloud/models/structured_document_tags_response.rb +214 -0
  22. data/lib/aspose_words_cloud/version.rb +1 -1
  23. data/lib/aspose_words_cloud.rb +17 -0
  24. metadata +21 -2
@@ -0,0 +1,564 @@
1
+ # ------------------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="structured_document_tag.rb">
3
+ # Copyright (c) 2023 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
+ # DTO container with a StructuredDocumentTag.
31
+ class StructuredDocumentTag
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 appearance of a structured document tag.
39
+ attr_accessor :appearance
40
+
41
+ # Gets or sets category of building block for this SDT node. Can not be null.
42
+ attr_accessor :building_block_category
43
+
44
+ # Gets or sets type of building block for this SDT. Can not be null.
45
+ attr_accessor :building_block_gallery
46
+
47
+ # Gets or sets the type of calendar for this SDT. Default is Aspose.Words.Markup.SdtCalendarType.Default.
48
+ attr_accessor :calendar_type
49
+
50
+ # Gets or sets a value indicating whether current state of the Checkbox SDT. Default value for this property.
51
+ attr_accessor :checked
52
+
53
+ # Gets or sets the color of the structured document tag.
54
+ attr_accessor :color
55
+
56
+ # Gets or sets String that represents the format in which dates are displayed. Can not be null. The dates for English (U.S.) is "mm/dd/yyyy".
57
+ attr_accessor :date_display_format
58
+
59
+ # Gets or sets the language format for the date displayed in this SDT.
60
+ attr_accessor :date_display_locale
61
+
62
+ # Gets or sets format in which the date for a date SDT is stored when the SDT is bound to an XML node in the document's data store.
63
+ # Default value is Aspose.Words.Markup.SdtDateStorageFormat.DateTime.
64
+ attr_accessor :date_storage_format
65
+
66
+ # Gets or sets the full date and time last entered into this SDT.
67
+ attr_accessor :full_date
68
+
69
+ # Gets or sets a unique read-only persistent numerical Id for this SDT.
70
+ attr_accessor :id
71
+
72
+ # Gets or sets a value indicating whether the content of this SDT shall be interpreted to contain placeholder text (as opposed to regular text contents within the SDT).
73
+ # If set to true, this state shall be resumed (showing placeholder text) upon opening his document.
74
+ attr_accessor :is_showing_placeholder_text
75
+
76
+ # Gets or sets a value indicating whether this SDT shall be removed from the WordProcessingML document when its contents are modified.
77
+ attr_accessor :is_temporary
78
+
79
+ # Gets or sets the level at which this SDT occurs in the document tree.
80
+ attr_accessor :level
81
+
82
+ # Gets or sets Aspose.Words.Markup.SdtListItemCollection associated with this SDT.
83
+ attr_accessor :list_items
84
+
85
+ # Gets or sets a value indicating whether, this property will prohibit a user from deleting this SDT.
86
+ attr_accessor :lock_content_control
87
+
88
+ # Gets or sets a value indicating whether, this property will prohibit a user from editing the contents of this SDT.
89
+ attr_accessor :lock_contents
90
+
91
+ # Gets or sets a value indicating whether this SDT allows multiple lines of text.
92
+ attr_accessor :multiline
93
+
94
+ # Gets or sets Name of the Aspose.Words.BuildingBlocks.BuildingBlock containing placeholder text.
95
+ # Aspose.Words.BuildingBlocks.BuildingBlock with this name Aspose.Words.BuildingBlocks.BuildingBlock.Name has to be present in the Aspose.Words.Document.GlossaryDocument otherwise System.InvalidOperationException will occur.
96
+ attr_accessor :placeholder_name
97
+
98
+ # Gets or sets type of this Structured document tag.
99
+ attr_accessor :sdt_type
100
+
101
+ # Gets or sets the name of the style applied to the structured document tag.
102
+ attr_accessor :style_name
103
+
104
+ # Gets or sets a tag associated with the current SDT node. Can not be null.
105
+ attr_accessor :tag
106
+
107
+ # Gets or sets the friendly name associated with this SDT. Can not be null.
108
+ attr_accessor :title
109
+
110
+ # Gets a string that represents the XML contained within the node in the Aspose.Words.SaveFormat.FlatOpc format.
111
+ attr_accessor :word_open_xml
112
+
113
+ class EnumAttributeValidator
114
+ attr_reader :datatype
115
+ attr_reader :allowable_values
116
+
117
+ def initialize(datatype, allowable_values)
118
+ @allowable_values = allowable_values.map do |value|
119
+ case datatype.to_s
120
+ when /Integer/i
121
+ value.to_i
122
+ when /Float/i
123
+ value.to_f
124
+ else
125
+ value
126
+ end
127
+ end
128
+ end
129
+
130
+ def valid?(value)
131
+ !value || allowable_values.include?(value)
132
+ end
133
+ end
134
+
135
+ # Attribute mapping from ruby-style variable name to JSON key.
136
+ def self.attribute_map
137
+ {
138
+ :'link' => :'Link',
139
+ :'node_id' => :'NodeId',
140
+ :'appearance' => :'Appearance',
141
+ :'building_block_category' => :'BuildingBlockCategory',
142
+ :'building_block_gallery' => :'BuildingBlockGallery',
143
+ :'calendar_type' => :'CalendarType',
144
+ :'checked' => :'Checked',
145
+ :'color' => :'Color',
146
+ :'date_display_format' => :'DateDisplayFormat',
147
+ :'date_display_locale' => :'DateDisplayLocale',
148
+ :'date_storage_format' => :'DateStorageFormat',
149
+ :'full_date' => :'FullDate',
150
+ :'id' => :'Id',
151
+ :'is_showing_placeholder_text' => :'IsShowingPlaceholderText',
152
+ :'is_temporary' => :'IsTemporary',
153
+ :'level' => :'Level',
154
+ :'list_items' => :'ListItems',
155
+ :'lock_content_control' => :'LockContentControl',
156
+ :'lock_contents' => :'LockContents',
157
+ :'multiline' => :'Multiline',
158
+ :'placeholder_name' => :'PlaceholderName',
159
+ :'sdt_type' => :'SdtType',
160
+ :'style_name' => :'StyleName',
161
+ :'tag' => :'Tag',
162
+ :'title' => :'Title',
163
+ :'word_open_xml' => :'WordOpenXML'
164
+ }
165
+ end
166
+
167
+ # Attribute type mapping.
168
+ def self.swagger_types
169
+ {
170
+ :'link' => :'WordsApiLink',
171
+ :'node_id' => :'String',
172
+ :'appearance' => :'String',
173
+ :'building_block_category' => :'String',
174
+ :'building_block_gallery' => :'String',
175
+ :'calendar_type' => :'String',
176
+ :'checked' => :'BOOLEAN',
177
+ :'color' => :'String',
178
+ :'date_display_format' => :'String',
179
+ :'date_display_locale' => :'Integer',
180
+ :'date_storage_format' => :'String',
181
+ :'full_date' => :'DateTime',
182
+ :'id' => :'Integer',
183
+ :'is_showing_placeholder_text' => :'BOOLEAN',
184
+ :'is_temporary' => :'BOOLEAN',
185
+ :'level' => :'String',
186
+ :'list_items' => :'Array<StructuredDocumentTagListItem>',
187
+ :'lock_content_control' => :'BOOLEAN',
188
+ :'lock_contents' => :'BOOLEAN',
189
+ :'multiline' => :'BOOLEAN',
190
+ :'placeholder_name' => :'String',
191
+ :'sdt_type' => :'String',
192
+ :'style_name' => :'String',
193
+ :'tag' => :'String',
194
+ :'title' => :'String',
195
+ :'word_open_xml' => :'String'
196
+ }
197
+ end
198
+
199
+ # Initializes the object
200
+ # @param [Hash] attributes Model attributes in the form of hash
201
+ def initialize(attributes = {})
202
+ return unless attributes.is_a?(Hash)
203
+
204
+ # convert string to symbol for hash key
205
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
206
+
207
+ if attributes.key?(:'Link')
208
+ self.link = attributes[:'Link']
209
+ end
210
+
211
+ if attributes.key?(:'NodeId')
212
+ self.node_id = attributes[:'NodeId']
213
+ end
214
+
215
+ if attributes.key?(:'Appearance')
216
+ self.appearance = attributes[:'Appearance']
217
+ end
218
+
219
+ if attributes.key?(:'BuildingBlockCategory')
220
+ self.building_block_category = attributes[:'BuildingBlockCategory']
221
+ end
222
+
223
+ if attributes.key?(:'BuildingBlockGallery')
224
+ self.building_block_gallery = attributes[:'BuildingBlockGallery']
225
+ end
226
+
227
+ if attributes.key?(:'CalendarType')
228
+ self.calendar_type = attributes[:'CalendarType']
229
+ end
230
+
231
+ if attributes.key?(:'Checked')
232
+ self.checked = attributes[:'Checked']
233
+ end
234
+
235
+ if attributes.key?(:'Color')
236
+ self.color = attributes[:'Color']
237
+ end
238
+
239
+ if attributes.key?(:'DateDisplayFormat')
240
+ self.date_display_format = attributes[:'DateDisplayFormat']
241
+ end
242
+
243
+ if attributes.key?(:'DateDisplayLocale')
244
+ self.date_display_locale = attributes[:'DateDisplayLocale']
245
+ end
246
+
247
+ if attributes.key?(:'DateStorageFormat')
248
+ self.date_storage_format = attributes[:'DateStorageFormat']
249
+ end
250
+
251
+ if attributes.key?(:'FullDate')
252
+ self.full_date = attributes[:'FullDate']
253
+ end
254
+
255
+ if attributes.key?(:'Id')
256
+ self.id = attributes[:'Id']
257
+ end
258
+
259
+ if attributes.key?(:'IsShowingPlaceholderText')
260
+ self.is_showing_placeholder_text = attributes[:'IsShowingPlaceholderText']
261
+ end
262
+
263
+ if attributes.key?(:'IsTemporary')
264
+ self.is_temporary = attributes[:'IsTemporary']
265
+ end
266
+
267
+ if attributes.key?(:'Level')
268
+ self.level = attributes[:'Level']
269
+ end
270
+
271
+ if attributes.key?(:'ListItems')
272
+ if (value = attributes[:'ListItems']).is_a?(Array)
273
+ self.list_items = value
274
+ end
275
+ end
276
+
277
+ if attributes.key?(:'LockContentControl')
278
+ self.lock_content_control = attributes[:'LockContentControl']
279
+ end
280
+
281
+ if attributes.key?(:'LockContents')
282
+ self.lock_contents = attributes[:'LockContents']
283
+ end
284
+
285
+ if attributes.key?(:'Multiline')
286
+ self.multiline = attributes[:'Multiline']
287
+ end
288
+
289
+ if attributes.key?(:'PlaceholderName')
290
+ self.placeholder_name = attributes[:'PlaceholderName']
291
+ end
292
+
293
+ if attributes.key?(:'SdtType')
294
+ self.sdt_type = attributes[:'SdtType']
295
+ end
296
+
297
+ if attributes.key?(:'StyleName')
298
+ self.style_name = attributes[:'StyleName']
299
+ end
300
+
301
+ if attributes.key?(:'Tag')
302
+ self.tag = attributes[:'Tag']
303
+ end
304
+
305
+ if attributes.key?(:'Title')
306
+ self.title = attributes[:'Title']
307
+ end
308
+
309
+ if attributes.key?(:'WordOpenXML')
310
+ self.word_open_xml = attributes[:'WordOpenXML']
311
+ end
312
+ end
313
+
314
+ # Show invalid properties with the reasons. Usually used together with valid?
315
+ # @return Array for valid properies with the reasons
316
+ def list_invalid_properties
317
+ invalid_properties = []
318
+ return invalid_properties
319
+ end
320
+
321
+ # Check to see if the all the properties in the model are valid
322
+ # @return true if the model is valid
323
+ def valid?
324
+ appearance_validator = EnumAttributeValidator.new('String', ["Default", "BoundingBox", "Tags", "Hidden"])
325
+ return false unless appearance_validator.valid?(@appearance)
326
+ calendar_type_validator = EnumAttributeValidator.new('String', ["Default", "Gregorian", "GregorianArabic", "GregorianMeFrench", "GregorianUs", "GregorianXlitEnglish", "GregorianXlitFrench", "Hebrew", "Hijri", "Japan", "Korea", "None", "Saka", "Taiwan", "Thai"])
327
+ return false unless calendar_type_validator.valid?(@calendar_type)
328
+ date_storage_format_validator = EnumAttributeValidator.new('String', ["Date", "DateTime", "Default", "Text"])
329
+ return false unless date_storage_format_validator.valid?(@date_storage_format)
330
+ level_validator = EnumAttributeValidator.new('String', ["Unknown", "Inline", "Block", "Row", "Cell"])
331
+ return false unless level_validator.valid?(@level)
332
+ sdt_type_validator = EnumAttributeValidator.new('String', ["None", "Bibliography", "Citation", "Equation", "DropDownList", "ComboBox", "Date", "BuildingBlockGallery", "DocPartObj", "Group", "Picture", "RichText", "PlainText", "Checkbox", "RepeatingSection", "RepeatingSectionItem", "EntityPicker"])
333
+ return false unless sdt_type_validator.valid?(@sdt_type)
334
+
335
+ return true
336
+ end
337
+
338
+ # Custom attribute writer method checking allowed values (enum).
339
+ # @param [Object] appearance Object to be assigned
340
+ def appearance=(appearance)
341
+ validator = EnumAttributeValidator.new('String', ["Default", "BoundingBox", "Tags", "Hidden"])
342
+ if appearance.to_i == 0
343
+ unless validator.valid?(appearance)
344
+ raise ArgumentError, "invalid value for 'appearance', must be one of #{validator.allowable_values}."
345
+ end
346
+ @appearance = appearance
347
+ else
348
+ @appearance = validator.allowable_values[appearance.to_i]
349
+ end
350
+ end
351
+
352
+ # Custom attribute writer method checking allowed values (enum).
353
+ # @param [Object] calendar_type Object to be assigned
354
+ def calendar_type=(calendar_type)
355
+ validator = EnumAttributeValidator.new('String', ["Default", "Gregorian", "GregorianArabic", "GregorianMeFrench", "GregorianUs", "GregorianXlitEnglish", "GregorianXlitFrench", "Hebrew", "Hijri", "Japan", "Korea", "None", "Saka", "Taiwan", "Thai"])
356
+ if calendar_type.to_i == 0
357
+ unless validator.valid?(calendar_type)
358
+ raise ArgumentError, "invalid value for 'calendar_type', must be one of #{validator.allowable_values}."
359
+ end
360
+ @calendar_type = calendar_type
361
+ else
362
+ @calendar_type = validator.allowable_values[calendar_type.to_i]
363
+ end
364
+ end
365
+
366
+ # Custom attribute writer method checking allowed values (enum).
367
+ # @param [Object] date_storage_format Object to be assigned
368
+ def date_storage_format=(date_storage_format)
369
+ validator = EnumAttributeValidator.new('String', ["Date", "DateTime", "Default", "Text"])
370
+ if date_storage_format.to_i == 0
371
+ unless validator.valid?(date_storage_format)
372
+ raise ArgumentError, "invalid value for 'date_storage_format', must be one of #{validator.allowable_values}."
373
+ end
374
+ @date_storage_format = date_storage_format
375
+ else
376
+ @date_storage_format = validator.allowable_values[date_storage_format.to_i]
377
+ end
378
+ end
379
+
380
+ # Custom attribute writer method checking allowed values (enum).
381
+ # @param [Object] level Object to be assigned
382
+ def level=(level)
383
+ validator = EnumAttributeValidator.new('String', ["Unknown", "Inline", "Block", "Row", "Cell"])
384
+ if level.to_i == 0
385
+ unless validator.valid?(level)
386
+ raise ArgumentError, "invalid value for 'level', must be one of #{validator.allowable_values}."
387
+ end
388
+ @level = level
389
+ else
390
+ @level = validator.allowable_values[level.to_i]
391
+ end
392
+ end
393
+
394
+ # Custom attribute writer method checking allowed values (enum).
395
+ # @param [Object] sdt_type Object to be assigned
396
+ def sdt_type=(sdt_type)
397
+ validator = EnumAttributeValidator.new('String', ["None", "Bibliography", "Citation", "Equation", "DropDownList", "ComboBox", "Date", "BuildingBlockGallery", "DocPartObj", "Group", "Picture", "RichText", "PlainText", "Checkbox", "RepeatingSection", "RepeatingSectionItem", "EntityPicker"])
398
+ if sdt_type.to_i == 0
399
+ unless validator.valid?(sdt_type)
400
+ raise ArgumentError, "invalid value for 'sdt_type', must be one of #{validator.allowable_values}."
401
+ end
402
+ @sdt_type = sdt_type
403
+ else
404
+ @sdt_type = validator.allowable_values[sdt_type.to_i]
405
+ end
406
+ end
407
+
408
+
409
+ # Checks equality by comparing each attribute.
410
+ # @param [Object] Object to be compared
411
+ def ==(other)
412
+ return true if self.equal?(other)
413
+ self.class == other.class &&
414
+ link == other.link &&
415
+ node_id == other.node_id &&
416
+ appearance == other.appearance &&
417
+ building_block_category == other.building_block_category &&
418
+ building_block_gallery == other.building_block_gallery &&
419
+ calendar_type == other.calendar_type &&
420
+ checked == other.checked &&
421
+ color == other.color &&
422
+ date_display_format == other.date_display_format &&
423
+ date_display_locale == other.date_display_locale &&
424
+ date_storage_format == other.date_storage_format &&
425
+ full_date == other.full_date &&
426
+ id == other.id &&
427
+ is_showing_placeholder_text == other.is_showing_placeholder_text &&
428
+ is_temporary == other.is_temporary &&
429
+ level == other.level &&
430
+ list_items == other.list_items &&
431
+ lock_content_control == other.lock_content_control &&
432
+ lock_contents == other.lock_contents &&
433
+ multiline == other.multiline &&
434
+ placeholder_name == other.placeholder_name &&
435
+ sdt_type == other.sdt_type &&
436
+ style_name == other.style_name &&
437
+ tag == other.tag &&
438
+ title == other.title &&
439
+ word_open_xml == other.word_open_xml
440
+ end
441
+
442
+ # @see the `==` method
443
+ # @param [Object] Object to be compared
444
+ def eql?(other)
445
+ self == other
446
+ end
447
+
448
+ # Calculates hash code according to all attributes.
449
+ # @return [Fixnum] Hash code
450
+ def hash
451
+ [link, node_id, appearance, building_block_category, building_block_gallery, calendar_type, checked, color, date_display_format, date_display_locale, date_storage_format, full_date, id, is_showing_placeholder_text, is_temporary, level, list_items, lock_content_control, lock_contents, multiline, placeholder_name, sdt_type, style_name, tag, title, word_open_xml].hash
452
+ end
453
+
454
+ # Builds the object from hash
455
+ # @param [Hash] attributes Model attributes in the form of hash
456
+ # @return [Object] Returns the model itself
457
+ def build_from_hash(attributes)
458
+ return nil unless attributes.is_a?(Hash)
459
+ self.class.swagger_types.each_pair do |key, type|
460
+ if type =~ /\AArray<(.*)>/i
461
+ # check to ensure the input is an array given that the the attribute
462
+ # is documented as an array but the input is not
463
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
464
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
465
+ end
466
+ elsif !attributes[self.class.attribute_map[key]].nil?
467
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
468
+ end
469
+ # or else data not found in attributes(hash), not an issue as the data can be optional
470
+ end
471
+
472
+ self
473
+ end
474
+
475
+ # Deserializes the data based on type
476
+ # @param string type Data type
477
+ # @param string value Value to be deserialized
478
+ # @return [Object] Deserialized data
479
+ def _deserialize(type, value)
480
+ case type.to_sym
481
+ when :DateTime
482
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
483
+ when :Date
484
+ Time.at(/\d/.match(value)[0].to_f).to_date
485
+ when :String
486
+ value.to_s
487
+ when :Integer
488
+ value.to_i
489
+ when :Float
490
+ value.to_f
491
+ when :BOOLEAN
492
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
493
+ true
494
+ else
495
+ false
496
+ end
497
+ when :Object
498
+ # generic object (usually a Hash), return directly
499
+ value
500
+ when /\AArray<(?<inner_type>.+)>\z/
501
+ inner_type = Regexp.last_match[:inner_type]
502
+ value.map { |v| _deserialize(inner_type, v) }
503
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
504
+ k_type = Regexp.last_match[:k_type]
505
+ v_type = Regexp.last_match[:v_type]
506
+ {}.tap do |hash|
507
+ value.each do |k, v|
508
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
509
+ end
510
+ end
511
+ else
512
+ # model
513
+ temp_model = AsposeWordsCloud.const_get(type).new
514
+ temp_model.build_from_hash(value)
515
+ end
516
+ end
517
+
518
+ # Returns the string representation of the object
519
+ # @return [String] String presentation of the object
520
+ def to_s
521
+ to_hash.to_s
522
+ end
523
+
524
+ # to_body is an alias to to_hash (backward compatibility)
525
+ # @return [Hash] Returns the object in the form of hash
526
+ def to_body
527
+ to_hash
528
+ end
529
+
530
+ # Returns the object in the form of hash
531
+ # @return [Hash] Returns the object in the form of hash
532
+ def to_hash
533
+ hash = {}
534
+ self.class.attribute_map.each_pair do |attr, param|
535
+ value = self.send(attr)
536
+ next if value.nil?
537
+ hash[param] = _to_hash(value)
538
+ end
539
+ hash
540
+ end
541
+
542
+ # Outputs non-array value in the form of hash
543
+ # For object, use to_hash. Otherwise, just return the value
544
+ # @param [Object] value Any valid value
545
+ # @return [Hash] Returns the value in the form of hash
546
+ def _to_hash(value)
547
+ if value.is_a?(Array)
548
+ value.compact.map { |v| _to_hash(v) }
549
+ elsif value.is_a?(Hash)
550
+ {}.tap do |hash|
551
+ value.each { |k, v| hash[k] = _to_hash(v) }
552
+ end
553
+ elsif value.respond_to? :to_hash
554
+ value.to_hash
555
+ else
556
+ value
557
+ end
558
+ end
559
+
560
+ def collectFilesContent(resultFilesContent)
561
+ end
562
+
563
+ end
564
+ end