aspose_slides_cloud 20.7.0 → 20.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/TestData/ChartTest.pptx +0 -0
  3. data/lib/aspose_slides_cloud.rb +5 -3
  4. data/lib/aspose_slides_cloud/api/slides_api.rb +407 -0
  5. data/lib/aspose_slides_cloud/api/slides_api_requests.rb +165 -0
  6. data/lib/aspose_slides_cloud/api_client.rb +1 -2
  7. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +11 -40
  8. data/lib/aspose_slides_cloud/models/add_master_slide.rb +11 -40
  9. data/lib/aspose_slides_cloud/models/add_shape.rb +11 -40
  10. data/lib/aspose_slides_cloud/models/add_slide.rb +11 -40
  11. data/lib/aspose_slides_cloud/models/api_info.rb +2 -2
  12. data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +2 -2
  13. data/lib/aspose_slides_cloud/models/audio_frame.rb +12 -236
  14. data/lib/aspose_slides_cloud/models/axes.rb +2 -2
  15. data/lib/aspose_slides_cloud/models/axis.rb +2 -2
  16. data/lib/aspose_slides_cloud/models/base64_input_file.rb +11 -49
  17. data/lib/aspose_slides_cloud/models/blur_effect.rb +2 -2
  18. data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +11 -216
  19. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +10 -40
  20. data/lib/aspose_slides_cloud/models/bubble_series.rb +11 -205
  21. data/lib/aspose_slides_cloud/models/chart.rb +12 -210
  22. data/lib/aspose_slides_cloud/models/chart_category.rb +16 -4
  23. data/lib/aspose_slides_cloud/models/chart_title.rb +2 -2
  24. data/lib/aspose_slides_cloud/models/chart_wall.rb +2 -2
  25. data/lib/aspose_slides_cloud/models/color_scheme.rb +10 -32
  26. data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +2 -2
  27. data/lib/aspose_slides_cloud/models/connector.rb +11 -234
  28. data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +2 -2
  29. data/lib/aspose_slides_cloud/models/disc_usage.rb +2 -2
  30. data/lib/aspose_slides_cloud/models/document.rb +10 -32
  31. data/lib/aspose_slides_cloud/models/document_properties.rb +10 -32
  32. data/lib/aspose_slides_cloud/models/document_property.rb +10 -32
  33. data/lib/aspose_slides_cloud/models/document_replace_result.rb +10 -86
  34. data/lib/aspose_slides_cloud/models/effect.rb +2 -2
  35. data/lib/aspose_slides_cloud/models/effect_format.rb +2 -2
  36. data/lib/aspose_slides_cloud/models/entity_exists.rb +2 -2
  37. data/lib/aspose_slides_cloud/models/error.rb +2 -2
  38. data/lib/aspose_slides_cloud/models/error_details.rb +2 -2
  39. data/lib/aspose_slides_cloud/models/export_options.rb +13 -3
  40. data/lib/aspose_slides_cloud/models/file_version.rb +10 -67
  41. data/lib/aspose_slides_cloud/models/file_versions.rb +2 -2
  42. data/lib/aspose_slides_cloud/models/files_list.rb +2 -2
  43. data/lib/aspose_slides_cloud/models/files_upload_result.rb +2 -2
  44. data/lib/aspose_slides_cloud/models/fill_format.rb +2 -2
  45. data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +2 -2
  46. data/lib/aspose_slides_cloud/models/font_scheme.rb +10 -32
  47. data/lib/aspose_slides_cloud/models/font_set.rb +2 -2
  48. data/lib/aspose_slides_cloud/models/format_scheme.rb +10 -32
  49. data/lib/aspose_slides_cloud/models/geometry_shape.rb +10 -200
  50. data/lib/aspose_slides_cloud/models/glow_effect.rb +2 -2
  51. data/lib/aspose_slides_cloud/models/gradient_fill.rb +11 -40
  52. data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +2 -2
  53. data/lib/aspose_slides_cloud/models/graphical_object.rb +11 -209
  54. data/lib/aspose_slides_cloud/models/group_shape.rb +11 -209
  55. data/lib/aspose_slides_cloud/models/html_export_options.rb +13 -24
  56. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +2 -2
  57. data/lib/aspose_slides_cloud/models/image.rb +10 -32
  58. data/lib/aspose_slides_cloud/models/image_export_options.rb +13 -24
  59. data/lib/aspose_slides_cloud/models/images.rb +10 -32
  60. data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +2 -2
  61. data/lib/aspose_slides_cloud/models/input.rb +2 -2
  62. data/lib/aspose_slides_cloud/models/input_file.rb +2 -2
  63. data/lib/aspose_slides_cloud/models/interactive_sequence.rb +2 -2
  64. data/lib/aspose_slides_cloud/models/layout_slide.rb +10 -32
  65. data/lib/aspose_slides_cloud/models/layout_slides.rb +10 -32
  66. data/lib/aspose_slides_cloud/models/legend.rb +2 -2
  67. data/lib/aspose_slides_cloud/models/line_format.rb +2 -2
  68. data/lib/aspose_slides_cloud/models/master_slide.rb +10 -32
  69. data/lib/aspose_slides_cloud/models/master_slides.rb +10 -32
  70. data/lib/aspose_slides_cloud/models/merge.rb +11 -40
  71. data/lib/aspose_slides_cloud/models/merging_source.rb +2 -2
  72. data/lib/aspose_slides_cloud/models/no_fill.rb +9 -38
  73. data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +2 -2
  74. data/lib/aspose_slides_cloud/models/notes_slide.rb +10 -32
  75. data/lib/aspose_slides_cloud/models/object_exist.rb +2 -2
  76. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +12 -210
  77. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +10 -12
  78. data/lib/aspose_slides_cloud/models/one_value_series.rb +11 -205
  79. data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +2 -2
  80. data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +2 -2
  81. data/lib/aspose_slides_cloud/models/output_file.rb +2 -2
  82. data/lib/aspose_slides_cloud/models/paragraph.rb +10 -32
  83. data/lib/aspose_slides_cloud/models/paragraphs.rb +10 -32
  84. data/lib/aspose_slides_cloud/models/path_input_file.rb +11 -49
  85. data/lib/aspose_slides_cloud/models/path_output_file.rb +11 -40
  86. data/lib/aspose_slides_cloud/models/pattern_fill.rb +11 -40
  87. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +13 -24
  88. data/lib/aspose_slides_cloud/models/picture_fill.rb +11 -40
  89. data/lib/aspose_slides_cloud/models/picture_frame.rb +12 -236
  90. data/lib/aspose_slides_cloud/models/pipeline.rb +2 -2
  91. data/lib/aspose_slides_cloud/models/placeholder.rb +10 -32
  92. data/lib/aspose_slides_cloud/models/placeholders.rb +10 -32
  93. data/lib/aspose_slides_cloud/models/plot_area.rb +2 -2
  94. data/lib/aspose_slides_cloud/models/portion.rb +10 -32
  95. data/lib/aspose_slides_cloud/models/portions.rb +10 -32
  96. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +13 -24
  97. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +2 -2
  98. data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +2 -2
  99. data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +2 -2
  100. data/lib/aspose_slides_cloud/models/reflection_effect.rb +2 -2
  101. data/lib/aspose_slides_cloud/models/remove_shape.rb +11 -40
  102. data/lib/aspose_slides_cloud/models/remove_slide.rb +11 -40
  103. data/lib/aspose_slides_cloud/models/reorder_slide.rb +11 -40
  104. data/lib/aspose_slides_cloud/models/replace_text.rb +11 -40
  105. data/lib/aspose_slides_cloud/models/request_input_file.rb +11 -49
  106. data/lib/aspose_slides_cloud/models/reset_slide.rb +11 -40
  107. data/lib/aspose_slides_cloud/models/resource_base.rb +2 -2
  108. data/lib/aspose_slides_cloud/models/resource_uri.rb +2 -2
  109. data/lib/aspose_slides_cloud/models/resource_uri_element.rb +2 -2
  110. data/lib/aspose_slides_cloud/models/response_output_file.rb +9 -38
  111. data/lib/aspose_slides_cloud/models/save.rb +11 -40
  112. data/lib/aspose_slides_cloud/models/save_shape.rb +11 -40
  113. data/lib/aspose_slides_cloud/models/save_slide.rb +11 -40
  114. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +10 -12
  115. data/lib/aspose_slides_cloud/models/scatter_series.rb +11 -205
  116. data/lib/aspose_slides_cloud/models/series.rb +2 -2
  117. data/lib/aspose_slides_cloud/models/series_marker.rb +2 -2
  118. data/lib/aspose_slides_cloud/models/shape.rb +11 -234
  119. data/lib/aspose_slides_cloud/models/shape_base.rb +10 -32
  120. data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +2 -2
  121. data/lib/aspose_slides_cloud/models/shapes.rb +10 -32
  122. data/lib/aspose_slides_cloud/models/slide.rb +10 -32
  123. data/lib/aspose_slides_cloud/models/slide_animation.rb +10 -32
  124. data/lib/aspose_slides_cloud/models/slide_background.rb +10 -32
  125. data/lib/aspose_slides_cloud/models/slide_comment.rb +2 -2
  126. data/lib/aspose_slides_cloud/models/slide_comments.rb +10 -32
  127. data/lib/aspose_slides_cloud/models/slide_replace_result.rb +10 -146
  128. data/lib/aspose_slides_cloud/models/slides.rb +10 -32
  129. data/lib/aspose_slides_cloud/models/smart_art.rb +12 -210
  130. data/lib/aspose_slides_cloud/models/smart_art_node.rb +2 -2
  131. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +11 -209
  132. data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +2 -2
  133. data/lib/aspose_slides_cloud/models/solid_fill.rb +11 -40
  134. data/lib/aspose_slides_cloud/models/split_document_result.rb +10 -32
  135. data/lib/aspose_slides_cloud/models/storage_exist.rb +2 -2
  136. data/lib/aspose_slides_cloud/models/storage_file.rb +2 -2
  137. data/lib/aspose_slides_cloud/models/svg_export_options.rb +13 -24
  138. data/lib/aspose_slides_cloud/models/swf_export_options.rb +13 -24
  139. data/lib/aspose_slides_cloud/models/table.rb +12 -210
  140. data/lib/aspose_slides_cloud/models/table_cell.rb +2 -2
  141. data/lib/aspose_slides_cloud/models/table_column.rb +2 -2
  142. data/lib/aspose_slides_cloud/models/table_row.rb +2 -2
  143. data/lib/aspose_slides_cloud/models/task.rb +2 -2
  144. data/lib/aspose_slides_cloud/models/text_item.rb +2 -2
  145. data/lib/aspose_slides_cloud/models/text_items.rb +10 -32
  146. data/lib/aspose_slides_cloud/models/theme.rb +10 -32
  147. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +13 -24
  148. data/lib/aspose_slides_cloud/models/update_background.rb +11 -40
  149. data/lib/aspose_slides_cloud/models/update_shape.rb +11 -40
  150. data/lib/aspose_slides_cloud/models/video_frame.rb +12 -236
  151. data/lib/aspose_slides_cloud/models/view_properties.rb +10 -32
  152. data/lib/aspose_slides_cloud/models/waterfall_series.rb +11 -216
  153. data/lib/aspose_slides_cloud/models/xps_export_options.rb +13 -24
  154. data/lib/aspose_slides_cloud/type_registry.rb +313 -0
  155. data/lib/aspose_slides_cloud/version.rb +1 -1
  156. data/spec/api/slides_api_spec.rb +1417 -63
  157. data/spec/extra/extra_spec.rb +66 -33
  158. data/testRules.json +31 -0
  159. metadata +4 -2
@@ -67,6 +67,59 @@ module AsposeSlidesCloud
67
67
  attr_accessor :storage_name
68
68
  end
69
69
 
70
+ # request model for delete_chart_category
71
+ class DeleteChartCategoryRequest
72
+
73
+ # @param name Document name.
74
+ attr_accessor :name
75
+
76
+ # @param slide_index Slide index.
77
+ attr_accessor :slide_index
78
+
79
+ # @param shape_index Shape index.
80
+ attr_accessor :shape_index
81
+
82
+ # @param category_index Category index.
83
+ attr_accessor :category_index
84
+
85
+ # @param password Document password.
86
+ attr_accessor :password
87
+
88
+ # @param folder Document folder.
89
+ attr_accessor :folder
90
+
91
+ # @param storage Document storage.
92
+ attr_accessor :storage
93
+ end
94
+
95
+ # request model for delete_chart_data_point
96
+ class DeleteChartDataPointRequest
97
+
98
+ # @param name Document name.
99
+ attr_accessor :name
100
+
101
+ # @param slide_index Slide index.
102
+ attr_accessor :slide_index
103
+
104
+ # @param shape_index Shape index.
105
+ attr_accessor :shape_index
106
+
107
+ # @param series_index Series index.
108
+ attr_accessor :series_index
109
+
110
+ # @param point_index Data point index.
111
+ attr_accessor :point_index
112
+
113
+ # @param password Document password.
114
+ attr_accessor :password
115
+
116
+ # @param folder Document folder.
117
+ attr_accessor :folder
118
+
119
+ # @param storage Document storage.
120
+ attr_accessor :storage
121
+ end
122
+
70
123
  # request model for delete_chart_series
71
124
  class DeleteChartSeriesRequest
72
125
 
@@ -2092,6 +2145,59 @@ module AsposeSlidesCloud
2092
2145
  attr_accessor :storage
2093
2146
  end
2094
2147
 
2148
+ # request model for post_chart_category
2149
+ class PostChartCategoryRequest
2150
+
2151
+ # @param name Document name.
2152
+ attr_accessor :name
2153
+
2154
+ # @param slide_index Slide index.
2155
+ attr_accessor :slide_index
2156
+
2157
+ # @param shape_index Shape index.
2158
+ attr_accessor :shape_index
2159
+
2160
+ # @param category Category DTO.
2161
+ attr_accessor :category
2162
+
2163
+ # @param password Document password.
2164
+ attr_accessor :password
2165
+
2166
+ # @param folder Document folder.
2167
+ attr_accessor :folder
2168
+
2169
+ # @param storage Document storage.
2170
+ attr_accessor :storage
2171
+ end
2172
+
2173
+ # request model for post_chart_data_point
2174
+ class PostChartDataPointRequest
2175
+
2176
+ # @param name Document name.
2177
+ attr_accessor :name
2178
+
2179
+ # @param slide_index Slide index.
2180
+ attr_accessor :slide_index
2181
+
2182
+ # @param shape_index Shape index.
2183
+ attr_accessor :shape_index
2184
+
2185
+ # @param series_index Series index.
2186
+ attr_accessor :series_index
2187
+
2188
+ # @param data_point Data point DTO.
2189
+ attr_accessor :data_point
2190
+
2191
+ # @param password Document password.
2192
+ attr_accessor :password
2193
+
2194
+ # @param folder Document folder.
2195
+ attr_accessor :folder
2196
+
2197
+ # @param storage Document storage.
2198
+ attr_accessor :storage
2199
+ end
2200
+
2095
2201
  # request model for post_chart_series
2096
2202
  class PostChartSeriesRequest
2097
2203
 
@@ -2916,6 +3022,65 @@ module AsposeSlidesCloud
2916
3022
  attr_accessor :fonts_folder
2917
3023
  end
2918
3024
 
3025
+ # request model for put_chart_category
3026
+ class PutChartCategoryRequest
3027
+
3028
+ # @param name Document name.
3029
+ attr_accessor :name
3030
+
3031
+ # @param slide_index Slide index.
3032
+ attr_accessor :slide_index
3033
+
3034
+ # @param shape_index Shape index.
3035
+ attr_accessor :shape_index
3036
+
3037
+ # @param category_index Category index.
3038
+ attr_accessor :category_index
3039
+
3040
+ # @param category Category DTO.
3041
+ attr_accessor :category
3042
+
3043
+ # @param password Document password.
3044
+ attr_accessor :password
3045
+
3046
+ # @param folder Document folder.
3047
+ attr_accessor :folder
3048
+
3049
+ # @param storage Document storage.
3050
+ attr_accessor :storage
3051
+ end
3052
+
3053
+ # request model for put_chart_data_point
3054
+ class PutChartDataPointRequest
3055
+
3056
+ # @param name Document name.
3057
+ attr_accessor :name
3058
+
3059
+ # @param slide_index Slide index.
3060
+ attr_accessor :slide_index
3061
+
3062
+ # @param shape_index Shape index.
3063
+ attr_accessor :shape_index
3064
+
3065
+ # @param series_index Series index.
3066
+ attr_accessor :series_index
3067
+
3068
+ # @param point_index Data point index.
3069
+ attr_accessor :point_index
3070
+
3071
+ # @param data_point Data point DTO.
3072
+ attr_accessor :data_point
3073
+
3074
+ # @param password Document password.
3075
+ attr_accessor :password
3076
+
3077
+ # @param folder Document folder.
3078
+ attr_accessor :folder
3079
+
3080
+ # @param storage Document storage.
3081
+ attr_accessor :storage
3082
+ end
3083
+
2919
3084
  # request model for put_chart_series
2920
3085
  class PutChartSeriesRequest
2921
3086
 
@@ -160,8 +160,7 @@ module AsposeSlidesCloud
160
160
  end
161
161
 
162
162
  def set_headers(headers)
163
- headers['x-aspose-client'] = 'ruby sdk'
164
- headers['x-aspose-version'] = AsposeSlidesCloud::VERSION
163
+ headers['x-aspose-client'] = "ruby sdk v#{AsposeSlidesCloud::VERSION}"
165
164
  if @config.timeout > 0
166
165
  headers['x-aspose-timeout'] = @config.timeout.to_s
167
166
  end
@@ -24,10 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Add layout slide task.
27
- class AddLayoutSlide
28
- # Task type.
29
- attr_accessor :type
30
-
27
+ class AddLayoutSlide < Task
31
28
  # Source file.
32
29
  attr_accessor :clone_from_file
33
30
 
@@ -58,35 +55,24 @@ module AsposeSlidesCloud
58
55
 
59
56
  # Attribute mapping from ruby-style variable name to JSON key.
60
57
  def self.attribute_map
61
- {
62
- :'type' => :'Type',
58
+ super.merge({
63
59
  :'clone_from_file' => :'CloneFromFile',
64
- :'clone_from_position' => :'CloneFromPosition'
65
- }
60
+ :'clone_from_position' => :'CloneFromPosition',
61
+ })
66
62
  end
67
63
 
68
64
  # Attribute type mapping.
69
65
  def self.swagger_types
70
- {
71
- :'type' => :'String',
66
+ super.merge({
72
67
  :'clone_from_file' => :'InputFile',
73
- :'clone_from_position' => :'Integer'
74
- }
68
+ :'clone_from_position' => :'Integer',
69
+ })
75
70
  end
76
71
 
77
72
  # Initializes the object
78
73
  # @param [Hash] attributes Model attributes in the form of hash
79
74
  def initialize(attributes = {})
80
- return unless attributes.is_a?(Hash)
81
-
82
- # convert string to symbol for hash key
83
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
84
-
85
- if attributes.has_key?(:'Type')
86
- self.type = attributes[:'Type']
87
- else
88
- self.type = "AddLayoutSlide"
89
- end
75
+ super
90
76
 
91
77
  if attributes.has_key?(:'CloneFromFile')
92
78
  self.clone_from_file = attributes[:'CloneFromFile']
@@ -95,16 +81,13 @@ module AsposeSlidesCloud
95
81
  if attributes.has_key?(:'CloneFromPosition')
96
82
  self.clone_from_position = attributes[:'CloneFromPosition']
97
83
  end
84
+ self.type = "AddLayoutSlide"
98
85
  end
99
86
 
100
87
  # Show invalid properties with the reasons. Usually used together with valid?
101
88
  # @return Array for valid properties with the reasons
102
89
  def list_invalid_properties
103
- invalid_properties = Array.new
104
- if @type.nil?
105
- invalid_properties.push('invalid value for "type", type cannot be nil.')
106
- end
107
-
90
+ invalid_properties = super
108
91
  if @clone_from_position.nil?
109
92
  invalid_properties.push('invalid value for "clone_from_position", clone_from_position cannot be nil.')
110
93
  end
@@ -115,23 +98,11 @@ module AsposeSlidesCloud
115
98
  # Check to see if the all the properties in the model are valid
116
99
  # @return true if the model is valid
117
100
  def valid?
118
- return false if @type.nil?
119
- type_validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
120
- return false unless type_validator.valid?(@type)
101
+ return false if !super
121
102
  return false if @clone_from_position.nil?
122
103
  true
123
104
  end
124
105
 
125
- # Custom attribute writer method checking allowed values (enum).
126
- # @param [Object] type Object to be assigned
127
- def type=(type)
128
- validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
129
- unless validator.valid?(type)
130
- fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
131
- end
132
- @type = type
133
- end
134
-
135
106
  # Checks equality by comparing each attribute.
136
107
  # @param [Object] Object to be compared
137
108
  def ==(o)
@@ -24,10 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Add master slide task.
27
- class AddMasterSlide
28
- # Task type.
29
- attr_accessor :type
30
-
27
+ class AddMasterSlide < Task
31
28
  # Source presentation clone from.
32
29
  attr_accessor :clone_from_file
33
30
 
@@ -61,37 +58,26 @@ module AsposeSlidesCloud
61
58
 
62
59
  # Attribute mapping from ruby-style variable name to JSON key.
63
60
  def self.attribute_map
64
- {
65
- :'type' => :'Type',
61
+ super.merge({
66
62
  :'clone_from_file' => :'CloneFromFile',
67
63
  :'clone_from_position' => :'CloneFromPosition',
68
- :'apply_to_all' => :'ApplyToAll'
69
- }
64
+ :'apply_to_all' => :'ApplyToAll',
65
+ })
70
66
  end
71
67
 
72
68
  # Attribute type mapping.
73
69
  def self.swagger_types
74
- {
75
- :'type' => :'String',
70
+ super.merge({
76
71
  :'clone_from_file' => :'InputFile',
77
72
  :'clone_from_position' => :'Integer',
78
- :'apply_to_all' => :'BOOLEAN'
79
- }
73
+ :'apply_to_all' => :'BOOLEAN',
74
+ })
80
75
  end
81
76
 
82
77
  # Initializes the object
83
78
  # @param [Hash] attributes Model attributes in the form of hash
84
79
  def initialize(attributes = {})
85
- return unless attributes.is_a?(Hash)
86
-
87
- # convert string to symbol for hash key
88
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
89
-
90
- if attributes.has_key?(:'Type')
91
- self.type = attributes[:'Type']
92
- else
93
- self.type = "AddMasterSlide"
94
- end
80
+ super
95
81
 
96
82
  if attributes.has_key?(:'CloneFromFile')
97
83
  self.clone_from_file = attributes[:'CloneFromFile']
@@ -104,16 +90,13 @@ module AsposeSlidesCloud
104
90
  if attributes.has_key?(:'ApplyToAll')
105
91
  self.apply_to_all = attributes[:'ApplyToAll']
106
92
  end
93
+ self.type = "AddMasterSlide"
107
94
  end
108
95
 
109
96
  # Show invalid properties with the reasons. Usually used together with valid?
110
97
  # @return Array for valid properties with the reasons
111
98
  def list_invalid_properties
112
- invalid_properties = Array.new
113
- if @type.nil?
114
- invalid_properties.push('invalid value for "type", type cannot be nil.')
115
- end
116
-
99
+ invalid_properties = super
117
100
  if @clone_from_position.nil?
118
101
  invalid_properties.push('invalid value for "clone_from_position", clone_from_position cannot be nil.')
119
102
  end
@@ -128,24 +111,12 @@ module AsposeSlidesCloud
128
111
  # Check to see if the all the properties in the model are valid
129
112
  # @return true if the model is valid
130
113
  def valid?
131
- return false if @type.nil?
132
- type_validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
133
- return false unless type_validator.valid?(@type)
114
+ return false if !super
134
115
  return false if @clone_from_position.nil?
135
116
  return false if @apply_to_all.nil?
136
117
  true
137
118
  end
138
119
 
139
- # Custom attribute writer method checking allowed values (enum).
140
- # @param [Object] type Object to be assigned
141
- def type=(type)
142
- validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
143
- unless validator.valid?(type)
144
- fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
145
- end
146
- @type = type
147
- end
148
-
149
120
  # Checks equality by comparing each attribute.
150
121
  # @param [Object] Object to be compared
151
122
  def ==(o)
@@ -24,10 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Add shape task.
27
- class AddShape
28
- # Task type.
29
- attr_accessor :type
30
-
27
+ class AddShape < Task
31
28
  # Shape DTO.
32
29
  attr_accessor :shape
33
30
 
@@ -58,35 +55,24 @@ module AsposeSlidesCloud
58
55
 
59
56
  # Attribute mapping from ruby-style variable name to JSON key.
60
57
  def self.attribute_map
61
- {
62
- :'type' => :'Type',
58
+ super.merge({
63
59
  :'shape' => :'Shape',
64
- :'shape_path' => :'ShapePath'
65
- }
60
+ :'shape_path' => :'ShapePath',
61
+ })
66
62
  end
67
63
 
68
64
  # Attribute type mapping.
69
65
  def self.swagger_types
70
- {
71
- :'type' => :'String',
66
+ super.merge({
72
67
  :'shape' => :'ShapeBase',
73
- :'shape_path' => :'String'
74
- }
68
+ :'shape_path' => :'String',
69
+ })
75
70
  end
76
71
 
77
72
  # Initializes the object
78
73
  # @param [Hash] attributes Model attributes in the form of hash
79
74
  def initialize(attributes = {})
80
- return unless attributes.is_a?(Hash)
81
-
82
- # convert string to symbol for hash key
83
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
84
-
85
- if attributes.has_key?(:'Type')
86
- self.type = attributes[:'Type']
87
- else
88
- self.type = "AddShape"
89
- end
75
+ super
90
76
 
91
77
  if attributes.has_key?(:'Shape')
92
78
  self.shape = attributes[:'Shape']
@@ -95,38 +81,23 @@ module AsposeSlidesCloud
95
81
  if attributes.has_key?(:'ShapePath')
96
82
  self.shape_path = attributes[:'ShapePath']
97
83
  end
84
+ self.type = "AddShape"
98
85
  end
99
86
 
100
87
  # Show invalid properties with the reasons. Usually used together with valid?
101
88
  # @return Array for valid properties with the reasons
102
89
  def list_invalid_properties
103
- invalid_properties = Array.new
104
- if @type.nil?
105
- invalid_properties.push('invalid value for "type", type cannot be nil.')
106
- end
107
-
90
+ invalid_properties = super
108
91
  invalid_properties
109
92
  end
110
93
 
111
94
  # Check to see if the all the properties in the model are valid
112
95
  # @return true if the model is valid
113
96
  def valid?
114
- return false if @type.nil?
115
- type_validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
116
- return false unless type_validator.valid?(@type)
97
+ return false if !super
117
98
  true
118
99
  end
119
100
 
120
- # Custom attribute writer method checking allowed values (enum).
121
- # @param [Object] type Object to be assigned
122
- def type=(type)
123
- validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
124
- unless validator.valid?(type)
125
- fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
126
- end
127
- @type = type
128
- end
129
-
130
101
  # Checks equality by comparing each attribute.
131
102
  # @param [Object] Object to be compared
132
103
  def ==(o)