aspose_slides_cloud 21.12.1 → 22.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -40
  3. data/TestData/test-unprotected.pptx +0 -0
  4. data/TestData/test.pptx +0 -0
  5. data/aspose_slides_cloud.gemspec +1 -1
  6. data/lib/aspose_slides_cloud/api/slides_api.rb +442 -30
  7. data/lib/aspose_slides_cloud/api_client.rb +1 -1
  8. data/lib/aspose_slides_cloud/configuration.rb +1 -1
  9. data/lib/aspose_slides_cloud/models/accent_element.rb +239 -0
  10. data/lib/aspose_slides_cloud/models/arc_to_path_segment.rb +279 -0
  11. data/lib/aspose_slides_cloud/models/array_element.rb +305 -0
  12. data/lib/aspose_slides_cloud/models/audio_frame.rb +26 -4
  13. data/lib/aspose_slides_cloud/models/bar_element.rb +251 -0
  14. data/lib/aspose_slides_cloud/models/block_element.rb +231 -0
  15. data/lib/aspose_slides_cloud/models/border_box_element.rb +309 -0
  16. data/lib/aspose_slides_cloud/models/box_element.rb +279 -0
  17. data/lib/aspose_slides_cloud/models/chart.rb +3 -1
  18. data/lib/aspose_slides_cloud/models/close_path_segment.rb +219 -0
  19. data/lib/aspose_slides_cloud/models/connector.rb +3 -1
  20. data/lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb +309 -0
  21. data/lib/aspose_slides_cloud/models/delimiter_element.rb +293 -0
  22. data/lib/aspose_slides_cloud/models/export_format.rb +1 -0
  23. data/lib/aspose_slides_cloud/models/fraction_element.rb +261 -0
  24. data/lib/aspose_slides_cloud/models/function_element.rb +239 -0
  25. data/lib/aspose_slides_cloud/models/geometry_path.rb +263 -0
  26. data/lib/aspose_slides_cloud/models/geometry_paths.rb +209 -0
  27. data/lib/aspose_slides_cloud/models/geometry_shape.rb +3 -1
  28. data/lib/aspose_slides_cloud/models/gif_export_options.rb +230 -0
  29. data/lib/aspose_slides_cloud/models/graphical_object.rb +3 -1
  30. data/lib/aspose_slides_cloud/models/group_shape.rb +3 -1
  31. data/lib/aspose_slides_cloud/models/grouping_character_element.rb +283 -0
  32. data/lib/aspose_slides_cloud/models/hyperlink.rb +348 -0
  33. data/lib/aspose_slides_cloud/models/left_sub_superscript_element.rb +249 -0
  34. data/lib/aspose_slides_cloud/models/limit_element.rb +249 -0
  35. data/lib/aspose_slides_cloud/models/line_to_path_segment.rb +249 -0
  36. data/lib/aspose_slides_cloud/models/math_element.rb +240 -0
  37. data/lib/aspose_slides_cloud/models/math_paragraph.rb +253 -0
  38. data/lib/aspose_slides_cloud/models/matrix_element.rb +337 -0
  39. data/lib/aspose_slides_cloud/models/move_to_path_segment.rb +249 -0
  40. data/lib/aspose_slides_cloud/models/nary_operator_element.rb +311 -0
  41. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +3 -1
  42. data/lib/aspose_slides_cloud/models/path_segment.rb +240 -0
  43. data/lib/aspose_slides_cloud/models/picture_frame.rb +3 -1
  44. data/lib/aspose_slides_cloud/models/portion.rb +32 -2
  45. data/lib/aspose_slides_cloud/models/quadratic_bezier_to_path_segment.rb +279 -0
  46. data/lib/aspose_slides_cloud/models/radical_element.rb +249 -0
  47. data/lib/aspose_slides_cloud/models/right_sub_superscript_element.rb +259 -0
  48. data/lib/aspose_slides_cloud/models/save.rb +2 -2
  49. data/lib/aspose_slides_cloud/models/save_slide.rb +2 -2
  50. data/lib/aspose_slides_cloud/models/shape.rb +3 -1
  51. data/lib/aspose_slides_cloud/models/shape_base.rb +21 -1
  52. data/lib/aspose_slides_cloud/models/slide_export_format.rb +1 -0
  53. data/lib/aspose_slides_cloud/models/smart_art.rb +3 -1
  54. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +3 -1
  55. data/lib/aspose_slides_cloud/models/subscript_element.rb +239 -0
  56. data/lib/aspose_slides_cloud/models/superscript_element.rb +239 -0
  57. data/lib/aspose_slides_cloud/models/table.rb +3 -1
  58. data/lib/aspose_slides_cloud/models/text_element.rb +229 -0
  59. data/lib/aspose_slides_cloud/models/video_frame.rb +5 -3
  60. data/lib/aspose_slides_cloud/models/xaml_export_options.rb +210 -0
  61. data/lib/aspose_slides_cloud/type_registry.rb +72 -0
  62. data/lib/aspose_slides_cloud/version.rb +1 -1
  63. data/lib/aspose_slides_cloud.rb +33 -0
  64. data/spec/api/slides_api_spec.rb +1203 -4
  65. data/spec/spec_utils.rb +7 -1
  66. data/testRules.json +9 -0
  67. metadata +39 -6
@@ -0,0 +1,259 @@
1
+ =begin
2
+ Copyright (c) 2019 Aspose Pty Ltd
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
21
+ =end
22
+
23
+ require 'date'
24
+
25
+ module AsposeSlidesCloud
26
+ # Specifies the Sub-Superscript object
27
+ class RightSubSuperscriptElement < MathElement
28
+ # Base argument
29
+ attr_accessor :base
30
+
31
+ # Subscript
32
+ attr_accessor :subscript
33
+
34
+ # Superscript
35
+ attr_accessor :superscript
36
+
37
+ # Alignment of subscript/superscript.
38
+ attr_accessor :align_scripts
39
+
40
+ class EnumAttributeValidator
41
+ attr_reader :datatype
42
+ attr_reader :allowable_values
43
+
44
+ def initialize(datatype, allowable_values)
45
+ @allowable_values = allowable_values.map do |value|
46
+ case datatype.to_s
47
+ when /Integer/i
48
+ value.to_i
49
+ when /Float/i
50
+ value.to_f
51
+ else
52
+ value
53
+ end
54
+ end
55
+ end
56
+
57
+ def valid?(value)
58
+ !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
59
+ end
60
+ end
61
+
62
+ # Attribute mapping from ruby-style variable name to JSON key.
63
+ def self.attribute_map
64
+ super.merge({
65
+ :'base' => :'Base',
66
+ :'subscript' => :'Subscript',
67
+ :'superscript' => :'Superscript',
68
+ :'align_scripts' => :'AlignScripts',
69
+ })
70
+ end
71
+
72
+ # Attribute type mapping.
73
+ def self.swagger_types
74
+ super.merge({
75
+ :'base' => :'MathElement',
76
+ :'subscript' => :'MathElement',
77
+ :'superscript' => :'MathElement',
78
+ :'align_scripts' => :'BOOLEAN',
79
+ })
80
+ end
81
+
82
+ # Initializes the object
83
+ # @param [Hash] attributes Model attributes in the form of hash
84
+ def initialize(attributes = {})
85
+ super
86
+
87
+ if attributes.has_key?(:'Base')
88
+ self.base = attributes[:'Base']
89
+ end
90
+
91
+ if attributes.has_key?(:'Subscript')
92
+ self.subscript = attributes[:'Subscript']
93
+ end
94
+
95
+ if attributes.has_key?(:'Superscript')
96
+ self.superscript = attributes[:'Superscript']
97
+ end
98
+
99
+ if attributes.has_key?(:'AlignScripts')
100
+ self.align_scripts = attributes[:'AlignScripts']
101
+ end
102
+ self.type = "RightSubSuperscriptElement"
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ invalid_properties = super
109
+ invalid_properties
110
+ end
111
+
112
+ # Check to see if the all the properties in the model are valid
113
+ # @return true if the model is valid
114
+ def valid?
115
+ return false if !super
116
+ true
117
+ end
118
+
119
+ # Checks equality by comparing each attribute.
120
+ # @param [Object] Object to be compared
121
+ def ==(o)
122
+ return true if self.equal?(o)
123
+ self.class == o.class &&
124
+ type == o.type &&
125
+ base == o.base &&
126
+ subscript == o.subscript &&
127
+ superscript == o.superscript &&
128
+ align_scripts == o.align_scripts
129
+ end
130
+
131
+ # @see the `==` method
132
+ # @param [Object] Object to be compared
133
+ def eql?(o)
134
+ self == o
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Fixnum] Hash code
139
+ def hash
140
+ [type, base, subscript, superscript, align_scripts].hash
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def build_from_hash(attributes)
147
+ return nil unless attributes.is_a?(Hash)
148
+ self.class.swagger_types.each_pair do |key, type|
149
+ mapKey = self.class.attribute_map[key]
150
+ if !mapKey.nil?
151
+ val = attributes[mapKey]
152
+ if val.nil?
153
+ mapKeyString = mapKey.to_s
154
+ mapKeyString[0] = mapKeyString[0].downcase
155
+ mapKey = mapKeyString.to_sym
156
+ val = attributes[mapKey]
157
+ end
158
+ if !val.nil?
159
+ if type =~ /\AArray<(.*)>/i
160
+ # check to ensure the input is an array given that the the attribute
161
+ # is documented as an array but the input is not
162
+ if val.is_a?(Array)
163
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
164
+ end
165
+ else
166
+ self.send("#{key}=", _deserialize(type, val))
167
+ end
168
+ end
169
+ end
170
+ end
171
+
172
+ self
173
+ end
174
+
175
+ # Deserializes the data based on type
176
+ # @param string type Data type
177
+ # @param string value Value to be deserialized
178
+ # @return [Object] Deserialized data
179
+ def _deserialize(type, value)
180
+ case type.to_sym
181
+ when :DateTime
182
+ DateTime.parse(value)
183
+ when :Date
184
+ Date.parse(value)
185
+ when :String
186
+ value.to_s
187
+ when :Integer
188
+ value.to_i
189
+ when :Float
190
+ value.to_f
191
+ when :BOOLEAN
192
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
193
+ true
194
+ else
195
+ false
196
+ end
197
+ when :Object
198
+ # generic object (usually a Hash), return directly
199
+ value
200
+ when /\AArray<(?<inner_type>.+)>\z/
201
+ inner_type = Regexp.last_match[:inner_type]
202
+ value.map { |v| _deserialize(inner_type, v) }
203
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
204
+ k_type = Regexp.last_match[:k_type]
205
+ v_type = Regexp.last_match[:v_type]
206
+ {}.tap do |hash|
207
+ value.each do |k, v|
208
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
209
+ end
210
+ end
211
+ else # model
212
+ temp_model = AsposeSlidesCloud.const_get(type).new
213
+ temp_model.build_from_hash(value)
214
+ end
215
+ end
216
+
217
+ # Returns the string representation of the object
218
+ # @return [String] String presentation of the object
219
+ def to_s
220
+ to_hash.to_s
221
+ end
222
+
223
+ # to_body is an alias to to_hash (backward compatibility)
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_body
226
+ to_hash
227
+ end
228
+
229
+ # Returns the object in the form of hash
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_hash
232
+ hash = {}
233
+ self.class.attribute_map.each_pair do |attr, param|
234
+ value = self.send(attr)
235
+ next if value.nil?
236
+ hash[param] = _to_hash(value)
237
+ end
238
+ hash
239
+ end
240
+
241
+ # Outputs non-array value in the form of hash
242
+ # For object, use to_hash. Otherwise, just return the value
243
+ # @param [Object] value Any valid value
244
+ # @return [Hash] Returns the value in the form of hash
245
+ def _to_hash(value)
246
+ if value.is_a?(Array)
247
+ value.compact.map { |v| _to_hash(v) }
248
+ elsif value.is_a?(Hash)
249
+ {}.tap do |hash|
250
+ value.each { |k, v| hash[k] = _to_hash(v) }
251
+ end
252
+ elsif value.respond_to? :to_hash
253
+ value.to_hash
254
+ else
255
+ value
256
+ end
257
+ end
258
+ end
259
+ end
@@ -109,7 +109,7 @@ module AsposeSlidesCloud
109
109
  def valid?
110
110
  return false if !super
111
111
  return false if @format.nil?
112
- format_validator = EnumAttributeValidator.new('String', ['Pdf', 'Xps', 'Tiff', 'Pptx', 'Odp', 'Otp', 'Ppt', 'Pps', 'Ppsx', 'Pptm', 'Ppsm', 'Pot', 'Potx', 'Potm', 'Html', 'Html5', 'Swf', 'Svg', 'Jpeg', 'Png', 'Gif', 'Bmp', 'Fodp'])
112
+ format_validator = EnumAttributeValidator.new('String', ['Pdf', 'Xps', 'Tiff', 'Pptx', 'Odp', 'Otp', 'Ppt', 'Pps', 'Ppsx', 'Pptm', 'Ppsm', 'Pot', 'Potx', 'Potm', 'Html', 'Html5', 'Swf', 'Svg', 'Jpeg', 'Png', 'Gif', 'Bmp', 'Fodp', 'Xaml'])
113
113
  return false unless format_validator.valid?(@format)
114
114
  true
115
115
  end
@@ -117,7 +117,7 @@ module AsposeSlidesCloud
117
117
  # Custom attribute writer method checking allowed values (enum).
118
118
  # @param [Object] format Object to be assigned
119
119
  def format=(format)
120
- validator = EnumAttributeValidator.new('String', ['Pdf', 'Xps', 'Tiff', 'Pptx', 'Odp', 'Otp', 'Ppt', 'Pps', 'Ppsx', 'Pptm', 'Ppsm', 'Pot', 'Potx', 'Potm', 'Html', 'Html5', 'Swf', 'Svg', 'Jpeg', 'Png', 'Gif', 'Bmp', 'Fodp'])
120
+ validator = EnumAttributeValidator.new('String', ['Pdf', 'Xps', 'Tiff', 'Pptx', 'Odp', 'Otp', 'Ppt', 'Pps', 'Ppsx', 'Pptm', 'Ppsm', 'Pot', 'Potx', 'Potm', 'Html', 'Html5', 'Swf', 'Svg', 'Jpeg', 'Png', 'Gif', 'Bmp', 'Fodp', 'Xaml'])
121
121
  unless validator.valid?(format)
122
122
  fail ArgumentError, 'invalid value for "format", must be one of #{validator.allowable_values}.'
123
123
  end
@@ -140,7 +140,7 @@ module AsposeSlidesCloud
140
140
  def valid?
141
141
  return false if !super
142
142
  return false if @format.nil?
143
- format_validator = EnumAttributeValidator.new('String', ['Jpeg', 'Png', 'Gif', 'Bmp', 'Tiff', 'Html', 'Pdf', 'Xps', 'Pptx', 'Odp', 'Otp', 'Ppt', 'Pps', 'Ppsx', 'Pptm', 'Ppsm', 'Potx', 'Pot', 'Potm', 'Svg', 'Fodp'])
143
+ format_validator = EnumAttributeValidator.new('String', ['Jpeg', 'Png', 'Gif', 'Bmp', 'Tiff', 'Html', 'Pdf', 'Xps', 'Pptx', 'Odp', 'Otp', 'Ppt', 'Pps', 'Ppsx', 'Pptm', 'Ppsm', 'Potx', 'Pot', 'Potm', 'Svg', 'Fodp', 'Xaml'])
144
144
  return false unless format_validator.valid?(@format)
145
145
  return false if @position.nil?
146
146
  true
@@ -149,7 +149,7 @@ module AsposeSlidesCloud
149
149
  # Custom attribute writer method checking allowed values (enum).
150
150
  # @param [Object] format Object to be assigned
151
151
  def format=(format)
152
- validator = EnumAttributeValidator.new('String', ['Jpeg', 'Png', 'Gif', 'Bmp', 'Tiff', 'Html', 'Pdf', 'Xps', 'Pptx', 'Odp', 'Otp', 'Ppt', 'Pps', 'Ppsx', 'Pptm', 'Ppsm', 'Potx', 'Pot', 'Potm', 'Svg', 'Fodp'])
152
+ validator = EnumAttributeValidator.new('String', ['Jpeg', 'Png', 'Gif', 'Bmp', 'Tiff', 'Html', 'Pdf', 'Xps', 'Pptx', 'Odp', 'Otp', 'Ppt', 'Pps', 'Ppsx', 'Pptm', 'Ppsm', 'Potx', 'Pot', 'Potm', 'Svg', 'Fodp', 'Xaml'])
153
153
  unless validator.valid?(format)
154
154
  fail ArgumentError, 'invalid value for "format", must be one of #{validator.allowable_values}.'
155
155
  end
@@ -119,6 +119,8 @@ module AsposeSlidesCloud
119
119
  effect_format == o.effect_format &&
120
120
  three_d_format == o.three_d_format &&
121
121
  line_format == o.line_format &&
122
+ hyperlink_click == o.hyperlink_click &&
123
+ hyperlink_mouse_over == o.hyperlink_mouse_over &&
122
124
  type == o.type &&
123
125
  shape_type == o.shape_type &&
124
126
  text == o.text &&
@@ -134,7 +136,7 @@ module AsposeSlidesCloud
134
136
  # Calculates hash code according to all attributes.
135
137
  # @return [Fixnum] Hash code
136
138
  def hash
137
- [self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, shapes, fill_format, effect_format, three_d_format, line_format, type, shape_type, text, paragraphs].hash
139
+ [self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, shapes, fill_format, effect_format, three_d_format, line_format, hyperlink_click, hyperlink_mouse_over, type, shape_type, text, paragraphs].hash
138
140
  end
139
141
 
140
142
  # Builds the object from hash
@@ -67,6 +67,12 @@ module AsposeSlidesCloud
67
67
  # Gets or sets the line format.
68
68
  attr_accessor :line_format
69
69
 
70
+ # Hyperlink defined for mouse click.
71
+ attr_accessor :hyperlink_click
72
+
73
+ # Hyperlink defined for mouse over.
74
+ attr_accessor :hyperlink_mouse_over
75
+
70
76
  attr_accessor :type
71
77
 
72
78
  class EnumAttributeValidator
@@ -108,6 +114,8 @@ module AsposeSlidesCloud
108
114
  :'effect_format' => :'EffectFormat',
109
115
  :'three_d_format' => :'ThreeDFormat',
110
116
  :'line_format' => :'LineFormat',
117
+ :'hyperlink_click' => :'HyperlinkClick',
118
+ :'hyperlink_mouse_over' => :'HyperlinkMouseOver',
111
119
  :'type' => :'Type',
112
120
  })
113
121
  end
@@ -129,6 +137,8 @@ module AsposeSlidesCloud
129
137
  :'effect_format' => :'EffectFormat',
130
138
  :'three_d_format' => :'ThreeDFormat',
131
139
  :'line_format' => :'LineFormat',
140
+ :'hyperlink_click' => :'Hyperlink',
141
+ :'hyperlink_mouse_over' => :'Hyperlink',
132
142
  :'type' => :'String',
133
143
  })
134
144
  end
@@ -194,6 +204,14 @@ module AsposeSlidesCloud
194
204
  self.line_format = attributes[:'LineFormat']
195
205
  end
196
206
 
207
+ if attributes.has_key?(:'HyperlinkClick')
208
+ self.hyperlink_click = attributes[:'HyperlinkClick']
209
+ end
210
+
211
+ if attributes.has_key?(:'HyperlinkMouseOver')
212
+ self.hyperlink_mouse_over = attributes[:'HyperlinkMouseOver']
213
+ end
214
+
197
215
  if attributes.has_key?(:'Type')
198
216
  self.type = attributes[:'Type']
199
217
  end
@@ -251,6 +269,8 @@ module AsposeSlidesCloud
251
269
  effect_format == o.effect_format &&
252
270
  three_d_format == o.three_d_format &&
253
271
  line_format == o.line_format &&
272
+ hyperlink_click == o.hyperlink_click &&
273
+ hyperlink_mouse_over == o.hyperlink_mouse_over &&
254
274
  type == o.type
255
275
  end
256
276
 
@@ -263,7 +283,7 @@ module AsposeSlidesCloud
263
283
  # Calculates hash code according to all attributes.
264
284
  # @return [Fixnum] Hash code
265
285
  def hash
266
- [self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, shapes, fill_format, effect_format, three_d_format, line_format, type].hash
286
+ [self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, shapes, fill_format, effect_format, three_d_format, line_format, hyperlink_click, hyperlink_mouse_over, type].hash
267
287
  end
268
288
 
269
289
  # Builds the object from hash
@@ -46,6 +46,7 @@ module AsposeSlidesCloud
46
46
  POTM = "Potm".freeze
47
47
  SVG = "Svg".freeze
48
48
  FODP = "Fodp".freeze
49
+ XAML = "Xaml".freeze
49
50
 
50
51
  # Builds the enum from string
51
52
  # @param [String] The enum value in the form of the string
@@ -204,6 +204,8 @@ module AsposeSlidesCloud
204
204
  effect_format == o.effect_format &&
205
205
  three_d_format == o.three_d_format &&
206
206
  line_format == o.line_format &&
207
+ hyperlink_click == o.hyperlink_click &&
208
+ hyperlink_mouse_over == o.hyperlink_mouse_over &&
207
209
  type == o.type &&
208
210
  layout == o.layout &&
209
211
  quick_style == o.quick_style &&
@@ -221,7 +223,7 @@ module AsposeSlidesCloud
221
223
  # Calculates hash code according to all attributes.
222
224
  # @return [Fixnum] Hash code
223
225
  def hash
224
- [self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, shapes, fill_format, effect_format, three_d_format, line_format, type, layout, quick_style, color_style, nodes, is_reversed].hash
226
+ [self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, shapes, fill_format, effect_format, three_d_format, line_format, hyperlink_click, hyperlink_mouse_over, type, layout, quick_style, color_style, nodes, is_reversed].hash
225
227
  end
226
228
 
227
229
  # Builds the object from hash
@@ -101,6 +101,8 @@ module AsposeSlidesCloud
101
101
  effect_format == o.effect_format &&
102
102
  three_d_format == o.three_d_format &&
103
103
  line_format == o.line_format &&
104
+ hyperlink_click == o.hyperlink_click &&
105
+ hyperlink_mouse_over == o.hyperlink_mouse_over &&
104
106
  type == o.type &&
105
107
  shape_type == o.shape_type
106
108
  end
@@ -114,7 +116,7 @@ module AsposeSlidesCloud
114
116
  # Calculates hash code according to all attributes.
115
117
  # @return [Fixnum] Hash code
116
118
  def hash
117
- [self_uri, alternate_linksname, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, shapes, fill_format, effect_format, three_d_format, line_format, typeshape_type].hash
119
+ [self_uri, alternate_linksname, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, shapes, fill_format, effect_format, three_d_format, line_format, hyperlink_click, hyperlink_mouse_over, typeshape_type].hash
118
120
  end
119
121
 
120
122
  # Builds the object from hash
@@ -0,0 +1,239 @@
1
+ =begin
2
+ Copyright (c) 2019 Aspose Pty Ltd
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
21
+ =end
22
+
23
+ require 'date'
24
+
25
+ module AsposeSlidesCloud
26
+ # Subscript object
27
+ class SubscriptElement < MathElement
28
+ # Base argument
29
+ attr_accessor :base
30
+
31
+ # Subscript
32
+ attr_accessor :subscript
33
+
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
53
+ end
54
+ end
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ super.merge({
59
+ :'base' => :'Base',
60
+ :'subscript' => :'Subscript',
61
+ })
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.swagger_types
66
+ super.merge({
67
+ :'base' => :'MathElement',
68
+ :'subscript' => :'MathElement',
69
+ })
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ super
76
+
77
+ if attributes.has_key?(:'Base')
78
+ self.base = attributes[:'Base']
79
+ end
80
+
81
+ if attributes.has_key?(:'Subscript')
82
+ self.subscript = attributes[:'Subscript']
83
+ end
84
+ self.type = "SubscriptElement"
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ invalid_properties = super
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ return false if !super
98
+ true
99
+ end
100
+
101
+ # Checks equality by comparing each attribute.
102
+ # @param [Object] Object to be compared
103
+ def ==(o)
104
+ return true if self.equal?(o)
105
+ self.class == o.class &&
106
+ type == o.type &&
107
+ base == o.base &&
108
+ subscript == o.subscript
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Fixnum] Hash code
119
+ def hash
120
+ [type, base, subscript].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ self.class.swagger_types.each_pair do |key, type|
129
+ mapKey = self.class.attribute_map[key]
130
+ if !mapKey.nil?
131
+ val = attributes[mapKey]
132
+ if val.nil?
133
+ mapKeyString = mapKey.to_s
134
+ mapKeyString[0] = mapKeyString[0].downcase
135
+ mapKey = mapKeyString.to_sym
136
+ val = attributes[mapKey]
137
+ end
138
+ if !val.nil?
139
+ if type =~ /\AArray<(.*)>/i
140
+ # check to ensure the input is an array given that the the attribute
141
+ # is documented as an array but the input is not
142
+ if val.is_a?(Array)
143
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
144
+ end
145
+ else
146
+ self.send("#{key}=", _deserialize(type, val))
147
+ end
148
+ end
149
+ end
150
+ end
151
+
152
+ self
153
+ end
154
+
155
+ # Deserializes the data based on type
156
+ # @param string type Data type
157
+ # @param string value Value to be deserialized
158
+ # @return [Object] Deserialized data
159
+ def _deserialize(type, value)
160
+ case type.to_sym
161
+ when :DateTime
162
+ DateTime.parse(value)
163
+ when :Date
164
+ Date.parse(value)
165
+ when :String
166
+ value.to_s
167
+ when :Integer
168
+ value.to_i
169
+ when :Float
170
+ value.to_f
171
+ when :BOOLEAN
172
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
173
+ true
174
+ else
175
+ false
176
+ end
177
+ when :Object
178
+ # generic object (usually a Hash), return directly
179
+ value
180
+ when /\AArray<(?<inner_type>.+)>\z/
181
+ inner_type = Regexp.last_match[:inner_type]
182
+ value.map { |v| _deserialize(inner_type, v) }
183
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
184
+ k_type = Regexp.last_match[:k_type]
185
+ v_type = Regexp.last_match[:v_type]
186
+ {}.tap do |hash|
187
+ value.each do |k, v|
188
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
189
+ end
190
+ end
191
+ else # model
192
+ temp_model = AsposeSlidesCloud.const_get(type).new
193
+ temp_model.build_from_hash(value)
194
+ end
195
+ end
196
+
197
+ # Returns the string representation of the object
198
+ # @return [String] String presentation of the object
199
+ def to_s
200
+ to_hash.to_s
201
+ end
202
+
203
+ # to_body is an alias to to_hash (backward compatibility)
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_body
206
+ to_hash
207
+ end
208
+
209
+ # Returns the object in the form of hash
210
+ # @return [Hash] Returns the object in the form of hash
211
+ def to_hash
212
+ hash = {}
213
+ self.class.attribute_map.each_pair do |attr, param|
214
+ value = self.send(attr)
215
+ next if value.nil?
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ # Outputs non-array value in the form of hash
222
+ # For object, use to_hash. Otherwise, just return the value
223
+ # @param [Object] value Any valid value
224
+ # @return [Hash] Returns the value in the form of hash
225
+ def _to_hash(value)
226
+ if value.is_a?(Array)
227
+ value.compact.map { |v| _to_hash(v) }
228
+ elsif value.is_a?(Hash)
229
+ {}.tap do |hash|
230
+ value.each { |k, v| hash[k] = _to_hash(v) }
231
+ end
232
+ elsif value.respond_to? :to_hash
233
+ value.to_hash
234
+ else
235
+ value
236
+ end
237
+ end
238
+ end
239
+ end