aspose_words_cloud 20.5.0 → 20.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspose_words_cloud.rb +2 -1
  3. data/lib/aspose_words_cloud/api/words_api.rb +877 -92
  4. data/lib/aspose_words_cloud/models/drawing_object_insert.rb +345 -0
  5. data/lib/aspose_words_cloud/models/{styles.rb → drawing_object_update.rb} +137 -19
  6. data/lib/aspose_words_cloud/models/ooxml_save_options_data.rb +27 -1
  7. data/lib/aspose_words_cloud/models/requests/ApplyStyleToDocumentElementRequest.rb +2 -2
  8. data/lib/aspose_words_cloud/models/requests/DeleteAllParagraphTabStopsWithoutNodePathRequest.rb +69 -0
  9. data/lib/aspose_words_cloud/models/requests/DeleteParagraphListFormatWithoutNodePathRequest.rb +77 -0
  10. data/lib/aspose_words_cloud/models/requests/DeleteParagraphTabStopRequest.rb +5 -5
  11. data/lib/aspose_words_cloud/models/requests/DeleteParagraphTabStopWithoutNodePathRequest.rb +73 -0
  12. data/lib/aspose_words_cloud/models/requests/GetParagraphTabStopsWithoutNodePathRequest.rb +65 -0
  13. data/lib/aspose_words_cloud/models/requests/GetStyleFromDocumentElementRequest.rb +2 -2
  14. data/lib/aspose_words_cloud/models/requests/InsertDrawingObjectRequest.rb +2 -2
  15. data/lib/aspose_words_cloud/models/requests/InsertDrawingObjectWithoutNodePathRequest.rb +2 -2
  16. data/lib/aspose_words_cloud/models/requests/InsertOrUpdateParagraphTabStopRequest.rb +5 -5
  17. data/lib/aspose_words_cloud/models/requests/InsertOrUpdateParagraphTabStopWithoutNodePathRequest.rb +73 -0
  18. data/lib/aspose_words_cloud/models/requests/InsertParagraphWithoutNodePathRequest.rb +81 -0
  19. data/lib/aspose_words_cloud/models/requests/UpdateParagraphFormatWithoutNodePathRequest.rb +81 -0
  20. data/lib/aspose_words_cloud/models/requests/UpdateParagraphListFormatWithoutNodePathRequest.rb +81 -0
  21. data/lib/aspose_words_cloud/models/styles_response.rb +5 -2
  22. data/lib/aspose_words_cloud/version.rb +1 -1
  23. metadata +12 -3
@@ -0,0 +1,345 @@
1
+
2
+ require 'date'
3
+
4
+ module AsposeWordsCloud
5
+ #
6
+ # --------------------------------------------------------------------------------------------------------------------
7
+ # <copyright company="Aspose" file="DrawingObjectInsert.rb">
8
+ # Copyright (c) 2019 Aspose.Words for Cloud
9
+ # </copyright>
10
+ # <summary>
11
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ # of this software and associated documentation files (the "Software"), to deal
13
+ # in the Software without restriction, including without limitation the rights
14
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ # copies of the Software, and to permit persons to whom the Software is
16
+ # furnished to do so, subject to the following conditions:
17
+ #
18
+ # The above copyright notice and this permission notice shall be included in all
19
+ # copies or substantial portions of the Software.
20
+ #
21
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ # SOFTWARE.
28
+ # </summary>
29
+ # --------------------------------------------------------------------------------------------------------------------
30
+ #
31
+
32
+ # Drawing object element for insert.
33
+ class DrawingObjectInsert
34
+ attr_accessor :position
35
+
36
+ # Gets or sets specifies where the distance to the image is measured from.
37
+ attr_accessor :relative_horizontal_position
38
+
39
+ # Gets or sets distance in points from the origin to the left side of the image.
40
+ attr_accessor :left
41
+
42
+ # Gets or sets specifies where the distance to the image measured from.
43
+ attr_accessor :relative_vertical_position
44
+
45
+ # Gets or sets distance in points from the origin to the top side of the image.
46
+ attr_accessor :top
47
+
48
+ # Gets or sets width of the drawing objects in points.
49
+ attr_accessor :width
50
+
51
+ # Gets or sets height of the drawing object in points.
52
+ attr_accessor :height
53
+
54
+ # Gets or sets specifies how to wrap text around the image.
55
+ attr_accessor :wrap_type
56
+
57
+ class EnumAttributeValidator
58
+ attr_reader :datatype
59
+ attr_reader :allowable_values
60
+
61
+ def initialize(datatype, allowable_values)
62
+ @allowable_values = allowable_values.map do |value|
63
+ case datatype.to_s
64
+ when /Integer/i
65
+ value.to_i
66
+ when /Float/i
67
+ value.to_f
68
+ else
69
+ value
70
+ end
71
+ end
72
+ end
73
+
74
+ def valid?(value)
75
+ !value || allowable_values.include?(value)
76
+ end
77
+ end
78
+
79
+ # Attribute mapping from ruby-style variable name to JSON key.
80
+ def self.attribute_map
81
+ {
82
+ :'position' => :'Position',
83
+ :'relative_horizontal_position' => :'RelativeHorizontalPosition',
84
+ :'left' => :'Left',
85
+ :'relative_vertical_position' => :'RelativeVerticalPosition',
86
+ :'top' => :'Top',
87
+ :'width' => :'Width',
88
+ :'height' => :'Height',
89
+ :'wrap_type' => :'WrapType'
90
+ }
91
+ end
92
+
93
+ # Attribute type mapping.
94
+ def self.swagger_types
95
+ {
96
+ :'position' => :'DocumentPosition',
97
+ :'relative_horizontal_position' => :'String',
98
+ :'left' => :'Float',
99
+ :'relative_vertical_position' => :'String',
100
+ :'top' => :'Float',
101
+ :'width' => :'Float',
102
+ :'height' => :'Float',
103
+ :'wrap_type' => :'String'
104
+ }
105
+ end
106
+
107
+ # Initializes the object
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ def initialize(attributes = {})
110
+ return unless attributes.is_a?(Hash)
111
+
112
+ # convert string to symbol for hash key
113
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
114
+
115
+ if attributes.key?(:'Position')
116
+ self.position = attributes[:'Position']
117
+ end
118
+
119
+ if attributes.key?(:'RelativeHorizontalPosition')
120
+ self.relative_horizontal_position = attributes[:'RelativeHorizontalPosition']
121
+ end
122
+
123
+ if attributes.key?(:'Left')
124
+ self.left = attributes[:'Left']
125
+ end
126
+
127
+ if attributes.key?(:'RelativeVerticalPosition')
128
+ self.relative_vertical_position = attributes[:'RelativeVerticalPosition']
129
+ end
130
+
131
+ if attributes.key?(:'Top')
132
+ self.top = attributes[:'Top']
133
+ end
134
+
135
+ if attributes.key?(:'Width')
136
+ self.width = attributes[:'Width']
137
+ end
138
+
139
+ if attributes.key?(:'Height')
140
+ self.height = attributes[:'Height']
141
+ end
142
+
143
+ if attributes.key?(:'WrapType')
144
+ self.wrap_type = attributes[:'WrapType']
145
+ end
146
+
147
+ end
148
+
149
+ # Show invalid properties with the reasons. Usually used together with valid?
150
+ # @return Array for valid properies with the reasons
151
+ def list_invalid_properties
152
+ invalid_properties = []
153
+ return invalid_properties
154
+ end
155
+
156
+ # Check to see if the all the properties in the model are valid
157
+ # @return true if the model is valid
158
+ def valid?
159
+ relative_horizontal_position_validator = EnumAttributeValidator.new('String', ["Margin", "Page", "Column", "Default", "Character", "LeftMargin", "RightMargin", "InsideMargin", "OutsideMargin"])
160
+ return false unless relative_horizontal_position_validator.valid?(@relative_horizontal_position)
161
+ relative_vertical_position_validator = EnumAttributeValidator.new('String', ["Margin", "TableDefault", "Page", "Paragraph", "TextFrameDefault", "Line", "TopMargin", "BottomMargin", "InsideMargin", "OutsideMargin"])
162
+ return false unless relative_vertical_position_validator.valid?(@relative_vertical_position)
163
+ wrap_type_validator = EnumAttributeValidator.new('String', ["Inline", "TopBottom", "Square", "None", "Tight", "Through"])
164
+ return false unless wrap_type_validator.valid?(@wrap_type)
165
+ return true
166
+ end
167
+
168
+ # Custom attribute writer method checking allowed values (enum).
169
+ # @param [Object] relative_horizontal_position Object to be assigned
170
+ def relative_horizontal_position=(relative_horizontal_position)
171
+ validator = EnumAttributeValidator.new('String', ["Margin", "Page", "Column", "Default", "Character", "LeftMargin", "RightMargin", "InsideMargin", "OutsideMargin"])
172
+ if relative_horizontal_position.to_i == 0
173
+ unless validator.valid?(relative_horizontal_position)
174
+ raise ArgumentError, "invalid value for 'relative_horizontal_position', must be one of #{validator.allowable_values}."
175
+ end
176
+ @relative_horizontal_position = relative_horizontal_position
177
+ else
178
+ @relative_horizontal_position = validator.allowable_values[relative_horizontal_position.to_i]
179
+ end
180
+ end
181
+
182
+ # Custom attribute writer method checking allowed values (enum).
183
+ # @param [Object] relative_vertical_position Object to be assigned
184
+ def relative_vertical_position=(relative_vertical_position)
185
+ validator = EnumAttributeValidator.new('String', ["Margin", "TableDefault", "Page", "Paragraph", "TextFrameDefault", "Line", "TopMargin", "BottomMargin", "InsideMargin", "OutsideMargin"])
186
+ if relative_vertical_position.to_i == 0
187
+ unless validator.valid?(relative_vertical_position)
188
+ raise ArgumentError, "invalid value for 'relative_vertical_position', must be one of #{validator.allowable_values}."
189
+ end
190
+ @relative_vertical_position = relative_vertical_position
191
+ else
192
+ @relative_vertical_position = validator.allowable_values[relative_vertical_position.to_i]
193
+ end
194
+ end
195
+
196
+ # Custom attribute writer method checking allowed values (enum).
197
+ # @param [Object] wrap_type Object to be assigned
198
+ def wrap_type=(wrap_type)
199
+ validator = EnumAttributeValidator.new('String', ["Inline", "TopBottom", "Square", "None", "Tight", "Through"])
200
+ if wrap_type.to_i == 0
201
+ unless validator.valid?(wrap_type)
202
+ raise ArgumentError, "invalid value for 'wrap_type', must be one of #{validator.allowable_values}."
203
+ end
204
+ @wrap_type = wrap_type
205
+ else
206
+ @wrap_type = validator.allowable_values[wrap_type.to_i]
207
+ end
208
+ end
209
+
210
+ # Checks equality by comparing each attribute.
211
+ # @param [Object] Object to be compared
212
+ def ==(other)
213
+ return true if self.equal?(other)
214
+ self.class == other.class &&
215
+ position == other.position &&
216
+ relative_horizontal_position == other.relative_horizontal_position &&
217
+ left == other.left &&
218
+ relative_vertical_position == other.relative_vertical_position &&
219
+ top == other.top &&
220
+ width == other.width &&
221
+ height == other.height &&
222
+ wrap_type == other.wrap_type
223
+ end
224
+
225
+ # @see the `==` method
226
+ # @param [Object] Object to be compared
227
+ def eql?(other)
228
+ self == other
229
+ end
230
+
231
+ # Calculates hash code according to all attributes.
232
+ # @return [Fixnum] Hash code
233
+ def hash
234
+ [position, relative_horizontal_position, left, relative_vertical_position, top, width, height, wrap_type].hash
235
+ end
236
+
237
+ # Builds the object from hash
238
+ # @param [Hash] attributes Model attributes in the form of hash
239
+ # @return [Object] Returns the model itself
240
+ def build_from_hash(attributes)
241
+ return nil unless attributes.is_a?(Hash)
242
+ self.class.swagger_types.each_pair do |key, type|
243
+ if type =~ /\AArray<(.*)>/i
244
+ # check to ensure the input is an array given that the the attribute
245
+ # is documented as an array but the input is not
246
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
247
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
248
+ end
249
+ elsif !attributes[self.class.attribute_map[key]].nil?
250
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
251
+ end
252
+ # or else data not found in attributes(hash), not an issue as the data can be optional
253
+ end
254
+
255
+ self
256
+ end
257
+
258
+ # Deserializes the data based on type
259
+ # @param string type Data type
260
+ # @param string value Value to be deserialized
261
+ # @return [Object] Deserialized data
262
+ def _deserialize(type, value)
263
+ case type.to_sym
264
+ when :DateTime
265
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
266
+ when :Date
267
+ Time.at(/\d/.match(value)[0].to_f).to_date
268
+ when :String
269
+ value.to_s
270
+ when :Integer
271
+ value.to_i
272
+ when :Float
273
+ value.to_f
274
+ when :BOOLEAN
275
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
276
+ true
277
+ else
278
+ false
279
+ end
280
+ when :Object
281
+ # generic object (usually a Hash), return directly
282
+ value
283
+ when /\AArray<(?<inner_type>.+)>\z/
284
+ inner_type = Regexp.last_match[:inner_type]
285
+ value.map { |v| _deserialize(inner_type, v) }
286
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
287
+ k_type = Regexp.last_match[:k_type]
288
+ v_type = Regexp.last_match[:v_type]
289
+ {}.tap do |hash|
290
+ value.each do |k, v|
291
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
292
+ end
293
+ end
294
+ else
295
+ # model
296
+ temp_model = AsposeWordsCloud.const_get(type).new
297
+ temp_model.build_from_hash(value)
298
+ end
299
+ end
300
+
301
+ # Returns the string representation of the object
302
+ # @return [String] String presentation of the object
303
+ def to_s
304
+ to_hash.to_s
305
+ end
306
+
307
+ # to_body is an alias to to_hash (backward compatibility)
308
+ # @return [Hash] Returns the object in the form of hash
309
+ def to_body
310
+ to_hash
311
+ end
312
+
313
+ # Returns the object in the form of hash
314
+ # @return [Hash] Returns the object in the form of hash
315
+ def to_hash
316
+ hash = {}
317
+ self.class.attribute_map.each_pair do |attr, param|
318
+ value = self.send(attr)
319
+ next if value.nil?
320
+ hash[param] = _to_hash(value)
321
+ end
322
+ hash
323
+ end
324
+
325
+ # Outputs non-array value in the form of hash
326
+ # For object, use to_hash. Otherwise, just return the value
327
+ # @param [Object] value Any valid value
328
+ # @return [Hash] Returns the value in the form of hash
329
+ def _to_hash(value)
330
+ if value.is_a?(Array)
331
+ value.compact.map { |v| _to_hash(v) }
332
+ elsif value.is_a?(Hash)
333
+ {}.tap do |hash|
334
+ value.each { |k, v| hash[k] = _to_hash(v) }
335
+ end
336
+ elsif value.respond_to? :to_hash
337
+ value.to_hash
338
+ else
339
+ value
340
+ end
341
+ end
342
+
343
+ end
344
+
345
+ end
@@ -4,7 +4,7 @@ require 'date'
4
4
  module AsposeWordsCloud
5
5
  #
6
6
  # --------------------------------------------------------------------------------------------------------------------
7
- # <copyright company="Aspose" file="Styles.rb">
7
+ # <copyright company="Aspose" file="DrawingObjectUpdate.rb">
8
8
  # Copyright (c) 2019 Aspose.Words for Cloud
9
9
  # </copyright>
10
10
  # <summary>
@@ -29,27 +29,74 @@ module AsposeWordsCloud
29
29
  # --------------------------------------------------------------------------------------------------------------------
30
30
  #
31
31
 
32
- # Represents an array of styles list.
33
- class Styles
34
- attr_accessor :link
32
+ # Drawing object element for update.
33
+ class DrawingObjectUpdate
34
+ # Gets or sets specifies where the distance to the image is measured from.
35
+ attr_accessor :relative_horizontal_position
35
36
 
36
- # Gets or sets array of document styles.
37
- attr_accessor :style_list
37
+ # Gets or sets distance in points from the origin to the left side of the image.
38
+ attr_accessor :left
38
39
 
40
+ # Gets or sets specifies where the distance to the image measured from.
41
+ attr_accessor :relative_vertical_position
42
+
43
+ # Gets or sets distance in points from the origin to the top side of the image.
44
+ attr_accessor :top
45
+
46
+ # Gets or sets width of the drawing objects in points.
47
+ attr_accessor :width
48
+
49
+ # Gets or sets height of the drawing object in points.
50
+ attr_accessor :height
51
+
52
+ # Gets or sets specifies how to wrap text around the image.
53
+ attr_accessor :wrap_type
54
+
55
+ class EnumAttributeValidator
56
+ attr_reader :datatype
57
+ attr_reader :allowable_values
58
+
59
+ def initialize(datatype, allowable_values)
60
+ @allowable_values = allowable_values.map do |value|
61
+ case datatype.to_s
62
+ when /Integer/i
63
+ value.to_i
64
+ when /Float/i
65
+ value.to_f
66
+ else
67
+ value
68
+ end
69
+ end
70
+ end
71
+
72
+ def valid?(value)
73
+ !value || allowable_values.include?(value)
74
+ end
75
+ end
39
76
 
40
77
  # Attribute mapping from ruby-style variable name to JSON key.
41
78
  def self.attribute_map
42
79
  {
43
- :'link' => :'link',
44
- :'style_list' => :'StyleList'
80
+ :'relative_horizontal_position' => :'RelativeHorizontalPosition',
81
+ :'left' => :'Left',
82
+ :'relative_vertical_position' => :'RelativeVerticalPosition',
83
+ :'top' => :'Top',
84
+ :'width' => :'Width',
85
+ :'height' => :'Height',
86
+ :'wrap_type' => :'WrapType'
45
87
  }
46
88
  end
47
89
 
48
90
  # Attribute type mapping.
49
91
  def self.swagger_types
50
92
  {
51
- :'link' => :'WordsApiLink',
52
- :'style_list' => :'Array<Style>'
93
+ :'relative_horizontal_position' => :'String',
94
+ :'left' => :'Float',
95
+ :'relative_vertical_position' => :'String',
96
+ :'top' => :'Float',
97
+ :'width' => :'Float',
98
+ :'height' => :'Float',
99
+ :'wrap_type' => :'String'
53
100
  }
54
101
  end
55
102
 
@@ -61,14 +108,32 @@ module AsposeWordsCloud
61
108
  # convert string to symbol for hash key
62
109
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
63
110
 
64
- if attributes.key?(:'link')
65
- self.link = attributes[:'link']
111
+ if attributes.key?(:'RelativeHorizontalPosition')
112
+ self.relative_horizontal_position = attributes[:'RelativeHorizontalPosition']
66
113
  end
67
114
 
68
- if attributes.key?(:'StyleList')
69
- if (value = attributes[:'StyleList']).is_a?(Array)
70
- self.style_list = value
71
- end
115
+ if attributes.key?(:'Left')
116
+ self.left = attributes[:'Left']
117
+ end
118
+
119
+ if attributes.key?(:'RelativeVerticalPosition')
120
+ self.relative_vertical_position = attributes[:'RelativeVerticalPosition']
121
+ end
122
+
123
+ if attributes.key?(:'Top')
124
+ self.top = attributes[:'Top']
125
+ end
126
+
127
+ if attributes.key?(:'Width')
128
+ self.width = attributes[:'Width']
129
+ end
130
+
131
+ if attributes.key?(:'Height')
132
+ self.height = attributes[:'Height']
133
+ end
134
+
135
+ if attributes.key?(:'WrapType')
136
+ self.wrap_type = attributes[:'WrapType']
72
137
  end
73
138
 
74
139
  end
@@ -83,16 +148,69 @@ module AsposeWordsCloud
83
148
  # Check to see if the all the properties in the model are valid
84
149
  # @return true if the model is valid
85
150
  def valid?
151
+ relative_horizontal_position_validator = EnumAttributeValidator.new('String', ["Margin", "Page", "Column", "Default", "Character", "LeftMargin", "RightMargin", "InsideMargin", "OutsideMargin"])
152
+ return false unless relative_horizontal_position_validator.valid?(@relative_horizontal_position)
153
+ relative_vertical_position_validator = EnumAttributeValidator.new('String', ["Margin", "TableDefault", "Page", "Paragraph", "TextFrameDefault", "Line", "TopMargin", "BottomMargin", "InsideMargin", "OutsideMargin"])
154
+ return false unless relative_vertical_position_validator.valid?(@relative_vertical_position)
155
+ wrap_type_validator = EnumAttributeValidator.new('String', ["Inline", "TopBottom", "Square", "None", "Tight", "Through"])
156
+ return false unless wrap_type_validator.valid?(@wrap_type)
86
157
  return true
87
158
  end
88
159
 
160
+ # Custom attribute writer method checking allowed values (enum).
161
+ # @param [Object] relative_horizontal_position Object to be assigned
162
+ def relative_horizontal_position=(relative_horizontal_position)
163
+ validator = EnumAttributeValidator.new('String', ["Margin", "Page", "Column", "Default", "Character", "LeftMargin", "RightMargin", "InsideMargin", "OutsideMargin"])
164
+ if relative_horizontal_position.to_i == 0
165
+ unless validator.valid?(relative_horizontal_position)
166
+ raise ArgumentError, "invalid value for 'relative_horizontal_position', must be one of #{validator.allowable_values}."
167
+ end
168
+ @relative_horizontal_position = relative_horizontal_position
169
+ else
170
+ @relative_horizontal_position = validator.allowable_values[relative_horizontal_position.to_i]
171
+ end
172
+ end
173
+
174
+ # Custom attribute writer method checking allowed values (enum).
175
+ # @param [Object] relative_vertical_position Object to be assigned
176
+ def relative_vertical_position=(relative_vertical_position)
177
+ validator = EnumAttributeValidator.new('String', ["Margin", "TableDefault", "Page", "Paragraph", "TextFrameDefault", "Line", "TopMargin", "BottomMargin", "InsideMargin", "OutsideMargin"])
178
+ if relative_vertical_position.to_i == 0
179
+ unless validator.valid?(relative_vertical_position)
180
+ raise ArgumentError, "invalid value for 'relative_vertical_position', must be one of #{validator.allowable_values}."
181
+ end
182
+ @relative_vertical_position = relative_vertical_position
183
+ else
184
+ @relative_vertical_position = validator.allowable_values[relative_vertical_position.to_i]
185
+ end
186
+ end
187
+
188
+ # Custom attribute writer method checking allowed values (enum).
189
+ # @param [Object] wrap_type Object to be assigned
190
+ def wrap_type=(wrap_type)
191
+ validator = EnumAttributeValidator.new('String', ["Inline", "TopBottom", "Square", "None", "Tight", "Through"])
192
+ if wrap_type.to_i == 0
193
+ unless validator.valid?(wrap_type)
194
+ raise ArgumentError, "invalid value for 'wrap_type', must be one of #{validator.allowable_values}."
195
+ end
196
+ @wrap_type = wrap_type
197
+ else
198
+ @wrap_type = validator.allowable_values[wrap_type.to_i]
199
+ end
200
+ end
201
+
89
202
  # Checks equality by comparing each attribute.
90
203
  # @param [Object] Object to be compared
91
204
  def ==(other)
92
205
  return true if self.equal?(other)
93
206
  self.class == other.class &&
94
- link == other.link &&
95
- style_list == other.style_list
207
+ relative_horizontal_position == other.relative_horizontal_position &&
208
+ left == other.left &&
209
+ relative_vertical_position == other.relative_vertical_position &&
210
+ top == other.top &&
211
+ width == other.width &&
212
+ height == other.height &&
213
+ wrap_type == other.wrap_type
96
214
  end
97
215
 
98
216
  # @see the `==` method
@@ -104,7 +222,7 @@ module AsposeWordsCloud
104
222
  # Calculates hash code according to all attributes.
105
223
  # @return [Fixnum] Hash code
106
224
  def hash
107
- [link, style_list].hash
225
+ [relative_horizontal_position, left, relative_vertical_position, top, width, height, wrap_type].hash
108
226
  end
109
227
 
110
228
  # Builds the object from hash