aspose_slides_cloud 20.8.0 → 21.3.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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/TestData/Sections.pptx +0 -0
  4. data/TestData/test-unprotected.pptx +0 -0
  5. data/TestData/test.pdf +0 -0
  6. data/TestData/test.pptx +0 -0
  7. data/lib/aspose_slides_cloud.rb +8 -2
  8. data/lib/aspose_slides_cloud/api/slides_api.rb +10162 -3258
  9. data/lib/aspose_slides_cloud/api/slides_api_requests.rb +949 -225
  10. data/lib/aspose_slides_cloud/api_client.rb +24 -22
  11. data/lib/aspose_slides_cloud/configuration.rb +7 -2
  12. data/lib/aspose_slides_cloud/models/audio_frame.rb +1 -3
  13. data/lib/aspose_slides_cloud/models/chart.rb +3 -5
  14. data/lib/aspose_slides_cloud/models/chart_category.rb +19 -9
  15. data/lib/aspose_slides_cloud/models/connector.rb +1 -2
  16. data/lib/aspose_slides_cloud/models/{resource_uri_element.rb → data_point.rb} +4 -14
  17. data/lib/aspose_slides_cloud/models/document.rb +6 -6
  18. data/lib/aspose_slides_cloud/models/geometry_shape.rb +18 -19
  19. data/lib/aspose_slides_cloud/models/graphical_object.rb +2 -4
  20. data/lib/aspose_slides_cloud/models/group_shape.rb +2 -4
  21. data/lib/aspose_slides_cloud/models/header_footer.rb +247 -0
  22. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +2 -12
  23. data/lib/aspose_slides_cloud/models/layout_slide.rb +2 -2
  24. data/lib/aspose_slides_cloud/models/layout_slides.rb +1 -1
  25. data/lib/aspose_slides_cloud/models/line_format.rb +23 -1
  26. data/lib/aspose_slides_cloud/models/master_slide.rb +2 -2
  27. data/lib/aspose_slides_cloud/models/master_slides.rb +1 -1
  28. data/lib/aspose_slides_cloud/models/notes_slide.rb +1 -1
  29. data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +267 -0
  30. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +1 -3
  31. data/lib/aspose_slides_cloud/models/paragraphs.rb +1 -1
  32. data/lib/aspose_slides_cloud/models/picture_fill.rb +1 -1
  33. data/lib/aspose_slides_cloud/models/picture_frame.rb +1 -3
  34. data/lib/aspose_slides_cloud/models/placeholder.rb +1 -1
  35. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +46 -2
  36. data/lib/aspose_slides_cloud/models/protection_properties.rb +217 -0
  37. data/lib/aspose_slides_cloud/models/section.rb +234 -0
  38. data/lib/aspose_slides_cloud/models/sections.rb +209 -0
  39. data/lib/aspose_slides_cloud/models/series.rb +2 -2
  40. data/lib/aspose_slides_cloud/models/shape.rb +2 -3
  41. data/lib/aspose_slides_cloud/models/shape_base.rb +3 -24
  42. data/lib/aspose_slides_cloud/models/shapes.rb +1 -1
  43. data/lib/aspose_slides_cloud/models/slide.rb +8 -8
  44. data/lib/aspose_slides_cloud/models/slide_properties.rb +315 -0
  45. data/lib/aspose_slides_cloud/models/slides.rb +1 -1
  46. data/lib/aspose_slides_cloud/models/smart_art.rb +1 -3
  47. data/lib/aspose_slides_cloud/models/smart_art_node.rb +1 -1
  48. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +2 -3
  49. data/lib/aspose_slides_cloud/models/table.rb +1 -3
  50. data/lib/aspose_slides_cloud/models/theme.rb +3 -3
  51. data/lib/aspose_slides_cloud/models/video_frame.rb +1 -3
  52. data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +206 -0
  53. data/lib/aspose_slides_cloud/type_registry.rb +24 -12
  54. data/lib/aspose_slides_cloud/version.rb +1 -1
  55. data/spec/api/slides_api_spec.rb +25848 -18001
  56. data/spec/extra/extra_spec.rb +73 -107
  57. data/spec/spec_utils.rb +21 -24
  58. data/testConfig.json +2 -2
  59. data/testRules.json +160 -103
  60. metadata +14 -3
@@ -64,7 +64,6 @@ module AsposeSlidesCloud
64
64
  def initialize(attributes = {})
65
65
  super
66
66
  self.type = "GroupShape"
67
- self.shape_type = "GroupShape"
68
67
  end
69
68
 
70
69
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -101,8 +100,7 @@ module AsposeSlidesCloud
101
100
  fill_format == o.fill_format &&
102
101
  effect_format == o.effect_format &&
103
102
  line_format == o.line_format &&
104
- type == o.type &&
105
- shape_type == o.shape_type
103
+ type == o.type
106
104
  end
107
105
 
108
106
  # @see the `==` method
@@ -114,7 +112,7 @@ module AsposeSlidesCloud
114
112
  # Calculates hash code according to all attributes.
115
113
  # @return [Fixnum] Hash code
116
114
  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, line_format, type, shape_type].hash
115
+ [self_uri, alternate_linksname, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, shapes, fill_format, effect_format, line_format, type].hash
118
116
  end
119
117
 
120
118
  # Builds the object from hash
@@ -0,0 +1,247 @@
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
+ # Represents header/footer info of slide
27
+ class HeaderFooter < ResourceBase
28
+ # True if date is displayed in the footer
29
+ attr_accessor :is_date_time_visible
30
+
31
+ # Text to be displayed as date in the footer
32
+ attr_accessor :date_time_text
33
+
34
+ # True if footer is displayed
35
+ attr_accessor :is_footer_visible
36
+
37
+ # Text to be displayed in the footer
38
+ attr_accessor :footer_text
39
+
40
+ # True if slide number is displayed in the footer
41
+ attr_accessor :is_slide_number_visible
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ super.merge({
46
+ :'is_date_time_visible' => :'IsDateTimeVisible',
47
+ :'date_time_text' => :'DateTimeText',
48
+ :'is_footer_visible' => :'IsFooterVisible',
49
+ :'footer_text' => :'FooterText',
50
+ :'is_slide_number_visible' => :'IsSlideNumberVisible',
51
+ })
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.swagger_types
56
+ super.merge({
57
+ :'is_date_time_visible' => :'BOOLEAN',
58
+ :'date_time_text' => :'String',
59
+ :'is_footer_visible' => :'BOOLEAN',
60
+ :'footer_text' => :'String',
61
+ :'is_slide_number_visible' => :'BOOLEAN',
62
+ })
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ super
69
+
70
+ if attributes.has_key?(:'IsDateTimeVisible')
71
+ self.is_date_time_visible = attributes[:'IsDateTimeVisible']
72
+ end
73
+
74
+ if attributes.has_key?(:'DateTimeText')
75
+ self.date_time_text = attributes[:'DateTimeText']
76
+ end
77
+
78
+ if attributes.has_key?(:'IsFooterVisible')
79
+ self.is_footer_visible = attributes[:'IsFooterVisible']
80
+ end
81
+
82
+ if attributes.has_key?(:'FooterText')
83
+ self.footer_text = attributes[:'FooterText']
84
+ end
85
+
86
+ if attributes.has_key?(:'IsSlideNumberVisible')
87
+ self.is_slide_number_visible = attributes[:'IsSlideNumberVisible']
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ invalid_properties = super
95
+ invalid_properties
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ def valid?
101
+ return false if !super
102
+ true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ self_uri == o.self_uri &&
111
+ alternate_links == o.alternate_links &&
112
+ is_date_time_visible == o.is_date_time_visible &&
113
+ date_time_text == o.date_time_text &&
114
+ is_footer_visible == o.is_footer_visible &&
115
+ footer_text == o.footer_text &&
116
+ is_slide_number_visible == o.is_slide_number_visible
117
+ end
118
+
119
+ # @see the `==` method
120
+ # @param [Object] Object to be compared
121
+ def eql?(o)
122
+ self == o
123
+ end
124
+
125
+ # Calculates hash code according to all attributes.
126
+ # @return [Fixnum] Hash code
127
+ def hash
128
+ [self_uri, alternate_links, is_date_time_visible, date_time_text, is_footer_visible, footer_text, is_slide_number_visible].hash
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def build_from_hash(attributes)
135
+ return nil unless attributes.is_a?(Hash)
136
+ self.class.swagger_types.each_pair do |key, type|
137
+ mapKey = self.class.attribute_map[key]
138
+ if !mapKey.nil?
139
+ val = attributes[mapKey]
140
+ if val.nil?
141
+ mapKeyString = mapKey.to_s
142
+ mapKeyString[0] = mapKeyString[0].downcase
143
+ mapKey = mapKeyString.to_sym
144
+ val = attributes[mapKey]
145
+ end
146
+ if !val.nil?
147
+ if type =~ /\AArray<(.*)>/i
148
+ # check to ensure the input is an array given that the the attribute
149
+ # is documented as an array but the input is not
150
+ if val.is_a?(Array)
151
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
152
+ end
153
+ else
154
+ self.send("#{key}=", _deserialize(type, val))
155
+ end
156
+ end
157
+ end
158
+ end
159
+
160
+ self
161
+ end
162
+
163
+ # Deserializes the data based on type
164
+ # @param string type Data type
165
+ # @param string value Value to be deserialized
166
+ # @return [Object] Deserialized data
167
+ def _deserialize(type, value)
168
+ case type.to_sym
169
+ when :DateTime
170
+ DateTime.parse(value)
171
+ when :Date
172
+ Date.parse(value)
173
+ when :String
174
+ value.to_s
175
+ when :Integer
176
+ value.to_i
177
+ when :Float
178
+ value.to_f
179
+ when :BOOLEAN
180
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
181
+ true
182
+ else
183
+ false
184
+ end
185
+ when :Object
186
+ # generic object (usually a Hash), return directly
187
+ value
188
+ when /\AArray<(?<inner_type>.+)>\z/
189
+ inner_type = Regexp.last_match[:inner_type]
190
+ value.map { |v| _deserialize(inner_type, v) }
191
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
192
+ k_type = Regexp.last_match[:k_type]
193
+ v_type = Regexp.last_match[:v_type]
194
+ {}.tap do |hash|
195
+ value.each do |k, v|
196
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
197
+ end
198
+ end
199
+ else # model
200
+ temp_model = AsposeSlidesCloud.const_get(type).new
201
+ temp_model.build_from_hash(value)
202
+ end
203
+ end
204
+
205
+ # Returns the string representation of the object
206
+ # @return [String] String presentation of the object
207
+ def to_s
208
+ to_hash.to_s
209
+ end
210
+
211
+ # to_body is an alias to to_hash (backward compatibility)
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_body
214
+ to_hash
215
+ end
216
+
217
+ # Returns the object in the form of hash
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_hash
220
+ hash = {}
221
+ self.class.attribute_map.each_pair do |attr, param|
222
+ value = self.send(attr)
223
+ next if value.nil?
224
+ hash[param] = _to_hash(value)
225
+ end
226
+ hash
227
+ end
228
+
229
+ # Outputs non-array value in the form of hash
230
+ # For object, use to_hash. Otherwise, just return the value
231
+ # @param [Object] value Any valid value
232
+ # @return [Hash] Returns the value in the form of hash
233
+ def _to_hash(value)
234
+ if value.is_a?(Array)
235
+ value.compact.map { |v| _to_hash(v) }
236
+ elsif value.is_a?(Hash)
237
+ {}.tap do |hash|
238
+ value.each { |k, v| hash[k] = _to_hash(v) }
239
+ end
240
+ elsif value.respond_to? :to_hash
241
+ value.to_hash
242
+ else
243
+ value
244
+ end
245
+ end
246
+ end
247
+ end
@@ -25,20 +25,15 @@ require 'date'
25
25
  module AsposeSlidesCloud
26
26
  # Represents export options for whole presentation.
27
27
  class IShapeExportOptions
28
- # Export format.
29
- attr_accessor :format
30
-
31
28
  # Attribute mapping from ruby-style variable name to JSON key.
32
29
  def self.attribute_map
33
30
  {
34
- :'format' => :'Format',
35
31
  }
36
32
  end
37
33
 
38
34
  # Attribute type mapping.
39
35
  def self.swagger_types
40
36
  {
41
- :'format' => :'String',
42
37
  }
43
38
  end
44
39
 
@@ -49,10 +44,6 @@ module AsposeSlidesCloud
49
44
 
50
45
  # convert string to symbol for hash key
51
46
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
-
53
- if attributes.has_key?(:'Format')
54
- self.format = attributes[:'Format']
55
- end
56
47
  end
57
48
 
58
49
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -72,8 +63,7 @@ module AsposeSlidesCloud
72
63
  # @param [Object] Object to be compared
73
64
  def ==(o)
74
65
  return true if self.equal?(o)
75
- self.class == o.class &&
76
- format == o.format
66
+ self.class == o.class
77
67
  end
78
68
 
79
69
  # @see the `==` method
@@ -85,7 +75,7 @@ module AsposeSlidesCloud
85
75
  # Calculates hash code according to all attributes.
86
76
  # @return [Fixnum] Hash code
87
77
  def hash
88
- [format].hash
78
+ [].hash
89
79
  end
90
80
 
91
81
  # Builds the object from hash
@@ -74,8 +74,8 @@ module AsposeSlidesCloud
74
74
  super.merge({
75
75
  :'name' => :'String',
76
76
  :'type' => :'String',
77
- :'master_slide' => :'ResourceUriElement',
78
- :'depending_slides' => :'Array<ResourceUriElement>',
77
+ :'master_slide' => :'ResourceUri',
78
+ :'depending_slides' => :'Array<ResourceUri>',
79
79
  })
80
80
  end
81
81
 
@@ -38,7 +38,7 @@ module AsposeSlidesCloud
38
38
  # Attribute type mapping.
39
39
  def self.swagger_types
40
40
  super.merge({
41
- :'slide_list' => :'Array<ResourceUriElement>',
41
+ :'slide_list' => :'Array<ResourceUri>',
42
42
  })
43
43
  end
44
44
 
@@ -40,6 +40,9 @@ module AsposeSlidesCloud
40
40
  # Style.
41
41
  attr_accessor :style
42
42
 
43
+ # Sketch type.
44
+ attr_accessor :sketch_type
45
+
43
46
  # Begin arrowhead.
44
47
  attr_accessor :begin_arrow_head
45
48
 
@@ -88,6 +91,7 @@ module AsposeSlidesCloud
88
91
  :'dash_style' => :'DashStyle',
89
92
  :'join_style' => :'JoinStyle',
90
93
  :'style' => :'Style',
94
+ :'sketch_type' => :'SketchType',
91
95
  :'begin_arrow_head' => :'BeginArrowHead',
92
96
  :'end_arrow_head' => :'EndArrowHead',
93
97
  :'custom_dash_pattern' => :'CustomDashPattern',
@@ -105,6 +109,7 @@ module AsposeSlidesCloud
105
109
  :'dash_style' => :'String',
106
110
  :'join_style' => :'String',
107
111
  :'style' => :'String',
112
+ :'sketch_type' => :'String',
108
113
  :'begin_arrow_head' => :'ArrowHeadProperties',
109
114
  :'end_arrow_head' => :'ArrowHeadProperties',
110
115
  :'custom_dash_pattern' => :'CustomDashPattern',
@@ -142,6 +147,10 @@ module AsposeSlidesCloud
142
147
  self.style = attributes[:'Style']
143
148
  end
144
149
 
150
+ if attributes.has_key?(:'SketchType')
151
+ self.sketch_type = attributes[:'SketchType']
152
+ end
153
+
145
154
  if attributes.has_key?(:'BeginArrowHead')
146
155
  self.begin_arrow_head = attributes[:'BeginArrowHead']
147
156
  end
@@ -187,6 +196,8 @@ module AsposeSlidesCloud
187
196
  return false unless join_style_validator.valid?(@join_style)
188
197
  style_validator = EnumAttributeValidator.new('String', ['Single', 'ThinThin', 'ThinThick', 'ThickThin', 'ThickBetweenThin', 'NotDefined'])
189
198
  return false unless style_validator.valid?(@style)
199
+ sketch_type_validator = EnumAttributeValidator.new('String', ['None', 'Curved', 'Freehand', 'Scribble', 'NotDefined'])
200
+ return false unless sketch_type_validator.valid?(@sketch_type)
190
201
  true
191
202
  end
192
203
 
@@ -240,6 +251,16 @@ module AsposeSlidesCloud
240
251
  @style = style
241
252
  end
242
253
 
254
+ # Custom attribute writer method checking allowed values (enum).
255
+ # @param [Object] sketch_type Object to be assigned
256
+ def sketch_type=(sketch_type)
257
+ validator = EnumAttributeValidator.new('String', ['None', 'Curved', 'Freehand', 'Scribble', 'NotDefined'])
258
+ unless validator.valid?(sketch_type)
259
+ fail ArgumentError, 'invalid value for "sketch_type", must be one of #{validator.allowable_values}.'
260
+ end
261
+ @sketch_type = sketch_type
262
+ end
263
+
243
264
  # Checks equality by comparing each attribute.
244
265
  # @param [Object] Object to be compared
245
266
  def ==(o)
@@ -250,6 +271,7 @@ module AsposeSlidesCloud
250
271
  dash_style == o.dash_style &&
251
272
  join_style == o.join_style &&
252
273
  style == o.style &&
274
+ sketch_type == o.sketch_type &&
253
275
  begin_arrow_head == o.begin_arrow_head &&
254
276
  end_arrow_head == o.end_arrow_head &&
255
277
  custom_dash_pattern == o.custom_dash_pattern &&
@@ -267,7 +289,7 @@ module AsposeSlidesCloud
267
289
  # Calculates hash code according to all attributes.
268
290
  # @return [Fixnum] Hash code
269
291
  def hash
270
- [alignment, cap_style, dash_style, join_style, style, begin_arrow_head, end_arrow_head, custom_dash_pattern, fill_format, miter_limit, width].hash
292
+ [alignment, cap_style, dash_style, join_style, style, sketch_type, begin_arrow_head, end_arrow_head, custom_dash_pattern, fill_format, miter_limit, width].hash
271
293
  end
272
294
 
273
295
  # Builds the object from hash
@@ -47,8 +47,8 @@ module AsposeSlidesCloud
47
47
  def self.swagger_types
48
48
  super.merge({
49
49
  :'name' => :'String',
50
- :'layout_slides' => :'Array<ResourceUriElement>',
51
- :'depending_slides' => :'Array<ResourceUriElement>',
50
+ :'layout_slides' => :'Array<ResourceUri>',
51
+ :'depending_slides' => :'Array<ResourceUri>',
52
52
  })
53
53
  end
54
54
 
@@ -38,7 +38,7 @@ module AsposeSlidesCloud
38
38
  # Attribute type mapping.
39
39
  def self.swagger_types
40
40
  super.merge({
41
- :'slide_list' => :'Array<ResourceUriElement>',
41
+ :'slide_list' => :'Array<ResourceUri>',
42
42
  })
43
43
  end
44
44
 
@@ -43,7 +43,7 @@ module AsposeSlidesCloud
43
43
  def self.swagger_types
44
44
  super.merge({
45
45
  :'text' => :'String',
46
- :'shapes' => :'ResourceUriElement',
46
+ :'shapes' => :'ResourceUri',
47
47
  })
48
48
  end
49
49