aspose_slides_cloud 20.6.0 → 21.1.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/TestData/test-unprotected.pptx +0 -0
  6. data/TestData/test.pptx +0 -0
  7. data/lib/aspose_slides_cloud.rb +13 -5
  8. data/lib/aspose_slides_cloud/api/slides_api.rb +2432 -691
  9. data/lib/aspose_slides_cloud/api/slides_api_requests.rb +609 -31
  10. data/lib/aspose_slides_cloud/api_client.rb +30 -24
  11. data/lib/aspose_slides_cloud/configuration.rb +7 -2
  12. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +31 -48
  13. data/lib/aspose_slides_cloud/models/add_master_slide.rb +31 -48
  14. data/lib/aspose_slides_cloud/models/add_shape.rb +31 -48
  15. data/lib/aspose_slides_cloud/models/add_slide.rb +31 -48
  16. data/lib/aspose_slides_cloud/models/api_info.rb +22 -10
  17. data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +22 -10
  18. data/lib/aspose_slides_cloud/models/audio_frame.rb +32 -246
  19. data/lib/aspose_slides_cloud/models/axes.rb +22 -10
  20. data/lib/aspose_slides_cloud/models/axis.rb +22 -10
  21. data/lib/aspose_slides_cloud/models/base64_input_file.rb +31 -57
  22. data/lib/aspose_slides_cloud/models/blur_effect.rb +22 -10
  23. data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +31 -222
  24. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +30 -48
  25. data/lib/aspose_slides_cloud/models/bubble_series.rb +31 -211
  26. data/lib/aspose_slides_cloud/models/chart.rb +32 -220
  27. data/lib/aspose_slides_cloud/models/chart_category.rb +54 -20
  28. data/lib/aspose_slides_cloud/models/chart_title.rb +22 -10
  29. data/lib/aspose_slides_cloud/models/chart_wall.rb +22 -10
  30. data/lib/aspose_slides_cloud/models/color_scheme.rb +30 -40
  31. data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +22 -10
  32. data/lib/aspose_slides_cloud/models/connector.rb +32 -244
  33. data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +22 -10
  34. data/lib/aspose_slides_cloud/models/{resource_uri_element.rb → data_point.rb} +24 -22
  35. data/lib/aspose_slides_cloud/models/disc_usage.rb +22 -10
  36. data/lib/aspose_slides_cloud/models/document.rb +35 -45
  37. data/lib/aspose_slides_cloud/models/document_properties.rb +30 -40
  38. data/lib/aspose_slides_cloud/models/document_property.rb +30 -40
  39. data/lib/aspose_slides_cloud/models/document_replace_result.rb +30 -94
  40. data/lib/aspose_slides_cloud/models/effect.rb +22 -10
  41. data/lib/aspose_slides_cloud/models/effect_format.rb +22 -10
  42. data/lib/aspose_slides_cloud/models/entity_exists.rb +212 -0
  43. data/lib/aspose_slides_cloud/models/error.rb +22 -10
  44. data/lib/aspose_slides_cloud/models/error_details.rb +22 -10
  45. data/lib/aspose_slides_cloud/models/export_options.rb +33 -11
  46. data/lib/aspose_slides_cloud/models/file_version.rb +30 -75
  47. data/lib/aspose_slides_cloud/models/file_versions.rb +22 -10
  48. data/lib/aspose_slides_cloud/models/files_list.rb +22 -10
  49. data/lib/aspose_slides_cloud/models/files_upload_result.rb +22 -10
  50. data/lib/aspose_slides_cloud/models/fill_format.rb +22 -10
  51. data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +22 -10
  52. data/lib/aspose_slides_cloud/models/font_scheme.rb +30 -40
  53. data/lib/aspose_slides_cloud/models/font_set.rb +22 -10
  54. data/lib/aspose_slides_cloud/models/format_scheme.rb +30 -40
  55. data/lib/aspose_slides_cloud/models/geometry_shape.rb +33 -212
  56. data/lib/aspose_slides_cloud/models/glow_effect.rb +22 -10
  57. data/lib/aspose_slides_cloud/models/gradient_fill.rb +31 -48
  58. data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +22 -10
  59. data/lib/aspose_slides_cloud/models/graphical_object.rb +31 -219
  60. data/lib/aspose_slides_cloud/models/group_shape.rb +31 -219
  61. data/lib/aspose_slides_cloud/models/header_footer.rb +247 -0
  62. data/lib/aspose_slides_cloud/models/html_export_options.rb +33 -32
  63. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +22 -20
  64. data/lib/aspose_slides_cloud/models/image.rb +30 -40
  65. data/lib/aspose_slides_cloud/models/image_export_options.rb +33 -32
  66. data/lib/aspose_slides_cloud/models/images.rb +30 -40
  67. data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +22 -10
  68. data/lib/aspose_slides_cloud/models/input.rb +22 -10
  69. data/lib/aspose_slides_cloud/models/input_file.rb +22 -10
  70. data/lib/aspose_slides_cloud/models/interactive_sequence.rb +22 -10
  71. data/lib/aspose_slides_cloud/models/layout_slide.rb +31 -41
  72. data/lib/aspose_slides_cloud/models/layout_slides.rb +30 -40
  73. data/lib/aspose_slides_cloud/models/legend.rb +22 -10
  74. data/lib/aspose_slides_cloud/models/line_format.rb +22 -10
  75. data/lib/aspose_slides_cloud/models/master_slide.rb +31 -41
  76. data/lib/aspose_slides_cloud/models/master_slides.rb +30 -40
  77. data/lib/aspose_slides_cloud/models/merge.rb +31 -48
  78. data/lib/aspose_slides_cloud/models/merging_source.rb +22 -10
  79. data/lib/aspose_slides_cloud/models/no_fill.rb +29 -46
  80. data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +22 -10
  81. data/lib/aspose_slides_cloud/models/notes_slide.rb +30 -40
  82. data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +267 -0
  83. data/lib/aspose_slides_cloud/models/object_exist.rb +22 -10
  84. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +32 -220
  85. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +30 -20
  86. data/lib/aspose_slides_cloud/models/one_value_series.rb +31 -211
  87. data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +22 -10
  88. data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +22 -10
  89. data/lib/aspose_slides_cloud/models/output_file.rb +22 -10
  90. data/lib/aspose_slides_cloud/models/paragraph.rb +30 -40
  91. data/lib/aspose_slides_cloud/models/paragraphs.rb +30 -40
  92. data/lib/aspose_slides_cloud/models/path_input_file.rb +31 -57
  93. data/lib/aspose_slides_cloud/models/path_output_file.rb +31 -48
  94. data/lib/aspose_slides_cloud/models/pattern_fill.rb +31 -48
  95. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +33 -32
  96. data/lib/aspose_slides_cloud/models/picture_fill.rb +32 -49
  97. data/lib/aspose_slides_cloud/models/picture_frame.rb +32 -246
  98. data/lib/aspose_slides_cloud/models/pipeline.rb +22 -10
  99. data/lib/aspose_slides_cloud/models/placeholder.rb +30 -40
  100. data/lib/aspose_slides_cloud/models/placeholders.rb +30 -40
  101. data/lib/aspose_slides_cloud/models/plot_area.rb +22 -10
  102. data/lib/aspose_slides_cloud/models/portion.rb +30 -40
  103. data/lib/aspose_slides_cloud/models/portions.rb +36 -46
  104. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +33 -32
  105. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +22 -10
  106. data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +22 -10
  107. data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +22 -10
  108. data/lib/aspose_slides_cloud/models/reflection_effect.rb +22 -10
  109. data/lib/aspose_slides_cloud/models/remove_shape.rb +31 -48
  110. data/lib/aspose_slides_cloud/models/remove_slide.rb +31 -48
  111. data/lib/aspose_slides_cloud/models/reorder_slide.rb +31 -48
  112. data/lib/aspose_slides_cloud/models/replace_text.rb +31 -48
  113. data/lib/aspose_slides_cloud/models/request_input_file.rb +31 -57
  114. data/lib/aspose_slides_cloud/models/reset_slide.rb +31 -48
  115. data/lib/aspose_slides_cloud/models/resource_base.rb +22 -10
  116. data/lib/aspose_slides_cloud/models/resource_uri.rb +22 -10
  117. data/lib/aspose_slides_cloud/models/response_output_file.rb +29 -46
  118. data/lib/aspose_slides_cloud/models/save.rb +31 -48
  119. data/lib/aspose_slides_cloud/models/save_shape.rb +31 -48
  120. data/lib/aspose_slides_cloud/models/save_slide.rb +31 -48
  121. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +30 -20
  122. data/lib/aspose_slides_cloud/models/scatter_series.rb +31 -211
  123. data/lib/aspose_slides_cloud/models/section.rb +234 -0
  124. data/lib/aspose_slides_cloud/models/sections.rb +209 -0
  125. data/lib/aspose_slides_cloud/models/series.rb +45 -12
  126. data/lib/aspose_slides_cloud/models/series_marker.rb +22 -10
  127. data/lib/aspose_slides_cloud/models/shape.rb +32 -244
  128. data/lib/aspose_slides_cloud/models/shape_base.rb +31 -62
  129. data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +22 -10
  130. data/lib/aspose_slides_cloud/models/shapes.rb +30 -40
  131. data/lib/aspose_slides_cloud/models/slide.rb +37 -47
  132. data/lib/aspose_slides_cloud/models/slide_animation.rb +30 -40
  133. data/lib/aspose_slides_cloud/models/slide_background.rb +30 -40
  134. data/lib/aspose_slides_cloud/models/slide_comment.rb +22 -10
  135. data/lib/aspose_slides_cloud/models/slide_comments.rb +30 -40
  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 +324 -0
  165. data/lib/aspose_slides_cloud/version.rb +1 -1
  166. data/spec/api/slides_api_spec.rb +22294 -14411
  167. data/spec/extra/extra_spec.rb +156 -22
  168. data/spec/spec_utils.rb +15 -4
  169. data/testConfig.json +2 -2
  170. data/testRules.json +141 -73
  171. metadata +14 -3
@@ -35,7 +35,7 @@ module AsposeSlidesCloud
35
35
  def self.attribute_map
36
36
  {
37
37
  :'input' => :'Input',
38
- :'tasks' => :'Tasks'
38
+ :'tasks' => :'Tasks',
39
39
  }
40
40
  end
41
41
 
@@ -43,7 +43,7 @@ module AsposeSlidesCloud
43
43
  def self.swagger_types
44
44
  {
45
45
  :'input' => :'Input',
46
- :'tasks' => :'Array<Task>'
46
+ :'tasks' => :'Array<Task>',
47
47
  }
48
48
  end
49
49
 
@@ -106,15 +106,27 @@ module AsposeSlidesCloud
106
106
  def build_from_hash(attributes)
107
107
  return nil unless attributes.is_a?(Hash)
108
108
  self.class.swagger_types.each_pair do |key, type|
109
- if type =~ /\AArray<(.*)>/i
110
- # check to ensure the input is an array given that the the attribute
111
- # is documented as an array but the input is not
112
- if attributes[self.class.attribute_map[key]].is_a?(Array)
113
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
109
+ mapKey = self.class.attribute_map[key]
110
+ if !mapKey.nil?
111
+ val = attributes[mapKey]
112
+ if val.nil?
113
+ mapKeyString = mapKey.to_s
114
+ mapKeyString[0] = mapKeyString[0].downcase
115
+ mapKey = mapKeyString.to_sym
116
+ val = attributes[mapKey]
114
117
  end
115
- elsif !attributes[self.class.attribute_map[key]].nil?
116
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
117
- end # or else data not found in attributes(hash), not an issue as the data can be optional
118
+ if !val.nil?
119
+ if type =~ /\AArray<(.*)>/i
120
+ # check to ensure the input is an array given that the the attribute
121
+ # is documented as an array but the input is not
122
+ if val.is_a?(Array)
123
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
124
+ end
125
+ else
126
+ self.send("#{key}=", _deserialize(type, val))
127
+ end
128
+ end
129
+ end
118
130
  end
119
131
 
120
132
  self
@@ -24,13 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Represents placeholder
27
- class Placeholder
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 Placeholder < ResourceBase
34
28
  # Index.
35
29
  attr_accessor :index
36
30
 
@@ -70,47 +64,30 @@ module AsposeSlidesCloud
70
64
 
71
65
  # Attribute mapping from ruby-style variable name to JSON key.
72
66
  def self.attribute_map
73
- {
74
- :'self_uri' => :'SelfUri',
75
- :'alternate_links' => :'AlternateLinks',
67
+ super.merge({
76
68
  :'index' => :'Index',
77
69
  :'orientation' => :'Orientation',
78
70
  :'size' => :'Size',
79
71
  :'type' => :'Type',
80
- :'shape' => :'Shape'
81
- }
72
+ :'shape' => :'Shape',
73
+ })
82
74
  end
83
75
 
84
76
  # Attribute type mapping.
85
77
  def self.swagger_types
86
- {
87
- :'self_uri' => :'ResourceUri',
88
- :'alternate_links' => :'Array<ResourceUri>',
78
+ super.merge({
89
79
  :'index' => :'Integer',
90
80
  :'orientation' => :'String',
91
81
  :'size' => :'String',
92
82
  :'type' => :'String',
93
- :'shape' => :'ResourceUriElement'
94
- }
83
+ :'shape' => :'ResourceUri',
84
+ })
95
85
  end
96
86
 
97
87
  # Initializes the object
98
88
  # @param [Hash] attributes Model attributes in the form of hash
99
89
  def initialize(attributes = {})
100
- return unless attributes.is_a?(Hash)
101
-
102
- # convert string to symbol for hash key
103
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
104
-
105
- if attributes.has_key?(:'SelfUri')
106
- self.self_uri = attributes[:'SelfUri']
107
- end
108
-
109
- if attributes.has_key?(:'AlternateLinks')
110
- if (value = attributes[:'AlternateLinks']).is_a?(Array)
111
- self.alternate_links = value
112
- end
113
- end
90
+ super
114
91
 
115
92
  if attributes.has_key?(:'Index')
116
93
  self.index = attributes[:'Index']
@@ -136,7 +113,7 @@ module AsposeSlidesCloud
136
113
  # Show invalid properties with the reasons. Usually used together with valid?
137
114
  # @return Array for valid properties with the reasons
138
115
  def list_invalid_properties
139
- invalid_properties = Array.new
116
+ invalid_properties = super
140
117
  if @index.nil?
141
118
  invalid_properties.push('invalid value for "index", index cannot be nil.')
142
119
  end
@@ -159,6 +136,7 @@ module AsposeSlidesCloud
159
136
  # Check to see if the all the properties in the model are valid
160
137
  # @return true if the model is valid
161
138
  def valid?
139
+ return false if !super
162
140
  return false if @index.nil?
163
141
  return false if @orientation.nil?
164
142
  orientation_validator = EnumAttributeValidator.new('String', ['Horizontal', 'Vertical'])
@@ -234,15 +212,27 @@ module AsposeSlidesCloud
234
212
  def build_from_hash(attributes)
235
213
  return nil unless attributes.is_a?(Hash)
236
214
  self.class.swagger_types.each_pair do |key, type|
237
- if type =~ /\AArray<(.*)>/i
238
- # check to ensure the input is an array given that the the attribute
239
- # is documented as an array but the input is not
240
- if attributes[self.class.attribute_map[key]].is_a?(Array)
241
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
215
+ mapKey = self.class.attribute_map[key]
216
+ if !mapKey.nil?
217
+ val = attributes[mapKey]
218
+ if val.nil?
219
+ mapKeyString = mapKey.to_s
220
+ mapKeyString[0] = mapKeyString[0].downcase
221
+ mapKey = mapKeyString.to_sym
222
+ val = attributes[mapKey]
242
223
  end
243
- elsif !attributes[self.class.attribute_map[key]].nil?
244
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
245
- end # or else data not found in attributes(hash), not an issue as the data can be optional
224
+ if !val.nil?
225
+ if type =~ /\AArray<(.*)>/i
226
+ # check to ensure the input is an array given that the the attribute
227
+ # is documented as an array but the input is not
228
+ if val.is_a?(Array)
229
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
230
+ end
231
+ else
232
+ self.send("#{key}=", _deserialize(type, val))
233
+ end
234
+ end
235
+ end
246
236
  end
247
237
 
248
238
  self
@@ -24,51 +24,28 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Placeholder list.
27
- class Placeholders
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 Placeholders < ResourceBase
34
28
  # List for placeholder links.
35
29
  attr_accessor :placeholder_links
36
30
 
37
31
  # Attribute mapping from ruby-style variable name to JSON key.
38
32
  def self.attribute_map
39
- {
40
- :'self_uri' => :'SelfUri',
41
- :'alternate_links' => :'AlternateLinks',
42
- :'placeholder_links' => :'PlaceholderLinks'
43
- }
33
+ super.merge({
34
+ :'placeholder_links' => :'PlaceholderLinks',
35
+ })
44
36
  end
45
37
 
46
38
  # Attribute type mapping.
47
39
  def self.swagger_types
48
- {
49
- :'self_uri' => :'ResourceUri',
50
- :'alternate_links' => :'Array<ResourceUri>',
51
- :'placeholder_links' => :'Array<ResourceUri>'
52
- }
40
+ super.merge({
41
+ :'placeholder_links' => :'Array<ResourceUri>',
42
+ })
53
43
  end
54
44
 
55
45
  # Initializes the object
56
46
  # @param [Hash] attributes Model attributes in the form of hash
57
47
  def initialize(attributes = {})
58
- return unless attributes.is_a?(Hash)
59
-
60
- # convert string to symbol for hash key
61
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
62
-
63
- if attributes.has_key?(:'SelfUri')
64
- self.self_uri = attributes[:'SelfUri']
65
- end
66
-
67
- if attributes.has_key?(:'AlternateLinks')
68
- if (value = attributes[:'AlternateLinks']).is_a?(Array)
69
- self.alternate_links = value
70
- end
71
- end
48
+ super
72
49
 
73
50
  if attributes.has_key?(:'PlaceholderLinks')
74
51
  if (value = attributes[:'PlaceholderLinks']).is_a?(Array)
@@ -80,13 +57,14 @@ module AsposeSlidesCloud
80
57
  # Show invalid properties with the reasons. Usually used together with valid?
81
58
  # @return Array for valid properties with the reasons
82
59
  def list_invalid_properties
83
- invalid_properties = Array.new
60
+ invalid_properties = super
84
61
  invalid_properties
85
62
  end
86
63
 
87
64
  # Check to see if the all the properties in the model are valid
88
65
  # @return true if the model is valid
89
66
  def valid?
67
+ return false if !super
90
68
  true
91
69
  end
92
70
 
@@ -118,15 +96,27 @@ module AsposeSlidesCloud
118
96
  def build_from_hash(attributes)
119
97
  return nil unless attributes.is_a?(Hash)
120
98
  self.class.swagger_types.each_pair do |key, type|
121
- if type =~ /\AArray<(.*)>/i
122
- # check to ensure the input is an array given that the the attribute
123
- # is documented as an array but the input is not
124
- if attributes[self.class.attribute_map[key]].is_a?(Array)
125
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
99
+ mapKey = self.class.attribute_map[key]
100
+ if !mapKey.nil?
101
+ val = attributes[mapKey]
102
+ if val.nil?
103
+ mapKeyString = mapKey.to_s
104
+ mapKeyString[0] = mapKeyString[0].downcase
105
+ mapKey = mapKeyString.to_sym
106
+ val = attributes[mapKey]
126
107
  end
127
- elsif !attributes[self.class.attribute_map[key]].nil?
128
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
129
- end # or else data not found in attributes(hash), not an issue as the data can be optional
108
+ if !val.nil?
109
+ if type =~ /\AArray<(.*)>/i
110
+ # check to ensure the input is an array given that the the attribute
111
+ # is documented as an array but the input is not
112
+ if val.is_a?(Array)
113
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
114
+ end
115
+ else
116
+ self.send("#{key}=", _deserialize(type, val))
117
+ end
118
+ end
119
+ end
130
120
  end
131
121
 
132
122
  self
@@ -81,7 +81,7 @@ module AsposeSlidesCloud
81
81
  :'layout_target_type' => :'LayoutTargetType',
82
82
  :'fill_format' => :'FillFormat',
83
83
  :'effect_format' => :'EffectFormat',
84
- :'line_format' => :'LineFormat'
84
+ :'line_format' => :'LineFormat',
85
85
  }
86
86
  end
87
87
 
@@ -95,7 +95,7 @@ module AsposeSlidesCloud
95
95
  :'layout_target_type' => :'String',
96
96
  :'fill_format' => :'FillFormat',
97
97
  :'effect_format' => :'EffectFormat',
98
- :'line_format' => :'LineFormat'
98
+ :'line_format' => :'LineFormat',
99
99
  }
100
100
  end
101
101
 
@@ -198,15 +198,27 @@ module AsposeSlidesCloud
198
198
  def build_from_hash(attributes)
199
199
  return nil unless attributes.is_a?(Hash)
200
200
  self.class.swagger_types.each_pair do |key, type|
201
- if type =~ /\AArray<(.*)>/i
202
- # check to ensure the input is an array given that the the attribute
203
- # is documented as an array but the input is not
204
- if attributes[self.class.attribute_map[key]].is_a?(Array)
205
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
201
+ mapKey = self.class.attribute_map[key]
202
+ if !mapKey.nil?
203
+ val = attributes[mapKey]
204
+ if val.nil?
205
+ mapKeyString = mapKey.to_s
206
+ mapKeyString[0] = mapKeyString[0].downcase
207
+ mapKey = mapKeyString.to_sym
208
+ val = attributes[mapKey]
206
209
  end
207
- elsif !attributes[self.class.attribute_map[key]].nil?
208
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
209
- end # or else data not found in attributes(hash), not an issue as the data can be optional
210
+ if !val.nil?
211
+ if type =~ /\AArray<(.*)>/i
212
+ # check to ensure the input is an array given that the the attribute
213
+ # is documented as an array but the input is not
214
+ if val.is_a?(Array)
215
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
216
+ end
217
+ else
218
+ self.send("#{key}=", _deserialize(type, val))
219
+ end
220
+ end
221
+ end
210
222
  end
211
223
 
212
224
  self
@@ -24,13 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Represents portion resource
27
- class Portion
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 Portion < ResourceBase
34
28
  # Text.
35
29
  attr_accessor :text
36
30
 
@@ -130,9 +124,7 @@ module AsposeSlidesCloud
130
124
 
131
125
  # Attribute mapping from ruby-style variable name to JSON key.
132
126
  def self.attribute_map
133
- {
134
- :'self_uri' => :'SelfUri',
135
- :'alternate_links' => :'AlternateLinks',
127
+ super.merge({
136
128
  :'text' => :'Text',
137
129
  :'font_bold' => :'FontBold',
138
130
  :'font_italic' => :'FontItalic',
@@ -157,15 +149,13 @@ module AsposeSlidesCloud
157
149
  :'effect_format' => :'EffectFormat',
158
150
  :'line_format' => :'LineFormat',
159
151
  :'underline_fill_format' => :'UnderlineFillFormat',
160
- :'underline_line_format' => :'UnderlineLineFormat'
161
- }
152
+ :'underline_line_format' => :'UnderlineLineFormat',
153
+ })
162
154
  end
163
155
 
164
156
  # Attribute type mapping.
165
157
  def self.swagger_types
166
- {
167
- :'self_uri' => :'ResourceUri',
168
- :'alternate_links' => :'Array<ResourceUri>',
158
+ super.merge({
169
159
  :'text' => :'String',
170
160
  :'font_bold' => :'String',
171
161
  :'font_italic' => :'String',
@@ -190,27 +180,14 @@ module AsposeSlidesCloud
190
180
  :'effect_format' => :'EffectFormat',
191
181
  :'line_format' => :'LineFormat',
192
182
  :'underline_fill_format' => :'FillFormat',
193
- :'underline_line_format' => :'LineFormat'
194
- }
183
+ :'underline_line_format' => :'LineFormat',
184
+ })
195
185
  end
196
186
 
197
187
  # Initializes the object
198
188
  # @param [Hash] attributes Model attributes in the form of hash
199
189
  def initialize(attributes = {})
200
- return unless attributes.is_a?(Hash)
201
-
202
- # convert string to symbol for hash key
203
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
204
-
205
- if attributes.has_key?(:'SelfUri')
206
- self.self_uri = attributes[:'SelfUri']
207
- end
208
-
209
- if attributes.has_key?(:'AlternateLinks')
210
- if (value = attributes[:'AlternateLinks']).is_a?(Array)
211
- self.alternate_links = value
212
- end
213
- end
190
+ super
214
191
 
215
192
  if attributes.has_key?(:'Text')
216
193
  self.text = attributes[:'Text']
@@ -316,13 +293,14 @@ module AsposeSlidesCloud
316
293
  # Show invalid properties with the reasons. Usually used together with valid?
317
294
  # @return Array for valid properties with the reasons
318
295
  def list_invalid_properties
319
- invalid_properties = Array.new
296
+ invalid_properties = super
320
297
  invalid_properties
321
298
  end
322
299
 
323
300
  # Check to see if the all the properties in the model are valid
324
301
  # @return true if the model is valid
325
302
  def valid?
303
+ return false if !super
326
304
  font_bold_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
327
305
  return false unless font_bold_validator.valid?(@font_bold)
328
306
  font_italic_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
@@ -498,15 +476,27 @@ module AsposeSlidesCloud
498
476
  def build_from_hash(attributes)
499
477
  return nil unless attributes.is_a?(Hash)
500
478
  self.class.swagger_types.each_pair do |key, type|
501
- if type =~ /\AArray<(.*)>/i
502
- # check to ensure the input is an array given that the the attribute
503
- # is documented as an array but the input is not
504
- if attributes[self.class.attribute_map[key]].is_a?(Array)
505
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
479
+ mapKey = self.class.attribute_map[key]
480
+ if !mapKey.nil?
481
+ val = attributes[mapKey]
482
+ if val.nil?
483
+ mapKeyString = mapKey.to_s
484
+ mapKeyString[0] = mapKeyString[0].downcase
485
+ mapKey = mapKeyString.to_sym
486
+ val = attributes[mapKey]
506
487
  end
507
- elsif !attributes[self.class.attribute_map[key]].nil?
508
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
509
- end # or else data not found in attributes(hash), not an issue as the data can be optional
488
+ if !val.nil?
489
+ if type =~ /\AArray<(.*)>/i
490
+ # check to ensure the input is an array given that the the attribute
491
+ # is documented as an array but the input is not
492
+ if val.is_a?(Array)
493
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
494
+ end
495
+ else
496
+ self.send("#{key}=", _deserialize(type, val))
497
+ end
498
+ end
499
+ end
510
500
  end
511
501
 
512
502
  self