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
@@ -24,51 +24,28 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Master slide list.
27
- class MasterSlides
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 MasterSlides < ResourceBase
34
28
  # List of slide links.
35
29
  attr_accessor :slide_list
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
- :'slide_list' => :'SlideList'
43
- }
33
+ super.merge({
34
+ :'slide_list' => :'SlideList',
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
- :'slide_list' => :'Array<ResourceUriElement>'
52
- }
40
+ super.merge({
41
+ :'slide_list' => :'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?(:'SlideList')
74
51
  if (value = attributes[:'SlideList']).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
@@ -24,10 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Merge presentations task.
27
- class Merge
28
- # Task type.
29
- attr_accessor :type
30
-
27
+ class Merge < Task
31
28
  # Information about documents and slides being merging sources.
32
29
  attr_accessor :presentations
33
30
 
@@ -55,71 +52,45 @@ module AsposeSlidesCloud
55
52
 
56
53
  # Attribute mapping from ruby-style variable name to JSON key.
57
54
  def self.attribute_map
58
- {
59
- :'type' => :'Type',
60
- :'presentations' => :'Presentations'
61
- }
55
+ super.merge({
56
+ :'presentations' => :'Presentations',
57
+ })
62
58
  end
63
59
 
64
60
  # Attribute type mapping.
65
61
  def self.swagger_types
66
- {
67
- :'type' => :'String',
68
- :'presentations' => :'Array<MergingSource>'
69
- }
62
+ super.merge({
63
+ :'presentations' => :'Array<MergingSource>',
64
+ })
70
65
  end
71
66
 
72
67
  # Initializes the object
73
68
  # @param [Hash] attributes Model attributes in the form of hash
74
69
  def initialize(attributes = {})
75
- return unless attributes.is_a?(Hash)
76
-
77
- # convert string to symbol for hash key
78
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
79
-
80
- if attributes.has_key?(:'Type')
81
- self.type = attributes[:'Type']
82
- else
83
- self.type = "Merge"
84
- end
70
+ super
85
71
 
86
72
  if attributes.has_key?(:'Presentations')
87
73
  if (value = attributes[:'Presentations']).is_a?(Array)
88
74
  self.presentations = value
89
75
  end
90
76
  end
77
+ self.type = "Merge"
91
78
  end
92
79
 
93
80
  # Show invalid properties with the reasons. Usually used together with valid?
94
81
  # @return Array for valid properties with the reasons
95
82
  def list_invalid_properties
96
- invalid_properties = Array.new
97
- if @type.nil?
98
- invalid_properties.push('invalid value for "type", type cannot be nil.')
99
- end
100
-
83
+ invalid_properties = super
101
84
  invalid_properties
102
85
  end
103
86
 
104
87
  # Check to see if the all the properties in the model are valid
105
88
  # @return true if the model is valid
106
89
  def valid?
107
- return false if @type.nil?
108
- type_validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
109
- return false unless type_validator.valid?(@type)
90
+ return false if !super
110
91
  true
111
92
  end
112
93
 
113
- # Custom attribute writer method checking allowed values (enum).
114
- # @param [Object] type Object to be assigned
115
- def type=(type)
116
- validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
117
- unless validator.valid?(type)
118
- fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
119
- end
120
- @type = type
121
- end
122
-
123
94
  # Checks equality by comparing each attribute.
124
95
  # @param [Object] Object to be compared
125
96
  def ==(o)
@@ -147,15 +118,27 @@ module AsposeSlidesCloud
147
118
  def build_from_hash(attributes)
148
119
  return nil unless attributes.is_a?(Hash)
149
120
  self.class.swagger_types.each_pair do |key, type|
150
- if type =~ /\AArray<(.*)>/i
151
- # check to ensure the input is an array given that the the attribute
152
- # is documented as an array but the input is not
153
- if attributes[self.class.attribute_map[key]].is_a?(Array)
154
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
121
+ mapKey = self.class.attribute_map[key]
122
+ if !mapKey.nil?
123
+ val = attributes[mapKey]
124
+ if val.nil?
125
+ mapKeyString = mapKey.to_s
126
+ mapKeyString[0] = mapKeyString[0].downcase
127
+ mapKey = mapKeyString.to_sym
128
+ val = attributes[mapKey]
129
+ end
130
+ if !val.nil?
131
+ if type =~ /\AArray<(.*)>/i
132
+ # check to ensure the input is an array given that the the attribute
133
+ # is documented as an array but the input is not
134
+ if val.is_a?(Array)
135
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
136
+ end
137
+ else
138
+ self.send("#{key}=", _deserialize(type, val))
139
+ end
155
140
  end
156
- elsif !attributes[self.class.attribute_map[key]].nil?
157
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
158
- end # or else data not found in attributes(hash), not an issue as the data can be optional
141
+ end
159
142
  end
160
143
 
161
144
  self
@@ -35,7 +35,7 @@ module AsposeSlidesCloud
35
35
  def self.attribute_map
36
36
  {
37
37
  :'input' => :'Input',
38
- :'slides' => :'Slides'
38
+ :'slides' => :'Slides',
39
39
  }
40
40
  end
41
41
 
@@ -43,7 +43,7 @@ module AsposeSlidesCloud
43
43
  def self.swagger_types
44
44
  {
45
45
  :'input' => :'InputFile',
46
- :'slides' => :'Array<Integer>'
46
+ :'slides' => :'Array<Integer>',
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,10 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Represents empty fill
27
- class NoFill
28
- # Fill type.
29
- attr_accessor :type
30
-
27
+ class NoFill < FillFormat
31
28
  class EnumAttributeValidator
32
29
  attr_reader :datatype
33
30
  attr_reader :allowable_values
@@ -52,63 +49,37 @@ module AsposeSlidesCloud
52
49
 
53
50
  # Attribute mapping from ruby-style variable name to JSON key.
54
51
  def self.attribute_map
55
- {
56
- :'type' => :'Type'
57
- }
52
+ super.merge({
53
+ })
58
54
  end
59
55
 
60
56
  # Attribute type mapping.
61
57
  def self.swagger_types
62
- {
63
- :'type' => :'String'
64
- }
58
+ super.merge({
59
+ })
65
60
  end
66
61
 
67
62
  # Initializes the object
68
63
  # @param [Hash] attributes Model attributes in the form of hash
69
64
  def initialize(attributes = {})
70
- return unless attributes.is_a?(Hash)
71
-
72
- # convert string to symbol for hash key
73
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
74
-
75
- if attributes.has_key?(:'Type')
76
- self.type = attributes[:'Type']
77
- else
78
- self.type = "NoFill"
79
- end
65
+ super
66
+ self.type = "NoFill"
80
67
  end
81
68
 
82
69
  # Show invalid properties with the reasons. Usually used together with valid?
83
70
  # @return Array for valid properties with the reasons
84
71
  def list_invalid_properties
85
- invalid_properties = Array.new
86
- if @type.nil?
87
- invalid_properties.push('invalid value for "type", type cannot be nil.')
88
- end
89
-
72
+ invalid_properties = super
90
73
  invalid_properties
91
74
  end
92
75
 
93
76
  # Check to see if the all the properties in the model are valid
94
77
  # @return true if the model is valid
95
78
  def valid?
96
- return false if @type.nil?
97
- type_validator = EnumAttributeValidator.new('String', ['NoFill', 'Solid', 'Gradient', 'Pattern', 'Picture', 'NotDefined'])
98
- return false unless type_validator.valid?(@type)
79
+ return false if !super
99
80
  true
100
81
  end
101
82
 
102
- # Custom attribute writer method checking allowed values (enum).
103
- # @param [Object] type Object to be assigned
104
- def type=(type)
105
- validator = EnumAttributeValidator.new('String', ['NoFill', 'Solid', 'Gradient', 'Pattern', 'Picture', 'NotDefined'])
106
- unless validator.valid?(type)
107
- fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
108
- end
109
- @type = type
110
- end
111
-
112
83
  # Checks equality by comparing each attribute.
113
84
  # @param [Object] Object to be compared
114
85
  def ==(o)
@@ -135,15 +106,27 @@ module AsposeSlidesCloud
135
106
  def build_from_hash(attributes)
136
107
  return nil unless attributes.is_a?(Hash)
137
108
  self.class.swagger_types.each_pair do |key, type|
138
- if type =~ /\AArray<(.*)>/i
139
- # check to ensure the input is an array given that the the attribute
140
- # is documented as an array but the input is not
141
- if attributes[self.class.attribute_map[key]].is_a?(Array)
142
- 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]
117
+ end
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
143
128
  end
144
- elsif !attributes[self.class.attribute_map[key]].nil?
145
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
146
- end # or else data not found in attributes(hash), not an issue as the data can be optional
129
+ end
147
130
  end
148
131
 
149
132
  self
@@ -35,7 +35,7 @@ module AsposeSlidesCloud
35
35
  def self.attribute_map
36
36
  {
37
37
  :'auto_adjust' => :'AutoAdjust',
38
- :'dimension_size' => :'DimensionSize'
38
+ :'dimension_size' => :'DimensionSize',
39
39
  }
40
40
  end
41
41
 
@@ -43,7 +43,7 @@ module AsposeSlidesCloud
43
43
  def self.swagger_types
44
44
  {
45
45
  :'auto_adjust' => :'BOOLEAN',
46
- :'dimension_size' => :'Float'
46
+ :'dimension_size' => :'Float',
47
47
  }
48
48
  end
49
49
 
@@ -104,15 +104,27 @@ module AsposeSlidesCloud
104
104
  def build_from_hash(attributes)
105
105
  return nil unless attributes.is_a?(Hash)
106
106
  self.class.swagger_types.each_pair do |key, type|
107
- if type =~ /\AArray<(.*)>/i
108
- # check to ensure the input is an array given that the the attribute
109
- # is documented as an array but the input is not
110
- if attributes[self.class.attribute_map[key]].is_a?(Array)
111
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
107
+ mapKey = self.class.attribute_map[key]
108
+ if !mapKey.nil?
109
+ val = attributes[mapKey]
110
+ if val.nil?
111
+ mapKeyString = mapKey.to_s
112
+ mapKeyString[0] = mapKeyString[0].downcase
113
+ mapKey = mapKeyString.to_sym
114
+ val = attributes[mapKey]
112
115
  end
113
- elsif !attributes[self.class.attribute_map[key]].nil?
114
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
- end # or else data not found in attributes(hash), not an issue as the data can be optional
116
+ if !val.nil?
117
+ if type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the the attribute
119
+ # is documented as an array but the input is not
120
+ if val.is_a?(Array)
121
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
122
+ end
123
+ else
124
+ self.send("#{key}=", _deserialize(type, val))
125
+ end
126
+ end
127
+ end
116
128
  end
117
129
 
118
130
  self