aspose_slides_cloud 20.2.0 → 20.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/TestData/ChartTest.pptx +0 -0
  4. data/lib/aspose_slides_cloud.rb +13 -3
  5. data/lib/aspose_slides_cloud/api/slides_api.rb +3254 -1024
  6. data/lib/aspose_slides_cloud/api/slides_api_requests.rb +970 -137
  7. data/lib/aspose_slides_cloud/api_client.rb +8 -5
  8. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +31 -48
  9. data/lib/aspose_slides_cloud/models/add_master_slide.rb +31 -48
  10. data/lib/aspose_slides_cloud/models/add_shape.rb +31 -48
  11. data/lib/aspose_slides_cloud/models/add_slide.rb +31 -48
  12. data/lib/aspose_slides_cloud/models/api_info.rb +22 -10
  13. data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +22 -10
  14. data/lib/aspose_slides_cloud/models/audio_frame.rb +32 -244
  15. data/lib/aspose_slides_cloud/models/axes.rb +22 -10
  16. data/lib/aspose_slides_cloud/models/axis.rb +22 -10
  17. data/lib/aspose_slides_cloud/models/base64_input_file.rb +31 -57
  18. data/lib/aspose_slides_cloud/models/blur_effect.rb +22 -10
  19. data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +299 -0
  20. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +30 -48
  21. data/lib/aspose_slides_cloud/models/bubble_series.rb +31 -211
  22. data/lib/aspose_slides_cloud/models/chart.rb +35 -221
  23. data/lib/aspose_slides_cloud/models/chart_category.rb +261 -0
  24. data/lib/aspose_slides_cloud/models/chart_title.rb +22 -10
  25. data/lib/aspose_slides_cloud/models/chart_wall.rb +22 -10
  26. data/lib/aspose_slides_cloud/models/color_scheme.rb +30 -40
  27. data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +217 -0
  28. data/lib/aspose_slides_cloud/models/connector.rb +31 -242
  29. data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +22 -10
  30. data/lib/aspose_slides_cloud/models/disc_usage.rb +22 -10
  31. data/lib/aspose_slides_cloud/models/document.rb +41 -41
  32. data/lib/aspose_slides_cloud/models/document_properties.rb +30 -40
  33. data/lib/aspose_slides_cloud/models/document_property.rb +30 -40
  34. data/lib/aspose_slides_cloud/models/document_replace_result.rb +32 -86
  35. data/lib/aspose_slides_cloud/models/effect.rb +22 -10
  36. data/lib/aspose_slides_cloud/models/effect_format.rb +22 -10
  37. data/lib/aspose_slides_cloud/models/entity_exists.rb +212 -0
  38. data/lib/aspose_slides_cloud/models/error.rb +22 -10
  39. data/lib/aspose_slides_cloud/models/error_details.rb +22 -10
  40. data/lib/aspose_slides_cloud/models/export_format.rb +1 -0
  41. data/lib/aspose_slides_cloud/models/export_options.rb +33 -11
  42. data/lib/aspose_slides_cloud/models/file_version.rb +30 -75
  43. data/lib/aspose_slides_cloud/models/file_versions.rb +22 -10
  44. data/lib/aspose_slides_cloud/models/files_list.rb +22 -10
  45. data/lib/aspose_slides_cloud/models/files_upload_result.rb +22 -10
  46. data/lib/aspose_slides_cloud/models/fill_format.rb +22 -10
  47. data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +22 -10
  48. data/lib/aspose_slides_cloud/models/font_scheme.rb +30 -40
  49. data/lib/aspose_slides_cloud/models/font_set.rb +22 -10
  50. data/lib/aspose_slides_cloud/models/format_scheme.rb +30 -40
  51. data/lib/aspose_slides_cloud/models/geometry_shape.rb +30 -208
  52. data/lib/aspose_slides_cloud/models/glow_effect.rb +22 -10
  53. data/lib/aspose_slides_cloud/models/gradient_fill.rb +31 -48
  54. data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +22 -10
  55. data/lib/aspose_slides_cloud/models/graphical_object.rb +31 -217
  56. data/lib/aspose_slides_cloud/models/group_shape.rb +31 -217
  57. data/lib/aspose_slides_cloud/models/html_export_options.rb +33 -32
  58. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +22 -10
  59. data/lib/aspose_slides_cloud/models/image.rb +30 -40
  60. data/lib/aspose_slides_cloud/models/image_export_options.rb +33 -32
  61. data/lib/aspose_slides_cloud/models/images.rb +30 -40
  62. data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +22 -10
  63. data/lib/aspose_slides_cloud/models/input.rb +22 -10
  64. data/lib/aspose_slides_cloud/models/input_file.rb +22 -10
  65. data/lib/aspose_slides_cloud/models/interactive_sequence.rb +22 -10
  66. data/lib/aspose_slides_cloud/models/layout_slide.rb +30 -40
  67. data/lib/aspose_slides_cloud/models/layout_slides.rb +30 -40
  68. data/lib/aspose_slides_cloud/models/legend.rb +22 -10
  69. data/lib/aspose_slides_cloud/models/line_format.rb +22 -10
  70. data/lib/aspose_slides_cloud/models/master_slide.rb +30 -40
  71. data/lib/aspose_slides_cloud/models/master_slides.rb +30 -40
  72. data/lib/aspose_slides_cloud/models/merge.rb +31 -48
  73. data/lib/aspose_slides_cloud/models/merging_source.rb +22 -10
  74. data/lib/aspose_slides_cloud/models/no_fill.rb +29 -46
  75. data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +217 -0
  76. data/lib/aspose_slides_cloud/models/notes_slide.rb +30 -40
  77. data/lib/aspose_slides_cloud/models/object_exist.rb +22 -10
  78. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +32 -218
  79. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +30 -20
  80. data/lib/aspose_slides_cloud/models/one_value_series.rb +31 -211
  81. data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +22 -10
  82. data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +22 -10
  83. data/lib/aspose_slides_cloud/models/output_file.rb +22 -10
  84. data/lib/aspose_slides_cloud/models/paragraph.rb +30 -40
  85. data/lib/aspose_slides_cloud/models/paragraphs.rb +30 -40
  86. data/lib/aspose_slides_cloud/models/path_input_file.rb +31 -57
  87. data/lib/aspose_slides_cloud/models/path_output_file.rb +31 -48
  88. data/lib/aspose_slides_cloud/models/pattern_fill.rb +31 -48
  89. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +63 -35
  90. data/lib/aspose_slides_cloud/models/picture_fill.rb +31 -48
  91. data/lib/aspose_slides_cloud/models/picture_frame.rb +32 -244
  92. data/lib/aspose_slides_cloud/models/pipeline.rb +22 -10
  93. data/lib/aspose_slides_cloud/models/placeholder.rb +30 -40
  94. data/lib/aspose_slides_cloud/models/placeholders.rb +30 -40
  95. data/lib/aspose_slides_cloud/models/plot_area.rb +22 -10
  96. data/lib/aspose_slides_cloud/models/portion.rb +30 -40
  97. data/lib/aspose_slides_cloud/models/portions.rb +36 -46
  98. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +33 -32
  99. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +22 -10
  100. data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +22 -10
  101. data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +22 -10
  102. data/lib/aspose_slides_cloud/models/reflection_effect.rb +22 -10
  103. data/lib/aspose_slides_cloud/models/remove_shape.rb +31 -48
  104. data/lib/aspose_slides_cloud/models/remove_slide.rb +31 -48
  105. data/lib/aspose_slides_cloud/models/reorder_slide.rb +31 -48
  106. data/lib/aspose_slides_cloud/models/replace_text.rb +31 -48
  107. data/lib/aspose_slides_cloud/models/request_input_file.rb +31 -57
  108. data/lib/aspose_slides_cloud/models/reset_slide.rb +31 -48
  109. data/lib/aspose_slides_cloud/models/resource_base.rb +22 -10
  110. data/lib/aspose_slides_cloud/models/resource_uri.rb +22 -10
  111. data/lib/aspose_slides_cloud/models/resource_uri_element.rb +22 -10
  112. data/lib/aspose_slides_cloud/models/response_output_file.rb +29 -46
  113. data/lib/aspose_slides_cloud/models/save.rb +33 -50
  114. data/lib/aspose_slides_cloud/models/save_shape.rb +31 -48
  115. data/lib/aspose_slides_cloud/models/save_slide.rb +33 -50
  116. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +30 -20
  117. data/lib/aspose_slides_cloud/models/scatter_series.rb +31 -211
  118. data/lib/aspose_slides_cloud/models/series.rb +47 -14
  119. data/lib/aspose_slides_cloud/models/series_marker.rb +22 -10
  120. data/lib/aspose_slides_cloud/models/shape.rb +31 -242
  121. data/lib/aspose_slides_cloud/models/shape_base.rb +30 -40
  122. data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +22 -10
  123. data/lib/aspose_slides_cloud/models/shapes.rb +30 -40
  124. data/lib/aspose_slides_cloud/models/slide.rb +30 -40
  125. data/lib/aspose_slides_cloud/models/slide_animation.rb +30 -40
  126. data/lib/aspose_slides_cloud/models/slide_background.rb +30 -40
  127. data/lib/aspose_slides_cloud/models/slide_comment.rb +22 -10
  128. data/lib/aspose_slides_cloud/models/slide_comments.rb +30 -40
  129. data/lib/aspose_slides_cloud/models/slide_export_format.rb +1 -0
  130. data/lib/aspose_slides_cloud/models/slide_replace_result.rb +30 -154
  131. data/lib/aspose_slides_cloud/models/slides.rb +30 -40
  132. data/lib/aspose_slides_cloud/models/smart_art.rb +32 -218
  133. data/lib/aspose_slides_cloud/models/smart_art_node.rb +22 -10
  134. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +31 -217
  135. data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +22 -10
  136. data/lib/aspose_slides_cloud/models/solid_fill.rb +31 -48
  137. data/lib/aspose_slides_cloud/models/split_document_result.rb +30 -40
  138. data/lib/aspose_slides_cloud/models/storage_exist.rb +22 -10
  139. data/lib/aspose_slides_cloud/models/storage_file.rb +22 -10
  140. data/lib/aspose_slides_cloud/models/svg_export_options.rb +33 -32
  141. data/lib/aspose_slides_cloud/models/swf_export_options.rb +33 -32
  142. data/lib/aspose_slides_cloud/models/table.rb +32 -218
  143. data/lib/aspose_slides_cloud/models/table_cell.rb +22 -10
  144. data/lib/aspose_slides_cloud/models/table_column.rb +22 -10
  145. data/lib/aspose_slides_cloud/models/table_row.rb +22 -10
  146. data/lib/aspose_slides_cloud/models/task.rb +22 -10
  147. data/lib/aspose_slides_cloud/models/text_item.rb +22 -10
  148. data/lib/aspose_slides_cloud/models/text_items.rb +30 -40
  149. data/lib/aspose_slides_cloud/models/theme.rb +30 -40
  150. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +33 -32
  151. data/lib/aspose_slides_cloud/models/update_background.rb +31 -48
  152. data/lib/aspose_slides_cloud/models/update_shape.rb +31 -48
  153. data/lib/aspose_slides_cloud/models/video_frame.rb +32 -244
  154. data/lib/aspose_slides_cloud/models/view_properties.rb +357 -0
  155. data/lib/aspose_slides_cloud/models/waterfall_series.rb +247 -0
  156. data/lib/aspose_slides_cloud/models/xps_export_options.rb +33 -32
  157. data/lib/aspose_slides_cloud/type_registry.rb +313 -0
  158. data/lib/aspose_slides_cloud/version.rb +1 -1
  159. data/spec/api/slides_api_spec.rb +20595 -14073
  160. data/spec/extra/extra_spec.rb +155 -20
  161. data/spec/spec_utils.rb +8 -1
  162. data/testRules.json +111 -8
  163. metadata +11 -2
@@ -0,0 +1,261 @@
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 chart category resource
27
+ class ChartCategory
28
+ # Gets or sets the categories for chart data
29
+ attr_accessor :categories
30
+
31
+ # Category value
32
+ attr_accessor :value
33
+
34
+ # Get or sets the fill format.
35
+ attr_accessor :fill_format
36
+
37
+ # Get or sets the effect format.
38
+ attr_accessor :effect_format
39
+
40
+ # Get or sets the line format.
41
+ attr_accessor :line_format
42
+
43
+ # Gets or sets the data points for chart data
44
+ attr_accessor :data_points
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'categories' => :'Categories',
50
+ :'value' => :'Value',
51
+ :'fill_format' => :'FillFormat',
52
+ :'effect_format' => :'EffectFormat',
53
+ :'line_format' => :'LineFormat',
54
+ :'data_points' => :'DataPoints',
55
+ }
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.swagger_types
60
+ {
61
+ :'categories' => :'Array<ChartCategory>',
62
+ :'value' => :'String',
63
+ :'fill_format' => :'FillFormat',
64
+ :'effect_format' => :'EffectFormat',
65
+ :'line_format' => :'LineFormat',
66
+ :'data_points' => :'Array<OneValueChartDataPoint>',
67
+ }
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ return unless attributes.is_a?(Hash)
74
+
75
+ # convert string to symbol for hash key
76
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
77
+
78
+ if attributes.has_key?(:'Categories')
79
+ if (value = attributes[:'Categories']).is_a?(Array)
80
+ self.categories = value
81
+ end
82
+ end
83
+
84
+ if attributes.has_key?(:'Value')
85
+ self.value = attributes[:'Value']
86
+ end
87
+
88
+ if attributes.has_key?(:'FillFormat')
89
+ self.fill_format = attributes[:'FillFormat']
90
+ end
91
+
92
+ if attributes.has_key?(:'EffectFormat')
93
+ self.effect_format = attributes[:'EffectFormat']
94
+ end
95
+
96
+ if attributes.has_key?(:'LineFormat')
97
+ self.line_format = attributes[:'LineFormat']
98
+ end
99
+
100
+ if attributes.has_key?(:'DataPoints')
101
+ if (value = attributes[:'DataPoints']).is_a?(Array)
102
+ self.data_points = value
103
+ end
104
+ end
105
+ end
106
+
107
+ # Show invalid properties with the reasons. Usually used together with valid?
108
+ # @return Array for valid properties with the reasons
109
+ def list_invalid_properties
110
+ invalid_properties = Array.new
111
+ invalid_properties
112
+ end
113
+
114
+ # Check to see if the all the properties in the model are valid
115
+ # @return true if the model is valid
116
+ def valid?
117
+ true
118
+ end
119
+
120
+ # Checks equality by comparing each attribute.
121
+ # @param [Object] Object to be compared
122
+ def ==(o)
123
+ return true if self.equal?(o)
124
+ self.class == o.class &&
125
+ categories == o.categories &&
126
+ value == o.value &&
127
+ fill_format == o.fill_format &&
128
+ effect_format == o.effect_format &&
129
+ line_format == o.line_format &&
130
+ data_points == o.data_points
131
+ end
132
+
133
+ # @see the `==` method
134
+ # @param [Object] Object to be compared
135
+ def eql?(o)
136
+ self == o
137
+ end
138
+
139
+ # Calculates hash code according to all attributes.
140
+ # @return [Fixnum] Hash code
141
+ def hash
142
+ [categories, value, fill_format, effect_format, line_format, data_points].hash
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def build_from_hash(attributes)
149
+ return nil unless attributes.is_a?(Hash)
150
+ self.class.swagger_types.each_pair do |key, type|
151
+ mapKey = self.class.attribute_map[key]
152
+ if !mapKey.nil?
153
+ val = attributes[mapKey]
154
+ if val.nil?
155
+ mapKeyString = mapKey.to_s
156
+ mapKeyString[0] = mapKeyString[0].downcase
157
+ mapKey = mapKeyString.to_sym
158
+ val = attributes[mapKey]
159
+ end
160
+ if !val.nil?
161
+ if type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the the attribute
163
+ # is documented as an array but the input is not
164
+ if val.is_a?(Array)
165
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
166
+ end
167
+ else
168
+ self.send("#{key}=", _deserialize(type, val))
169
+ end
170
+ end
171
+ end
172
+ end
173
+
174
+ self
175
+ end
176
+
177
+ # Deserializes the data based on type
178
+ # @param string type Data type
179
+ # @param string value Value to be deserialized
180
+ # @return [Object] Deserialized data
181
+ def _deserialize(type, value)
182
+ case type.to_sym
183
+ when :DateTime
184
+ DateTime.parse(value)
185
+ when :Date
186
+ Date.parse(value)
187
+ when :String
188
+ value.to_s
189
+ when :Integer
190
+ value.to_i
191
+ when :Float
192
+ value.to_f
193
+ when :BOOLEAN
194
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
195
+ true
196
+ else
197
+ false
198
+ end
199
+ when :Object
200
+ # generic object (usually a Hash), return directly
201
+ value
202
+ when /\AArray<(?<inner_type>.+)>\z/
203
+ inner_type = Regexp.last_match[:inner_type]
204
+ value.map { |v| _deserialize(inner_type, v) }
205
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
206
+ k_type = Regexp.last_match[:k_type]
207
+ v_type = Regexp.last_match[:v_type]
208
+ {}.tap do |hash|
209
+ value.each do |k, v|
210
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
211
+ end
212
+ end
213
+ else # model
214
+ temp_model = AsposeSlidesCloud.const_get(type).new
215
+ temp_model.build_from_hash(value)
216
+ end
217
+ end
218
+
219
+ # Returns the string representation of the object
220
+ # @return [String] String presentation of the object
221
+ def to_s
222
+ to_hash.to_s
223
+ end
224
+
225
+ # to_body is an alias to to_hash (backward compatibility)
226
+ # @return [Hash] Returns the object in the form of hash
227
+ def to_body
228
+ to_hash
229
+ end
230
+
231
+ # Returns the object in the form of hash
232
+ # @return [Hash] Returns the object in the form of hash
233
+ def to_hash
234
+ hash = {}
235
+ self.class.attribute_map.each_pair do |attr, param|
236
+ value = self.send(attr)
237
+ next if value.nil?
238
+ hash[param] = _to_hash(value)
239
+ end
240
+ hash
241
+ end
242
+
243
+ # Outputs non-array value in the form of hash
244
+ # For object, use to_hash. Otherwise, just return the value
245
+ # @param [Object] value Any valid value
246
+ # @return [Hash] Returns the value in the form of hash
247
+ def _to_hash(value)
248
+ if value.is_a?(Array)
249
+ value.compact.map { |v| _to_hash(v) }
250
+ elsif value.is_a?(Hash)
251
+ {}.tap do |hash|
252
+ value.each { |k, v| hash[k] = _to_hash(v) }
253
+ end
254
+ elsif value.respond_to? :to_hash
255
+ value.to_hash
256
+ else
257
+ value
258
+ end
259
+ end
260
+ end
261
+ end
@@ -35,7 +35,7 @@ module AsposeSlidesCloud
35
35
  def self.attribute_map
36
36
  {
37
37
  :'text' => :'Text',
38
- :'has_title' => :'HasTitle'
38
+ :'has_title' => :'HasTitle',
39
39
  }
40
40
  end
41
41
 
@@ -43,7 +43,7 @@ module AsposeSlidesCloud
43
43
  def self.swagger_types
44
44
  {
45
45
  :'text' => :'String',
46
- :'has_title' => :'BOOLEAN'
46
+ :'has_title' => :'BOOLEAN',
47
47
  }
48
48
  end
49
49
 
@@ -109,15 +109,27 @@ module AsposeSlidesCloud
109
109
  def build_from_hash(attributes)
110
110
  return nil unless attributes.is_a?(Hash)
111
111
  self.class.swagger_types.each_pair do |key, type|
112
- if type =~ /\AArray<(.*)>/i
113
- # check to ensure the input is an array given that the the attribute
114
- # is documented as an array but the input is not
115
- if attributes[self.class.attribute_map[key]].is_a?(Array)
116
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
112
+ mapKey = self.class.attribute_map[key]
113
+ if !mapKey.nil?
114
+ val = attributes[mapKey]
115
+ if val.nil?
116
+ mapKeyString = mapKey.to_s
117
+ mapKeyString[0] = mapKeyString[0].downcase
118
+ mapKey = mapKeyString.to_sym
119
+ val = attributes[mapKey]
117
120
  end
118
- elsif !attributes[self.class.attribute_map[key]].nil?
119
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
- end # or else data not found in attributes(hash), not an issue as the data can be optional
121
+ if !val.nil?
122
+ if type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the the attribute
124
+ # is documented as an array but the input is not
125
+ if val.is_a?(Array)
126
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
127
+ end
128
+ else
129
+ self.send("#{key}=", _deserialize(type, val))
130
+ end
131
+ end
132
+ end
121
133
  end
122
134
 
123
135
  self
@@ -69,7 +69,7 @@ module AsposeSlidesCloud
69
69
  :'effect_format' => :'EffectFormat',
70
70
  :'line_format' => :'LineFormat',
71
71
  :'thickness' => :'Thickness',
72
- :'picture_type' => :'PictureType'
72
+ :'picture_type' => :'PictureType',
73
73
  }
74
74
  end
75
75
 
@@ -80,7 +80,7 @@ module AsposeSlidesCloud
80
80
  :'effect_format' => :'EffectFormat',
81
81
  :'line_format' => :'LineFormat',
82
82
  :'thickness' => :'Integer',
83
- :'picture_type' => :'String'
83
+ :'picture_type' => :'String',
84
84
  }
85
85
  end
86
86
 
@@ -168,15 +168,27 @@ module AsposeSlidesCloud
168
168
  def build_from_hash(attributes)
169
169
  return nil unless attributes.is_a?(Hash)
170
170
  self.class.swagger_types.each_pair do |key, type|
171
- if type =~ /\AArray<(.*)>/i
172
- # check to ensure the input is an array given that the the attribute
173
- # is documented as an array but the input is not
174
- if attributes[self.class.attribute_map[key]].is_a?(Array)
175
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
171
+ mapKey = self.class.attribute_map[key]
172
+ if !mapKey.nil?
173
+ val = attributes[mapKey]
174
+ if val.nil?
175
+ mapKeyString = mapKey.to_s
176
+ mapKeyString[0] = mapKeyString[0].downcase
177
+ mapKey = mapKeyString.to_sym
178
+ val = attributes[mapKey]
176
179
  end
177
- elsif !attributes[self.class.attribute_map[key]].nil?
178
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
179
- end # or else data not found in attributes(hash), not an issue as the data can be optional
180
+ if !val.nil?
181
+ if type =~ /\AArray<(.*)>/i
182
+ # check to ensure the input is an array given that the the attribute
183
+ # is documented as an array but the input is not
184
+ if val.is_a?(Array)
185
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
186
+ end
187
+ else
188
+ self.send("#{key}=", _deserialize(type, val))
189
+ end
190
+ end
191
+ end
180
192
  end
181
193
 
182
194
  self
@@ -24,13 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Slide's color scheme DTO
27
- class ColorScheme
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 ColorScheme < ResourceBase
34
28
  # First accent color.
35
29
  attr_accessor :accent1
36
30
 
@@ -69,9 +63,7 @@ module AsposeSlidesCloud
69
63
 
70
64
  # Attribute mapping from ruby-style variable name to JSON key.
71
65
  def self.attribute_map
72
- {
73
- :'self_uri' => :'SelfUri',
74
- :'alternate_links' => :'AlternateLinks',
66
+ super.merge({
75
67
  :'accent1' => :'Accent1',
76
68
  :'accent2' => :'Accent2',
77
69
  :'accent3' => :'Accent3',
@@ -83,15 +75,13 @@ module AsposeSlidesCloud
83
75
  :'followed_hyperlink' => :'FollowedHyperlink',
84
76
  :'hyperlink' => :'Hyperlink',
85
77
  :'light1' => :'Light1',
86
- :'light2' => :'Light2'
87
- }
78
+ :'light2' => :'Light2',
79
+ })
88
80
  end
89
81
 
90
82
  # Attribute type mapping.
91
83
  def self.swagger_types
92
- {
93
- :'self_uri' => :'ResourceUri',
94
- :'alternate_links' => :'Array<ResourceUri>',
84
+ super.merge({
95
85
  :'accent1' => :'String',
96
86
  :'accent2' => :'String',
97
87
  :'accent3' => :'String',
@@ -103,27 +93,14 @@ module AsposeSlidesCloud
103
93
  :'followed_hyperlink' => :'String',
104
94
  :'hyperlink' => :'String',
105
95
  :'light1' => :'String',
106
- :'light2' => :'String'
107
- }
96
+ :'light2' => :'String',
97
+ })
108
98
  end
109
99
 
110
100
  # Initializes the object
111
101
  # @param [Hash] attributes Model attributes in the form of hash
112
102
  def initialize(attributes = {})
113
- return unless attributes.is_a?(Hash)
114
-
115
- # convert string to symbol for hash key
116
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
117
-
118
- if attributes.has_key?(:'SelfUri')
119
- self.self_uri = attributes[:'SelfUri']
120
- end
121
-
122
- if attributes.has_key?(:'AlternateLinks')
123
- if (value = attributes[:'AlternateLinks']).is_a?(Array)
124
- self.alternate_links = value
125
- end
126
- end
103
+ super
127
104
 
128
105
  if attributes.has_key?(:'Accent1')
129
106
  self.accent1 = attributes[:'Accent1']
@@ -177,13 +154,14 @@ module AsposeSlidesCloud
177
154
  # Show invalid properties with the reasons. Usually used together with valid?
178
155
  # @return Array for valid properties with the reasons
179
156
  def list_invalid_properties
180
- invalid_properties = Array.new
157
+ invalid_properties = super
181
158
  invalid_properties
182
159
  end
183
160
 
184
161
  # Check to see if the all the properties in the model are valid
185
162
  # @return true if the model is valid
186
163
  def valid?
164
+ return false if !super
187
165
  true
188
166
  end
189
167
 
@@ -226,15 +204,27 @@ module AsposeSlidesCloud
226
204
  def build_from_hash(attributes)
227
205
  return nil unless attributes.is_a?(Hash)
228
206
  self.class.swagger_types.each_pair do |key, type|
229
- if type =~ /\AArray<(.*)>/i
230
- # check to ensure the input is an array given that the the attribute
231
- # is documented as an array but the input is not
232
- if attributes[self.class.attribute_map[key]].is_a?(Array)
233
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
207
+ mapKey = self.class.attribute_map[key]
208
+ if !mapKey.nil?
209
+ val = attributes[mapKey]
210
+ if val.nil?
211
+ mapKeyString = mapKey.to_s
212
+ mapKeyString[0] = mapKeyString[0].downcase
213
+ mapKey = mapKeyString.to_sym
214
+ val = attributes[mapKey]
234
215
  end
235
- elsif !attributes[self.class.attribute_map[key]].nil?
236
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
237
- end # or else data not found in attributes(hash), not an issue as the data can be optional
216
+ if !val.nil?
217
+ if type =~ /\AArray<(.*)>/i
218
+ # check to ensure the input is an array given that the the attribute
219
+ # is documented as an array but the input is not
220
+ if val.is_a?(Array)
221
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
222
+ end
223
+ else
224
+ self.send("#{key}=", _deserialize(type, val))
225
+ end
226
+ end
227
+ end
238
228
  end
239
229
 
240
230
  self