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.
- checksums.yaml +4 -4
- data/lib/aspose_words_cloud/models/azw3_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/bmp_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/comment_range_end.rb +231 -0
- data/lib/aspose_words_cloud/models/comment_range_start.rb +231 -0
- data/lib/aspose_words_cloud/models/compare_options.rb +27 -1
- data/lib/aspose_words_cloud/models/doc_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/docm_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/docx_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/dot_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/dotm_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/dotx_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/emf_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/eps_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/epub_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/flat_opc_macro_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/flat_opc_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/flat_opc_template_macro_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/flat_opc_template_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/form_field_checkbox_link.rb +218 -0
- data/lib/aspose_words_cloud/models/form_field_drop_down_link.rb +218 -0
- data/lib/aspose_words_cloud/models/form_field_text_input_link.rb +218 -0
- data/lib/aspose_words_cloud/models/gif_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/html_fixed_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/html_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/jpeg_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/markdown_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/mhtml_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/odt_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/open_xps_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/ott_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/page_setup.rb +2 -2
- data/lib/aspose_words_cloud/models/pcl_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/pdf_save_options_data.rb +40 -1
- data/lib/aspose_words_cloud/models/png_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/ps_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/rtf_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/svg_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/text_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/tiff_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/word_ml_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/xaml_fixed_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/xaml_flow_pack_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/xaml_flow_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/models/xps_save_options_data.rb +11 -1
- data/lib/aspose_words_cloud/version.rb +1 -1
- data/lib/aspose_words_cloud.rb +5 -0
- metadata +7 -2
@@ -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
|
@@ -126,6 +129,7 @@ module AsposeWordsCloud
|
|
126
129
|
:'dml_rendering_mode' => :'DmlRenderingMode',
|
127
130
|
:'file_name' => :'FileName',
|
128
131
|
:'iml_rendering_mode' => :'ImlRenderingMode',
|
132
|
+
:'update_ambiguous_text_font' => :'UpdateAmbiguousTextFont',
|
129
133
|
:'update_created_time_property' => :'UpdateCreatedTimeProperty',
|
130
134
|
:'update_fields' => :'UpdateFields',
|
131
135
|
:'update_last_printed_property' => :'UpdateLastPrintedProperty',
|
@@ -149,6 +153,7 @@ module AsposeWordsCloud
|
|
149
153
|
:'dml_rendering_mode' => :'String',
|
150
154
|
:'file_name' => :'String',
|
151
155
|
:'iml_rendering_mode' => :'String',
|
156
|
+
:'update_ambiguous_text_font' => :'BOOLEAN',
|
152
157
|
:'update_created_time_property' => :'BOOLEAN',
|
153
158
|
:'update_fields' => :'BOOLEAN',
|
154
159
|
:'update_last_printed_property' => :'BOOLEAN',
|
@@ -200,6 +205,10 @@ module AsposeWordsCloud
|
|
200
205
|
self.iml_rendering_mode = attributes[:'ImlRenderingMode']
|
201
206
|
end
|
202
207
|
|
208
|
+
if attributes.key?(:'UpdateAmbiguousTextFont')
|
209
|
+
self.update_ambiguous_text_font = attributes[:'UpdateAmbiguousTextFont']
|
210
|
+
end
|
211
|
+
|
203
212
|
if attributes.key?(:'UpdateCreatedTimeProperty')
|
204
213
|
self.update_created_time_property = attributes[:'UpdateCreatedTimeProperty']
|
205
214
|
end
|
@@ -353,6 +362,7 @@ module AsposeWordsCloud
|
|
353
362
|
dml_rendering_mode == other.dml_rendering_mode &&
|
354
363
|
file_name == other.file_name &&
|
355
364
|
iml_rendering_mode == other.iml_rendering_mode &&
|
365
|
+
update_ambiguous_text_font == other.update_ambiguous_text_font &&
|
356
366
|
update_created_time_property == other.update_created_time_property &&
|
357
367
|
update_fields == other.update_fields &&
|
358
368
|
update_last_printed_property == other.update_last_printed_property &&
|
@@ -374,7 +384,7 @@ module AsposeWordsCloud
|
|
374
384
|
# Calculates hash code according to all attributes.
|
375
385
|
# @return [Fixnum] Hash code
|
376
386
|
def hash
|
377
|
-
[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, compliance, compression_level, password, pretty_format, save_format].hash
|
387
|
+
[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, compliance, compression_level, password, pretty_format, save_format].hash
|
378
388
|
end
|
379
389
|
|
380
390
|
# 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
|
@@ -126,6 +129,7 @@ module AsposeWordsCloud
|
|
126
129
|
:'dml_rendering_mode' => :'DmlRenderingMode',
|
127
130
|
:'file_name' => :'FileName',
|
128
131
|
:'iml_rendering_mode' => :'ImlRenderingMode',
|
132
|
+
:'update_ambiguous_text_font' => :'UpdateAmbiguousTextFont',
|
129
133
|
:'update_created_time_property' => :'UpdateCreatedTimeProperty',
|
130
134
|
:'update_fields' => :'UpdateFields',
|
131
135
|
:'update_last_printed_property' => :'UpdateLastPrintedProperty',
|
@@ -149,6 +153,7 @@ module AsposeWordsCloud
|
|
149
153
|
:'dml_rendering_mode' => :'String',
|
150
154
|
:'file_name' => :'String',
|
151
155
|
:'iml_rendering_mode' => :'String',
|
156
|
+
:'update_ambiguous_text_font' => :'BOOLEAN',
|
152
157
|
:'update_created_time_property' => :'BOOLEAN',
|
153
158
|
:'update_fields' => :'BOOLEAN',
|
154
159
|
:'update_last_printed_property' => :'BOOLEAN',
|
@@ -200,6 +205,10 @@ module AsposeWordsCloud
|
|
200
205
|
self.iml_rendering_mode = attributes[:'ImlRenderingMode']
|
201
206
|
end
|
202
207
|
|
208
|
+
if attributes.key?(:'UpdateAmbiguousTextFont')
|
209
|
+
self.update_ambiguous_text_font = attributes[:'UpdateAmbiguousTextFont']
|
210
|
+
end
|
211
|
+
|
203
212
|
if attributes.key?(:'UpdateCreatedTimeProperty')
|
204
213
|
self.update_created_time_property = attributes[:'UpdateCreatedTimeProperty']
|
205
214
|
end
|
@@ -353,6 +362,7 @@ module AsposeWordsCloud
|
|
353
362
|
dml_rendering_mode == other.dml_rendering_mode &&
|
354
363
|
file_name == other.file_name &&
|
355
364
|
iml_rendering_mode == other.iml_rendering_mode &&
|
365
|
+
update_ambiguous_text_font == other.update_ambiguous_text_font &&
|
356
366
|
update_created_time_property == other.update_created_time_property &&
|
357
367
|
update_fields == other.update_fields &&
|
358
368
|
update_last_printed_property == other.update_last_printed_property &&
|
@@ -374,7 +384,7 @@ module AsposeWordsCloud
|
|
374
384
|
# Calculates hash code according to all attributes.
|
375
385
|
# @return [Fixnum] Hash code
|
376
386
|
def hash
|
377
|
-
[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, compliance, compression_level, password, pretty_format, save_format].hash
|
387
|
+
[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, compliance, compression_level, password, pretty_format, save_format].hash
|
378
388
|
end
|
379
389
|
|
380
390
|
# Builds the object from hash
|
@@ -0,0 +1,218 @@
|
|
1
|
+
# ------------------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="form_field_checkbox_link.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
|
+
# Link to FormField checkbox element.
|
31
|
+
class FormFieldCheckboxLink
|
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
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'link' => :'Link',
|
41
|
+
:'node_id' => :'NodeId'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.swagger_types
|
47
|
+
{
|
48
|
+
:'link' => :'WordsApiLink',
|
49
|
+
:'node_id' => :'String'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
return unless attributes.is_a?(Hash)
|
57
|
+
|
58
|
+
# convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
60
|
+
|
61
|
+
if attributes.key?(:'Link')
|
62
|
+
self.link = attributes[:'Link']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.key?(:'NodeId')
|
66
|
+
self.node_id = attributes[:'NodeId']
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Check to see if the all the properties in the model are valid
|
71
|
+
# @return true if the model is valid
|
72
|
+
def valid?
|
73
|
+
return true
|
74
|
+
end
|
75
|
+
|
76
|
+
# Checks equality by comparing each attribute.
|
77
|
+
# @param [Object] Object to be compared
|
78
|
+
def ==(other)
|
79
|
+
return true if self.equal?(other)
|
80
|
+
self.class == other.class &&
|
81
|
+
link == other.link &&
|
82
|
+
node_id == other.node_id
|
83
|
+
end
|
84
|
+
|
85
|
+
# @see the `==` method
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def eql?(other)
|
88
|
+
self == other
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Fixnum] Hash code
|
93
|
+
def hash
|
94
|
+
[link, node_id].hash
|
95
|
+
end
|
96
|
+
|
97
|
+
# Builds the object from hash
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
# @return [Object] Returns the model itself
|
100
|
+
def build_from_hash(attributes)
|
101
|
+
return nil unless attributes.is_a?(Hash)
|
102
|
+
self.class.swagger_types.each_pair do |key, type|
|
103
|
+
if type =~ /\AArray<(.*)>/i
|
104
|
+
# check to ensure the input is an array given that the the attribute
|
105
|
+
# is documented as an array but the input is not
|
106
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
107
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
108
|
+
end
|
109
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
110
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
111
|
+
end
|
112
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
113
|
+
end
|
114
|
+
|
115
|
+
self
|
116
|
+
end
|
117
|
+
|
118
|
+
# Deserializes the data based on type
|
119
|
+
# @param string type Data type
|
120
|
+
# @param string value Value to be deserialized
|
121
|
+
# @return [Object] Deserialized data
|
122
|
+
def _deserialize(type, value)
|
123
|
+
case type.to_sym
|
124
|
+
when :DateTime
|
125
|
+
Time.at(/\d/.match(value)[0].to_f).to_datetime
|
126
|
+
when :Date
|
127
|
+
Time.at(/\d/.match(value)[0].to_f).to_date
|
128
|
+
when :String
|
129
|
+
value.to_s
|
130
|
+
when :Integer
|
131
|
+
value.to_i
|
132
|
+
when :Float
|
133
|
+
value.to_f
|
134
|
+
when :BOOLEAN
|
135
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
136
|
+
true
|
137
|
+
else
|
138
|
+
false
|
139
|
+
end
|
140
|
+
when :Object
|
141
|
+
# generic object (usually a Hash), return directly
|
142
|
+
value
|
143
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
144
|
+
inner_type = Regexp.last_match[:inner_type]
|
145
|
+
value.map { |v| _deserialize(inner_type, v) }
|
146
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
147
|
+
k_type = Regexp.last_match[:k_type]
|
148
|
+
v_type = Regexp.last_match[:v_type]
|
149
|
+
{}.tap do |hash|
|
150
|
+
value.each do |k, v|
|
151
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
else
|
155
|
+
# model
|
156
|
+
if value[:'$type']
|
157
|
+
type = value[:'$type'][0..-4]
|
158
|
+
end
|
159
|
+
|
160
|
+
temp_model = AsposeWordsCloud.const_get(type).new
|
161
|
+
temp_model.build_from_hash(value)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
# Returns the string representation of the object
|
166
|
+
# @return [String] String presentation of the object
|
167
|
+
def to_s
|
168
|
+
to_hash.to_s
|
169
|
+
end
|
170
|
+
|
171
|
+
# to_body is an alias to to_hash (backward compatibility)
|
172
|
+
# @return [Hash] Returns the object in the form of hash
|
173
|
+
def to_body
|
174
|
+
to_hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Returns the object in the form of hash
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_hash
|
180
|
+
hash = {}
|
181
|
+
self.class.attribute_map.each_pair do |attr, param|
|
182
|
+
value = self.send(attr)
|
183
|
+
next if value.nil?
|
184
|
+
hash[param] = _to_hash(value)
|
185
|
+
end
|
186
|
+
hash
|
187
|
+
end
|
188
|
+
|
189
|
+
# Outputs non-array value in the form of hash
|
190
|
+
# For object, use to_hash. Otherwise, just return the value
|
191
|
+
# @param [Object] value Any valid value
|
192
|
+
# @return [Hash] Returns the value in the form of hash
|
193
|
+
def _to_hash(value)
|
194
|
+
if value.is_a?(Array)
|
195
|
+
value.compact.map { |v| _to_hash(v) }
|
196
|
+
elsif value.is_a?(Hash)
|
197
|
+
{}.tap do |hash|
|
198
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
199
|
+
end
|
200
|
+
elsif value.respond_to? :to_hash
|
201
|
+
value.to_hash
|
202
|
+
else
|
203
|
+
value
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
def collectFilesContent(resultFilesContent)
|
208
|
+
end
|
209
|
+
|
210
|
+
def validate()
|
211
|
+
unless self.link.nil?
|
212
|
+
self.link.validate
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
end
|
@@ -0,0 +1,218 @@
|
|
1
|
+
# ------------------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="form_field_drop_down_link.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
|
+
# Link to FormField DropDown element.
|
31
|
+
class FormFieldDropDownLink
|
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
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'link' => :'Link',
|
41
|
+
:'node_id' => :'NodeId'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.swagger_types
|
47
|
+
{
|
48
|
+
:'link' => :'WordsApiLink',
|
49
|
+
:'node_id' => :'String'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
return unless attributes.is_a?(Hash)
|
57
|
+
|
58
|
+
# convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
60
|
+
|
61
|
+
if attributes.key?(:'Link')
|
62
|
+
self.link = attributes[:'Link']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.key?(:'NodeId')
|
66
|
+
self.node_id = attributes[:'NodeId']
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Check to see if the all the properties in the model are valid
|
71
|
+
# @return true if the model is valid
|
72
|
+
def valid?
|
73
|
+
return true
|
74
|
+
end
|
75
|
+
|
76
|
+
# Checks equality by comparing each attribute.
|
77
|
+
# @param [Object] Object to be compared
|
78
|
+
def ==(other)
|
79
|
+
return true if self.equal?(other)
|
80
|
+
self.class == other.class &&
|
81
|
+
link == other.link &&
|
82
|
+
node_id == other.node_id
|
83
|
+
end
|
84
|
+
|
85
|
+
# @see the `==` method
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def eql?(other)
|
88
|
+
self == other
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Fixnum] Hash code
|
93
|
+
def hash
|
94
|
+
[link, node_id].hash
|
95
|
+
end
|
96
|
+
|
97
|
+
# Builds the object from hash
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
# @return [Object] Returns the model itself
|
100
|
+
def build_from_hash(attributes)
|
101
|
+
return nil unless attributes.is_a?(Hash)
|
102
|
+
self.class.swagger_types.each_pair do |key, type|
|
103
|
+
if type =~ /\AArray<(.*)>/i
|
104
|
+
# check to ensure the input is an array given that the the attribute
|
105
|
+
# is documented as an array but the input is not
|
106
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
107
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
108
|
+
end
|
109
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
110
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
111
|
+
end
|
112
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
113
|
+
end
|
114
|
+
|
115
|
+
self
|
116
|
+
end
|
117
|
+
|
118
|
+
# Deserializes the data based on type
|
119
|
+
# @param string type Data type
|
120
|
+
# @param string value Value to be deserialized
|
121
|
+
# @return [Object] Deserialized data
|
122
|
+
def _deserialize(type, value)
|
123
|
+
case type.to_sym
|
124
|
+
when :DateTime
|
125
|
+
Time.at(/\d/.match(value)[0].to_f).to_datetime
|
126
|
+
when :Date
|
127
|
+
Time.at(/\d/.match(value)[0].to_f).to_date
|
128
|
+
when :String
|
129
|
+
value.to_s
|
130
|
+
when :Integer
|
131
|
+
value.to_i
|
132
|
+
when :Float
|
133
|
+
value.to_f
|
134
|
+
when :BOOLEAN
|
135
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
136
|
+
true
|
137
|
+
else
|
138
|
+
false
|
139
|
+
end
|
140
|
+
when :Object
|
141
|
+
# generic object (usually a Hash), return directly
|
142
|
+
value
|
143
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
144
|
+
inner_type = Regexp.last_match[:inner_type]
|
145
|
+
value.map { |v| _deserialize(inner_type, v) }
|
146
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
147
|
+
k_type = Regexp.last_match[:k_type]
|
148
|
+
v_type = Regexp.last_match[:v_type]
|
149
|
+
{}.tap do |hash|
|
150
|
+
value.each do |k, v|
|
151
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
else
|
155
|
+
# model
|
156
|
+
if value[:'$type']
|
157
|
+
type = value[:'$type'][0..-4]
|
158
|
+
end
|
159
|
+
|
160
|
+
temp_model = AsposeWordsCloud.const_get(type).new
|
161
|
+
temp_model.build_from_hash(value)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
# Returns the string representation of the object
|
166
|
+
# @return [String] String presentation of the object
|
167
|
+
def to_s
|
168
|
+
to_hash.to_s
|
169
|
+
end
|
170
|
+
|
171
|
+
# to_body is an alias to to_hash (backward compatibility)
|
172
|
+
# @return [Hash] Returns the object in the form of hash
|
173
|
+
def to_body
|
174
|
+
to_hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Returns the object in the form of hash
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_hash
|
180
|
+
hash = {}
|
181
|
+
self.class.attribute_map.each_pair do |attr, param|
|
182
|
+
value = self.send(attr)
|
183
|
+
next if value.nil?
|
184
|
+
hash[param] = _to_hash(value)
|
185
|
+
end
|
186
|
+
hash
|
187
|
+
end
|
188
|
+
|
189
|
+
# Outputs non-array value in the form of hash
|
190
|
+
# For object, use to_hash. Otherwise, just return the value
|
191
|
+
# @param [Object] value Any valid value
|
192
|
+
# @return [Hash] Returns the value in the form of hash
|
193
|
+
def _to_hash(value)
|
194
|
+
if value.is_a?(Array)
|
195
|
+
value.compact.map { |v| _to_hash(v) }
|
196
|
+
elsif value.is_a?(Hash)
|
197
|
+
{}.tap do |hash|
|
198
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
199
|
+
end
|
200
|
+
elsif value.respond_to? :to_hash
|
201
|
+
value.to_hash
|
202
|
+
else
|
203
|
+
value
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
def collectFilesContent(resultFilesContent)
|
208
|
+
end
|
209
|
+
|
210
|
+
def validate()
|
211
|
+
unless self.link.nil?
|
212
|
+
self.link.validate
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
end
|