aspose_slides_cloud 20.5.0 → 20.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/TestData/ChartTest.pptx +0 -0
  4. data/TestData/Sections.pptx +0 -0
  5. data/lib/aspose_slides_cloud.rb +12 -5
  6. data/lib/aspose_slides_cloud/api/slides_api.rb +4571 -1683
  7. data/lib/aspose_slides_cloud/api/slides_api_requests.rb +1191 -185
  8. data/lib/aspose_slides_cloud/api_client.rb +30 -23
  9. data/lib/aspose_slides_cloud/configuration.rb +7 -2
  10. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +31 -48
  11. data/lib/aspose_slides_cloud/models/add_master_slide.rb +31 -48
  12. data/lib/aspose_slides_cloud/models/add_shape.rb +31 -48
  13. data/lib/aspose_slides_cloud/models/add_slide.rb +31 -48
  14. data/lib/aspose_slides_cloud/models/api_info.rb +22 -10
  15. data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +22 -10
  16. data/lib/aspose_slides_cloud/models/audio_frame.rb +32 -246
  17. data/lib/aspose_slides_cloud/models/axes.rb +22 -10
  18. data/lib/aspose_slides_cloud/models/axis.rb +22 -10
  19. data/lib/aspose_slides_cloud/models/base64_input_file.rb +31 -57
  20. data/lib/aspose_slides_cloud/models/blur_effect.rb +22 -10
  21. data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +31 -222
  22. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +30 -48
  23. data/lib/aspose_slides_cloud/models/bubble_series.rb +31 -211
  24. data/lib/aspose_slides_cloud/models/chart.rb +32 -220
  25. data/lib/aspose_slides_cloud/models/chart_category.rb +54 -20
  26. data/lib/aspose_slides_cloud/models/chart_title.rb +22 -10
  27. data/lib/aspose_slides_cloud/models/chart_wall.rb +22 -10
  28. data/lib/aspose_slides_cloud/models/color_scheme.rb +30 -40
  29. data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +22 -10
  30. data/lib/aspose_slides_cloud/models/connector.rb +32 -244
  31. data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +22 -10
  32. data/lib/aspose_slides_cloud/models/{resource_uri_element.rb → data_point.rb} +24 -22
  33. data/lib/aspose_slides_cloud/models/disc_usage.rb +22 -10
  34. data/lib/aspose_slides_cloud/models/document.rb +35 -45
  35. data/lib/aspose_slides_cloud/models/document_properties.rb +30 -40
  36. data/lib/aspose_slides_cloud/models/document_property.rb +30 -40
  37. data/lib/aspose_slides_cloud/models/document_replace_result.rb +30 -94
  38. data/lib/aspose_slides_cloud/models/effect.rb +22 -10
  39. data/lib/aspose_slides_cloud/models/effect_format.rb +22 -10
  40. data/lib/aspose_slides_cloud/models/entity_exists.rb +212 -0
  41. data/lib/aspose_slides_cloud/models/error.rb +22 -10
  42. data/lib/aspose_slides_cloud/models/error_details.rb +22 -10
  43. data/lib/aspose_slides_cloud/models/export_format.rb +1 -0
  44. data/lib/aspose_slides_cloud/models/export_options.rb +33 -11
  45. data/lib/aspose_slides_cloud/models/file_version.rb +30 -75
  46. data/lib/aspose_slides_cloud/models/file_versions.rb +22 -10
  47. data/lib/aspose_slides_cloud/models/files_list.rb +22 -10
  48. data/lib/aspose_slides_cloud/models/files_upload_result.rb +22 -10
  49. data/lib/aspose_slides_cloud/models/fill_format.rb +22 -10
  50. data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +22 -10
  51. data/lib/aspose_slides_cloud/models/font_scheme.rb +30 -40
  52. data/lib/aspose_slides_cloud/models/font_set.rb +22 -10
  53. data/lib/aspose_slides_cloud/models/format_scheme.rb +30 -40
  54. data/lib/aspose_slides_cloud/models/geometry_shape.rb +33 -212
  55. data/lib/aspose_slides_cloud/models/glow_effect.rb +22 -10
  56. data/lib/aspose_slides_cloud/models/gradient_fill.rb +31 -48
  57. data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +22 -10
  58. data/lib/aspose_slides_cloud/models/graphical_object.rb +31 -219
  59. data/lib/aspose_slides_cloud/models/group_shape.rb +31 -219
  60. data/lib/aspose_slides_cloud/models/header_footer.rb +247 -0
  61. data/lib/aspose_slides_cloud/models/html_export_options.rb +33 -32
  62. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +22 -20
  63. data/lib/aspose_slides_cloud/models/image.rb +30 -40
  64. data/lib/aspose_slides_cloud/models/image_export_options.rb +33 -32
  65. data/lib/aspose_slides_cloud/models/images.rb +30 -40
  66. data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +22 -10
  67. data/lib/aspose_slides_cloud/models/input.rb +22 -10
  68. data/lib/aspose_slides_cloud/models/input_file.rb +22 -10
  69. data/lib/aspose_slides_cloud/models/interactive_sequence.rb +22 -10
  70. data/lib/aspose_slides_cloud/models/layout_slide.rb +31 -41
  71. data/lib/aspose_slides_cloud/models/layout_slides.rb +30 -40
  72. data/lib/aspose_slides_cloud/models/legend.rb +22 -10
  73. data/lib/aspose_slides_cloud/models/line_format.rb +22 -10
  74. data/lib/aspose_slides_cloud/models/master_slide.rb +31 -41
  75. data/lib/aspose_slides_cloud/models/master_slides.rb +30 -40
  76. data/lib/aspose_slides_cloud/models/merge.rb +31 -48
  77. data/lib/aspose_slides_cloud/models/merging_source.rb +22 -10
  78. data/lib/aspose_slides_cloud/models/no_fill.rb +29 -46
  79. data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +22 -10
  80. data/lib/aspose_slides_cloud/models/notes_slide.rb +30 -40
  81. data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +267 -0
  82. data/lib/aspose_slides_cloud/models/object_exist.rb +22 -10
  83. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +32 -220
  84. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +30 -20
  85. data/lib/aspose_slides_cloud/models/one_value_series.rb +31 -211
  86. data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +22 -10
  87. data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +22 -10
  88. data/lib/aspose_slides_cloud/models/output_file.rb +22 -10
  89. data/lib/aspose_slides_cloud/models/paragraph.rb +30 -40
  90. data/lib/aspose_slides_cloud/models/paragraphs.rb +30 -40
  91. data/lib/aspose_slides_cloud/models/path_input_file.rb +31 -57
  92. data/lib/aspose_slides_cloud/models/path_output_file.rb +31 -48
  93. data/lib/aspose_slides_cloud/models/pattern_fill.rb +31 -48
  94. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +63 -35
  95. data/lib/aspose_slides_cloud/models/picture_fill.rb +32 -49
  96. data/lib/aspose_slides_cloud/models/picture_frame.rb +32 -246
  97. data/lib/aspose_slides_cloud/models/pipeline.rb +22 -10
  98. data/lib/aspose_slides_cloud/models/placeholder.rb +30 -40
  99. data/lib/aspose_slides_cloud/models/placeholders.rb +30 -40
  100. data/lib/aspose_slides_cloud/models/plot_area.rb +22 -10
  101. data/lib/aspose_slides_cloud/models/portion.rb +30 -40
  102. data/lib/aspose_slides_cloud/models/portions.rb +36 -46
  103. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +33 -32
  104. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +22 -10
  105. data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +22 -10
  106. data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +22 -10
  107. data/lib/aspose_slides_cloud/models/reflection_effect.rb +22 -10
  108. data/lib/aspose_slides_cloud/models/remove_shape.rb +31 -48
  109. data/lib/aspose_slides_cloud/models/remove_slide.rb +31 -48
  110. data/lib/aspose_slides_cloud/models/reorder_slide.rb +31 -48
  111. data/lib/aspose_slides_cloud/models/replace_text.rb +31 -48
  112. data/lib/aspose_slides_cloud/models/request_input_file.rb +31 -57
  113. data/lib/aspose_slides_cloud/models/reset_slide.rb +31 -48
  114. data/lib/aspose_slides_cloud/models/resource_base.rb +22 -10
  115. data/lib/aspose_slides_cloud/models/resource_uri.rb +22 -10
  116. data/lib/aspose_slides_cloud/models/response_output_file.rb +29 -46
  117. data/lib/aspose_slides_cloud/models/save.rb +33 -50
  118. data/lib/aspose_slides_cloud/models/save_shape.rb +31 -48
  119. data/lib/aspose_slides_cloud/models/save_slide.rb +33 -50
  120. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +30 -20
  121. data/lib/aspose_slides_cloud/models/scatter_series.rb +31 -211
  122. data/lib/aspose_slides_cloud/models/section.rb +234 -0
  123. data/lib/aspose_slides_cloud/models/sections.rb +209 -0
  124. data/lib/aspose_slides_cloud/models/series.rb +45 -12
  125. data/lib/aspose_slides_cloud/models/series_marker.rb +22 -10
  126. data/lib/aspose_slides_cloud/models/shape.rb +32 -244
  127. data/lib/aspose_slides_cloud/models/shape_base.rb +31 -62
  128. data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +22 -10
  129. data/lib/aspose_slides_cloud/models/shapes.rb +30 -40
  130. data/lib/aspose_slides_cloud/models/slide.rb +37 -47
  131. data/lib/aspose_slides_cloud/models/slide_animation.rb +30 -40
  132. data/lib/aspose_slides_cloud/models/slide_background.rb +30 -40
  133. data/lib/aspose_slides_cloud/models/slide_comment.rb +22 -10
  134. data/lib/aspose_slides_cloud/models/slide_comments.rb +30 -40
  135. data/lib/aspose_slides_cloud/models/slide_export_format.rb +1 -0
  136. data/lib/aspose_slides_cloud/models/slide_replace_result.rb +30 -154
  137. data/lib/aspose_slides_cloud/models/slides.rb +30 -40
  138. data/lib/aspose_slides_cloud/models/smart_art.rb +32 -220
  139. data/lib/aspose_slides_cloud/models/smart_art_node.rb +23 -11
  140. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +30 -217
  141. data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +22 -10
  142. data/lib/aspose_slides_cloud/models/solid_fill.rb +31 -48
  143. data/lib/aspose_slides_cloud/models/split_document_result.rb +30 -40
  144. data/lib/aspose_slides_cloud/models/storage_exist.rb +22 -10
  145. data/lib/aspose_slides_cloud/models/storage_file.rb +22 -10
  146. data/lib/aspose_slides_cloud/models/svg_export_options.rb +33 -32
  147. data/lib/aspose_slides_cloud/models/swf_export_options.rb +33 -32
  148. data/lib/aspose_slides_cloud/models/table.rb +32 -220
  149. data/lib/aspose_slides_cloud/models/table_cell.rb +22 -10
  150. data/lib/aspose_slides_cloud/models/table_column.rb +22 -10
  151. data/lib/aspose_slides_cloud/models/table_row.rb +22 -10
  152. data/lib/aspose_slides_cloud/models/task.rb +22 -10
  153. data/lib/aspose_slides_cloud/models/text_item.rb +22 -10
  154. data/lib/aspose_slides_cloud/models/text_items.rb +30 -40
  155. data/lib/aspose_slides_cloud/models/theme.rb +32 -42
  156. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +33 -32
  157. data/lib/aspose_slides_cloud/models/update_background.rb +31 -48
  158. data/lib/aspose_slides_cloud/models/update_shape.rb +31 -48
  159. data/lib/aspose_slides_cloud/models/video_frame.rb +32 -246
  160. data/lib/aspose_slides_cloud/models/view_properties.rb +30 -40
  161. data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +206 -0
  162. data/lib/aspose_slides_cloud/models/waterfall_series.rb +31 -222
  163. data/lib/aspose_slides_cloud/models/xps_export_options.rb +33 -32
  164. data/lib/aspose_slides_cloud/type_registry.rb +320 -0
  165. data/lib/aspose_slides_cloud/version.rb +1 -1
  166. data/spec/api/slides_api_spec.rb +25246 -14028
  167. data/spec/extra/extra_spec.rb +156 -22
  168. data/spec/spec_utils.rb +11 -4
  169. data/testConfig.json +2 -2
  170. data/testRules.json +172 -77
  171. metadata +12 -3
@@ -24,10 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Provides options that control how a presentation is saved in Html format.
27
- class HtmlExportOptions
28
- # Export format.
29
- attr_accessor :format
30
-
27
+ class HtmlExportOptions < ExportOptions
31
28
  # Get or sets flag for save presentation as zip file
32
29
  attr_accessor :save_as_zip
33
30
 
@@ -88,8 +85,7 @@ module AsposeSlidesCloud
88
85
 
89
86
  # Attribute mapping from ruby-style variable name to JSON key.
90
87
  def self.attribute_map
91
- {
92
- :'format' => :'Format',
88
+ super.merge({
93
89
  :'save_as_zip' => :'SaveAsZip',
94
90
  :'sub_directory_name' => :'SubDirectoryName',
95
91
  :'show_hidden_slides' => :'ShowHiddenSlides',
@@ -101,14 +97,13 @@ module AsposeSlidesCloud
101
97
  :'comments_position' => :'CommentsPosition',
102
98
  :'comments_area_width' => :'CommentsAreaWidth',
103
99
  :'comments_area_color' => :'CommentsAreaColor',
104
- :'show_comments_by_no_author' => :'ShowCommentsByNoAuthor'
105
- }
100
+ :'show_comments_by_no_author' => :'ShowCommentsByNoAuthor',
101
+ })
106
102
  end
107
103
 
108
104
  # Attribute type mapping.
109
105
  def self.swagger_types
110
- {
111
- :'format' => :'String',
106
+ super.merge({
112
107
  :'save_as_zip' => :'BOOLEAN',
113
108
  :'sub_directory_name' => :'String',
114
109
  :'show_hidden_slides' => :'BOOLEAN',
@@ -120,23 +115,14 @@ module AsposeSlidesCloud
120
115
  :'comments_position' => :'String',
121
116
  :'comments_area_width' => :'Integer',
122
117
  :'comments_area_color' => :'String',
123
- :'show_comments_by_no_author' => :'BOOLEAN'
124
- }
118
+ :'show_comments_by_no_author' => :'BOOLEAN',
119
+ })
125
120
  end
126
121
 
127
122
  # Initializes the object
128
123
  # @param [Hash] attributes Model attributes in the form of hash
129
124
  def initialize(attributes = {})
130
- return unless attributes.is_a?(Hash)
131
-
132
- # convert string to symbol for hash key
133
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
134
-
135
- if attributes.has_key?(:'Format')
136
- self.format = attributes[:'Format']
137
- else
138
- self.format = "html"
139
- end
125
+ super
140
126
 
141
127
  if attributes.has_key?(:'SaveAsZip')
142
128
  self.save_as_zip = attributes[:'SaveAsZip']
@@ -185,12 +171,13 @@ module AsposeSlidesCloud
185
171
  if attributes.has_key?(:'ShowCommentsByNoAuthor')
186
172
  self.show_comments_by_no_author = attributes[:'ShowCommentsByNoAuthor']
187
173
  end
174
+ self.format = "html"
188
175
  end
189
176
 
190
177
  # Show invalid properties with the reasons. Usually used together with valid?
191
178
  # @return Array for valid properties with the reasons
192
179
  def list_invalid_properties
193
- invalid_properties = Array.new
180
+ invalid_properties = super
194
181
  if @save_as_zip.nil?
195
182
  invalid_properties.push('invalid value for "save_as_zip", save_as_zip cannot be nil.')
196
183
  end
@@ -233,6 +220,7 @@ module AsposeSlidesCloud
233
220
  # Check to see if the all the properties in the model are valid
234
221
  # @return true if the model is valid
235
222
  def valid?
223
+ return false if !super
236
224
  return false if @save_as_zip.nil?
237
225
  return false if @show_hidden_slides.nil?
238
226
  return false if @svg_responsive_layout.nil?
@@ -286,6 +274,7 @@ module AsposeSlidesCloud
286
274
  def ==(o)
287
275
  return true if self.equal?(o)
288
276
  self.class == o.class &&
277
+ default_regular_font == o.default_regular_font &&
289
278
  format == o.format &&
290
279
  save_as_zip == o.save_as_zip &&
291
280
  sub_directory_name == o.sub_directory_name &&
@@ -310,7 +299,7 @@ module AsposeSlidesCloud
310
299
  # Calculates hash code according to all attributes.
311
300
  # @return [Fixnum] Hash code
312
301
  def hash
313
- [format, save_as_zip, sub_directory_name, show_hidden_slides, svg_responsive_layout, jpeg_quality, pictures_compression, delete_pictures_cropped_areas, notes_position, comments_position, comments_area_width, comments_area_color, show_comments_by_no_author].hash
302
+ [default_regular_font, format, save_as_zip, sub_directory_name, show_hidden_slides, svg_responsive_layout, jpeg_quality, pictures_compression, delete_pictures_cropped_areas, notes_position, comments_position, comments_area_width, comments_area_color, show_comments_by_no_author].hash
314
303
  end
315
304
 
316
305
  # Builds the object from hash
@@ -319,15 +308,27 @@ module AsposeSlidesCloud
319
308
  def build_from_hash(attributes)
320
309
  return nil unless attributes.is_a?(Hash)
321
310
  self.class.swagger_types.each_pair do |key, type|
322
- if type =~ /\AArray<(.*)>/i
323
- # check to ensure the input is an array given that the the attribute
324
- # is documented as an array but the input is not
325
- if attributes[self.class.attribute_map[key]].is_a?(Array)
326
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
311
+ mapKey = self.class.attribute_map[key]
312
+ if !mapKey.nil?
313
+ val = attributes[mapKey]
314
+ if val.nil?
315
+ mapKeyString = mapKey.to_s
316
+ mapKeyString[0] = mapKeyString[0].downcase
317
+ mapKey = mapKeyString.to_sym
318
+ val = attributes[mapKey]
319
+ end
320
+ if !val.nil?
321
+ if type =~ /\AArray<(.*)>/i
322
+ # check to ensure the input is an array given that the the attribute
323
+ # is documented as an array but the input is not
324
+ if val.is_a?(Array)
325
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
326
+ end
327
+ else
328
+ self.send("#{key}=", _deserialize(type, val))
329
+ end
327
330
  end
328
- elsif !attributes[self.class.attribute_map[key]].nil?
329
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
330
- end # or else data not found in attributes(hash), not an issue as the data can be optional
331
+ end
331
332
  end
332
333
 
333
334
  self
@@ -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
@@ -94,15 +84,27 @@ module AsposeSlidesCloud
94
84
  def build_from_hash(attributes)
95
85
  return nil unless attributes.is_a?(Hash)
96
86
  self.class.swagger_types.each_pair do |key, type|
97
- if type =~ /\AArray<(.*)>/i
98
- # check to ensure the input is an array given that the the attribute
99
- # is documented as an array but the input is not
100
- if attributes[self.class.attribute_map[key]].is_a?(Array)
101
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
87
+ mapKey = self.class.attribute_map[key]
88
+ if !mapKey.nil?
89
+ val = attributes[mapKey]
90
+ if val.nil?
91
+ mapKeyString = mapKey.to_s
92
+ mapKeyString[0] = mapKeyString[0].downcase
93
+ mapKey = mapKeyString.to_sym
94
+ val = attributes[mapKey]
102
95
  end
103
- elsif !attributes[self.class.attribute_map[key]].nil?
104
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
105
- end # or else data not found in attributes(hash), not an issue as the data can be optional
96
+ if !val.nil?
97
+ if type =~ /\AArray<(.*)>/i
98
+ # check to ensure the input is an array given that the the attribute
99
+ # is documented as an array but the input is not
100
+ if val.is_a?(Array)
101
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
102
+ end
103
+ else
104
+ self.send("#{key}=", _deserialize(type, val))
105
+ end
106
+ end
107
+ end
106
108
  end
107
109
 
108
110
  self
@@ -24,13 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Represents image DTO.
27
- class Image
28
- # Gets or sets the link to this resource.
29
- attr_accessor :self_uri
30
-
31
- # List of alternate links.
32
- attr_accessor :alternate_links
33
-
27
+ class Image < ResourceBase
34
28
  # Get or sets the width of an image.
35
29
  attr_accessor :width
36
30
 
@@ -42,43 +36,26 @@ module AsposeSlidesCloud
42
36
 
43
37
  # Attribute mapping from ruby-style variable name to JSON key.
44
38
  def self.attribute_map
45
- {
46
- :'self_uri' => :'SelfUri',
47
- :'alternate_links' => :'AlternateLinks',
39
+ super.merge({
48
40
  :'width' => :'Width',
49
41
  :'height' => :'Height',
50
- :'content_type' => :'ContentType'
51
- }
42
+ :'content_type' => :'ContentType',
43
+ })
52
44
  end
53
45
 
54
46
  # Attribute type mapping.
55
47
  def self.swagger_types
56
- {
57
- :'self_uri' => :'ResourceUri',
58
- :'alternate_links' => :'Array<ResourceUri>',
48
+ super.merge({
59
49
  :'width' => :'Integer',
60
50
  :'height' => :'Integer',
61
- :'content_type' => :'String'
62
- }
51
+ :'content_type' => :'String',
52
+ })
63
53
  end
64
54
 
65
55
  # Initializes the object
66
56
  # @param [Hash] attributes Model attributes in the form of hash
67
57
  def initialize(attributes = {})
68
- return unless attributes.is_a?(Hash)
69
-
70
- # convert string to symbol for hash key
71
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
72
-
73
- if attributes.has_key?(:'SelfUri')
74
- self.self_uri = attributes[:'SelfUri']
75
- end
76
-
77
- if attributes.has_key?(:'AlternateLinks')
78
- if (value = attributes[:'AlternateLinks']).is_a?(Array)
79
- self.alternate_links = value
80
- end
81
- end
58
+ super
82
59
 
83
60
  if attributes.has_key?(:'Width')
84
61
  self.width = attributes[:'Width']
@@ -96,7 +73,7 @@ module AsposeSlidesCloud
96
73
  # Show invalid properties with the reasons. Usually used together with valid?
97
74
  # @return Array for valid properties with the reasons
98
75
  def list_invalid_properties
99
- invalid_properties = Array.new
76
+ invalid_properties = super
100
77
  if @width.nil?
101
78
  invalid_properties.push('invalid value for "width", width cannot be nil.')
102
79
  end
@@ -111,6 +88,7 @@ module AsposeSlidesCloud
111
88
  # Check to see if the all the properties in the model are valid
112
89
  # @return true if the model is valid
113
90
  def valid?
91
+ return false if !super
114
92
  return false if @width.nil?
115
93
  return false if @height.nil?
116
94
  true
@@ -146,15 +124,27 @@ module AsposeSlidesCloud
146
124
  def build_from_hash(attributes)
147
125
  return nil unless attributes.is_a?(Hash)
148
126
  self.class.swagger_types.each_pair do |key, type|
149
- if type =~ /\AArray<(.*)>/i
150
- # check to ensure the input is an array given that the the attribute
151
- # is documented as an array but the input is not
152
- if attributes[self.class.attribute_map[key]].is_a?(Array)
153
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
127
+ mapKey = self.class.attribute_map[key]
128
+ if !mapKey.nil?
129
+ val = attributes[mapKey]
130
+ if val.nil?
131
+ mapKeyString = mapKey.to_s
132
+ mapKeyString[0] = mapKeyString[0].downcase
133
+ mapKey = mapKeyString.to_sym
134
+ val = attributes[mapKey]
154
135
  end
155
- elsif !attributes[self.class.attribute_map[key]].nil?
156
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
157
- end # or else data not found in attributes(hash), not an issue as the data can be optional
136
+ if !val.nil?
137
+ if type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the the attribute
139
+ # is documented as an array but the input is not
140
+ if val.is_a?(Array)
141
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
142
+ end
143
+ else
144
+ self.send("#{key}=", _deserialize(type, val))
145
+ end
146
+ end
147
+ end
158
148
  end
159
149
 
160
150
  self
@@ -24,10 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Provides options that control how a presentation is saved in an image format.
27
- class ImageExportOptions
28
- # Export format.
29
- attr_accessor :format
30
-
27
+ class ImageExportOptions < ExportOptions
31
28
  # Gets or sets the position of the notes on the page.
32
29
  attr_accessor :notes_position
33
30
 
@@ -64,39 +61,28 @@ module AsposeSlidesCloud
64
61
 
65
62
  # Attribute mapping from ruby-style variable name to JSON key.
66
63
  def self.attribute_map
67
- {
68
- :'format' => :'Format',
64
+ super.merge({
69
65
  :'notes_position' => :'NotesPosition',
70
66
  :'comments_position' => :'CommentsPosition',
71
67
  :'comments_area_width' => :'CommentsAreaWidth',
72
- :'comments_area_color' => :'CommentsAreaColor'
73
- }
68
+ :'comments_area_color' => :'CommentsAreaColor',
69
+ })
74
70
  end
75
71
 
76
72
  # Attribute type mapping.
77
73
  def self.swagger_types
78
- {
79
- :'format' => :'String',
74
+ super.merge({
80
75
  :'notes_position' => :'String',
81
76
  :'comments_position' => :'String',
82
77
  :'comments_area_width' => :'Integer',
83
- :'comments_area_color' => :'String'
84
- }
78
+ :'comments_area_color' => :'String',
79
+ })
85
80
  end
86
81
 
87
82
  # Initializes the object
88
83
  # @param [Hash] attributes Model attributes in the form of hash
89
84
  def initialize(attributes = {})
90
- return unless attributes.is_a?(Hash)
91
-
92
- # convert string to symbol for hash key
93
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
94
-
95
- if attributes.has_key?(:'Format')
96
- self.format = attributes[:'Format']
97
- else
98
- self.format = "image"
99
- end
85
+ super
100
86
 
101
87
  if attributes.has_key?(:'NotesPosition')
102
88
  self.notes_position = attributes[:'NotesPosition']
@@ -113,12 +99,13 @@ module AsposeSlidesCloud
113
99
  if attributes.has_key?(:'CommentsAreaColor')
114
100
  self.comments_area_color = attributes[:'CommentsAreaColor']
115
101
  end
102
+ self.format = "image"
116
103
  end
117
104
 
118
105
  # Show invalid properties with the reasons. Usually used together with valid?
119
106
  # @return Array for valid properties with the reasons
120
107
  def list_invalid_properties
121
- invalid_properties = Array.new
108
+ invalid_properties = super
122
109
  if @notes_position.nil?
123
110
  invalid_properties.push('invalid value for "notes_position", notes_position cannot be nil.')
124
111
  end
@@ -137,6 +124,7 @@ module AsposeSlidesCloud
137
124
  # Check to see if the all the properties in the model are valid
138
125
  # @return true if the model is valid
139
126
  def valid?
127
+ return false if !super
140
128
  return false if @notes_position.nil?
141
129
  notes_position_validator = EnumAttributeValidator.new('String', ['None', 'BottomFull', 'BottomTruncated'])
142
130
  return false unless notes_position_validator.valid?(@notes_position)
@@ -172,6 +160,7 @@ module AsposeSlidesCloud
172
160
  def ==(o)
173
161
  return true if self.equal?(o)
174
162
  self.class == o.class &&
163
+ default_regular_font == o.default_regular_font &&
175
164
  format == o.format &&
176
165
  notes_position == o.notes_position &&
177
166
  comments_position == o.comments_position &&
@@ -188,7 +177,7 @@ module AsposeSlidesCloud
188
177
  # Calculates hash code according to all attributes.
189
178
  # @return [Fixnum] Hash code
190
179
  def hash
191
- [format, notes_position, comments_position, comments_area_width, comments_area_color].hash
180
+ [default_regular_font, format, notes_position, comments_position, comments_area_width, comments_area_color].hash
192
181
  end
193
182
 
194
183
  # Builds the object from hash
@@ -197,15 +186,27 @@ module AsposeSlidesCloud
197
186
  def build_from_hash(attributes)
198
187
  return nil unless attributes.is_a?(Hash)
199
188
  self.class.swagger_types.each_pair do |key, type|
200
- if type =~ /\AArray<(.*)>/i
201
- # check to ensure the input is an array given that the the attribute
202
- # is documented as an array but the input is not
203
- if attributes[self.class.attribute_map[key]].is_a?(Array)
204
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
189
+ mapKey = self.class.attribute_map[key]
190
+ if !mapKey.nil?
191
+ val = attributes[mapKey]
192
+ if val.nil?
193
+ mapKeyString = mapKey.to_s
194
+ mapKeyString[0] = mapKeyString[0].downcase
195
+ mapKey = mapKeyString.to_sym
196
+ val = attributes[mapKey]
197
+ end
198
+ if !val.nil?
199
+ if type =~ /\AArray<(.*)>/i
200
+ # check to ensure the input is an array given that the the attribute
201
+ # is documented as an array but the input is not
202
+ if val.is_a?(Array)
203
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
204
+ end
205
+ else
206
+ self.send("#{key}=", _deserialize(type, val))
207
+ end
205
208
  end
206
- elsif !attributes[self.class.attribute_map[key]].nil?
207
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
208
- end # or else data not found in attributes(hash), not an issue as the data can be optional
209
+ end
209
210
  end
210
211
 
211
212
  self