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
@@ -35,7 +35,7 @@ module AsposeSlidesCloud
35
35
  def self.attribute_map
36
36
  {
37
37
  :'self_uri' => :'SelfUri',
38
- :'alternate_links' => :'AlternateLinks'
38
+ :'alternate_links' => :'AlternateLinks',
39
39
  }
40
40
  end
41
41
 
@@ -43,7 +43,7 @@ module AsposeSlidesCloud
43
43
  def self.swagger_types
44
44
  {
45
45
  :'self_uri' => :'ResourceUri',
46
- :'alternate_links' => :'Array<ResourceUri>'
46
+ :'alternate_links' => :'Array<ResourceUri>',
47
47
  }
48
48
  end
49
49
 
@@ -43,7 +43,7 @@ module AsposeSlidesCloud
43
43
  :'href' => :'Href',
44
44
  :'relation' => :'Relation',
45
45
  :'link_type' => :'LinkType',
46
- :'title' => :'Title'
46
+ :'title' => :'Title',
47
47
  }
48
48
  end
49
49
 
@@ -53,7 +53,7 @@ module AsposeSlidesCloud
53
53
  :'href' => :'String',
54
54
  :'relation' => :'String',
55
55
  :'link_type' => :'String',
56
- :'title' => :'String'
56
+ :'title' => :'String',
57
57
  }
58
58
  end
59
59
 
@@ -31,14 +31,14 @@ module AsposeSlidesCloud
31
31
  # Attribute mapping from ruby-style variable name to JSON key.
32
32
  def self.attribute_map
33
33
  {
34
- :'uri' => :'Uri'
34
+ :'uri' => :'Uri',
35
35
  }
36
36
  end
37
37
 
38
38
  # Attribute type mapping.
39
39
  def self.swagger_types
40
40
  {
41
- :'uri' => :'ResourceUri'
41
+ :'uri' => :'ResourceUri',
42
42
  }
43
43
  end
44
44
 
@@ -24,10 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Represents output file that will be sent to response.
27
- class ResponseOutputFile
28
- # File type.
29
- attr_accessor :type
30
-
27
+ class ResponseOutputFile < OutputFile
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 = "Response"
79
- end
65
+ super
66
+ self.type = "Response"
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', ['Path', 'Response'])
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', ['Path', 'Response'])
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)
@@ -24,10 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Save slide task.
27
- class Save
28
- # Task type.
29
- attr_accessor :type
30
-
27
+ class Save < Task
31
28
  # Format.
32
29
  attr_accessor :format
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
  :'format' => :'Format',
67
63
  :'output' => :'Output',
68
- :'options' => :'Options'
69
- }
64
+ :'options' => :'Options',
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
  :'format' => :'String',
77
72
  :'output' => :'OutputFile',
78
- :'options' => :'ExportOptions'
79
- }
73
+ :'options' => :'ExportOptions',
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 = "Save"
94
- end
80
+ super
95
81
 
96
82
  if attributes.has_key?(:'Format')
97
83
  self.format = attributes[:'Format']
@@ -104,16 +90,13 @@ module AsposeSlidesCloud
104
90
  if attributes.has_key?(:'Options')
105
91
  self.options = attributes[:'Options']
106
92
  end
93
+ self.type = "Save"
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 @format.nil?
118
101
  invalid_properties.push('invalid value for "format", format cannot be nil.')
119
102
  end
@@ -124,25 +107,13 @@ module AsposeSlidesCloud
124
107
  # Check to see if the all the properties in the model are valid
125
108
  # @return true if the model is valid
126
109
  def valid?
127
- return false if @type.nil?
128
- type_validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
129
- return false unless type_validator.valid?(@type)
110
+ return false if !super
130
111
  return false if @format.nil?
131
112
  format_validator = EnumAttributeValidator.new('String', ['Pdf', 'Xps', 'Tiff', 'Pptx', 'Odp', 'Otp', 'Ppt', 'Pps', 'Ppsx', 'Pptm', 'Ppsm', 'Pot', 'Potx', 'Potm', 'Html', 'Swf', 'Svg', 'Jpeg', 'Png', 'Gif', 'Bmp', 'Fodp'])
132
113
  return false unless format_validator.valid?(@format)
133
114
  true
134
115
  end
135
116
 
136
- # Custom attribute writer method checking allowed values (enum).
137
- # @param [Object] type Object to be assigned
138
- def type=(type)
139
- validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
140
- unless validator.valid?(type)
141
- fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
142
- end
143
- @type = type
144
- end
145
-
146
117
  # Custom attribute writer method checking allowed values (enum).
147
118
  # @param [Object] format Object to be assigned
148
119
  def format=(format)
@@ -24,10 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Save shape task.
27
- class SaveShape
28
- # Task type.
29
- attr_accessor :type
30
-
27
+ class SaveShape < Task
31
28
  # Format.
32
29
  attr_accessor :format
33
30
 
@@ -64,39 +61,28 @@ module AsposeSlidesCloud
64
61
 
65
62
  # Attribute mapping from ruby-style variable name to JSON key.
66
63
  def self.attribute_map
67
- {
68
- :'type' => :'Type',
64
+ super.merge({
69
65
  :'format' => :'Format',
70
66
  :'shape_path' => :'ShapePath',
71
67
  :'output' => :'Output',
72
- :'options' => :'Options'
73
- }
68
+ :'options' => :'Options',
69
+ })
74
70
  end
75
71
 
76
72
  # Attribute type mapping.
77
73
  def self.swagger_types
78
- {
79
- :'type' => :'String',
74
+ super.merge({
80
75
  :'format' => :'String',
81
76
  :'shape_path' => :'String',
82
77
  :'output' => :'OutputFile',
83
- :'options' => :'IShapeExportOptions'
84
- }
78
+ :'options' => :'IShapeExportOptions',
79
+ })
85
80
  end
86
81
 
87
82
  # Initializes the object
88
83
  # @param [Hash] attributes Model attributes in the form of hash
89
84
  def initialize(attributes = {})
90
- return unless attributes.is_a?(Hash)
91
-
92
- # convert string to symbol for hash key
93
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
94
-
95
- if attributes.has_key?(:'Type')
96
- self.type = attributes[:'Type']
97
- else
98
- self.type = "SaveShape"
99
- end
85
+ super
100
86
 
101
87
  if attributes.has_key?(:'Format')
102
88
  self.format = attributes[:'Format']
@@ -113,16 +99,13 @@ module AsposeSlidesCloud
113
99
  if attributes.has_key?(:'Options')
114
100
  self.options = attributes[:'Options']
115
101
  end
102
+ self.type = "SaveShape"
116
103
  end
117
104
 
118
105
  # Show invalid properties with the reasons. Usually used together with valid?
119
106
  # @return Array for valid properties with the reasons
120
107
  def list_invalid_properties
121
- invalid_properties = Array.new
122
- if @type.nil?
123
- invalid_properties.push('invalid value for "type", type cannot be nil.')
124
- end
125
-
108
+ invalid_properties = super
126
109
  if @format.nil?
127
110
  invalid_properties.push('invalid value for "format", format cannot be nil.')
128
111
  end
@@ -133,25 +116,13 @@ module AsposeSlidesCloud
133
116
  # Check to see if the all the properties in the model are valid
134
117
  # @return true if the model is valid
135
118
  def valid?
136
- return false if @type.nil?
137
- type_validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
138
- return false unless type_validator.valid?(@type)
119
+ return false if !super
139
120
  return false if @format.nil?
140
121
  format_validator = EnumAttributeValidator.new('String', ['Jpeg', 'Png', 'Gif', 'Bmp', 'Tiff', 'Svg'])
141
122
  return false unless format_validator.valid?(@format)
142
123
  true
143
124
  end
144
125
 
145
- # Custom attribute writer method checking allowed values (enum).
146
- # @param [Object] type Object to be assigned
147
- def type=(type)
148
- validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
149
- unless validator.valid?(type)
150
- fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
151
- end
152
- @type = type
153
- end
154
-
155
126
  # Custom attribute writer method checking allowed values (enum).
156
127
  # @param [Object] format Object to be assigned
157
128
  def format=(format)
@@ -24,10 +24,7 @@ require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
26
  # Save slide task.
27
- class SaveSlide
28
- # Task type.
29
- attr_accessor :type
30
-
27
+ class SaveSlide < Task
31
28
  # Output to save the slide to.
32
29
  attr_accessor :output
33
30
 
@@ -70,43 +67,32 @@ module AsposeSlidesCloud
70
67
 
71
68
  # Attribute mapping from ruby-style variable name to JSON key.
72
69
  def self.attribute_map
73
- {
74
- :'type' => :'Type',
70
+ super.merge({
75
71
  :'output' => :'Output',
76
72
  :'format' => :'Format',
77
73
  :'options' => :'Options',
78
74
  :'width' => :'Width',
79
75
  :'height' => :'Height',
80
- :'position' => :'Position'
81
- }
76
+ :'position' => :'Position',
77
+ })
82
78
  end
83
79
 
84
80
  # Attribute type mapping.
85
81
  def self.swagger_types
86
- {
87
- :'type' => :'String',
82
+ super.merge({
88
83
  :'output' => :'OutputFile',
89
84
  :'format' => :'String',
90
85
  :'options' => :'ExportOptions',
91
86
  :'width' => :'Integer',
92
87
  :'height' => :'Integer',
93
- :'position' => :'Integer'
94
- }
88
+ :'position' => :'Integer',
89
+ })
95
90
  end
96
91
 
97
92
  # Initializes the object
98
93
  # @param [Hash] attributes Model attributes in the form of hash
99
94
  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?(:'Type')
106
- self.type = attributes[:'Type']
107
- else
108
- self.type = "SaveSlide"
109
- end
95
+ super
110
96
 
111
97
  if attributes.has_key?(:'Output')
112
98
  self.output = attributes[:'Output']
@@ -131,16 +117,13 @@ module AsposeSlidesCloud
131
117
  if attributes.has_key?(:'Position')
132
118
  self.position = attributes[:'Position']
133
119
  end
120
+ self.type = "SaveSlide"
134
121
  end
135
122
 
136
123
  # Show invalid properties with the reasons. Usually used together with valid?
137
124
  # @return Array for valid properties with the reasons
138
125
  def list_invalid_properties
139
- invalid_properties = Array.new
140
- if @type.nil?
141
- invalid_properties.push('invalid value for "type", type cannot be nil.')
142
- end
143
-
126
+ invalid_properties = super
144
127
  if @format.nil?
145
128
  invalid_properties.push('invalid value for "format", format cannot be nil.')
146
129
  end
@@ -155,9 +138,7 @@ module AsposeSlidesCloud
155
138
  # Check to see if the all the properties in the model are valid
156
139
  # @return true if the model is valid
157
140
  def valid?
158
- return false if @type.nil?
159
- type_validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
160
- return false unless type_validator.valid?(@type)
141
+ return false if !super
161
142
  return false if @format.nil?
162
143
  format_validator = EnumAttributeValidator.new('String', ['Jpeg', 'Png', 'Gif', 'Bmp', 'Tiff', 'Html', 'Pdf', 'Xps', 'Pptx', 'Odp', 'Otp', 'Ppt', 'Pps', 'Ppsx', 'Pptm', 'Ppsm', 'Potx', 'Pot', 'Potm', 'Svg', 'Fodp'])
163
144
  return false unless format_validator.valid?(@format)
@@ -165,16 +146,6 @@ module AsposeSlidesCloud
165
146
  true
166
147
  end
167
148
 
168
- # Custom attribute writer method checking allowed values (enum).
169
- # @param [Object] type Object to be assigned
170
- def type=(type)
171
- validator = EnumAttributeValidator.new('String', ['Save', 'SaveSlide', 'SaveShape', 'AddSlide', 'AddMasterSlide', 'AddLayoutSlide', 'RemoveSlide', 'ReoderSlide', 'Merge', 'UpdateBackground', 'ResetSlide', 'AddShape', 'RemoveShape', 'UpdateShape', 'ReplaceText'])
172
- unless validator.valid?(type)
173
- fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
174
- end
175
- @type = type
176
- end
177
-
178
149
  # Custom attribute writer method checking allowed values (enum).
179
150
  # @param [Object] format Object to be assigned
180
151
  def format=(format)