aspose_slides_cloud 22.4.0 → 22.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -0
  3. data/TestData/oleObject.xlsx +0 -0
  4. data/TestData/test.pptx +0 -0
  5. data/lib/aspose_slides_cloud/models/{waterfall_series.rb → alpha_bi_level_effect.rb} +16 -26
  6. data/lib/aspose_slides_cloud/models/alpha_ceiling_effect.rb +223 -0
  7. data/lib/aspose_slides_cloud/models/alpha_floor_effect.rb +223 -0
  8. data/lib/aspose_slides_cloud/models/alpha_inverse_effect.rb +223 -0
  9. data/lib/aspose_slides_cloud/models/alpha_modulate_effect.rb +223 -0
  10. data/lib/aspose_slides_cloud/models/alpha_modulate_fixed_effect.rb +238 -0
  11. data/lib/aspose_slides_cloud/models/alpha_replace_effect.rb +238 -0
  12. data/lib/aspose_slides_cloud/models/bi_level_effect.rb +238 -0
  13. data/lib/aspose_slides_cloud/models/blur_image_effect.rb +253 -0
  14. data/lib/aspose_slides_cloud/models/color_change_effect.rb +243 -0
  15. data/lib/aspose_slides_cloud/models/color_replace_effect.rb +233 -0
  16. data/lib/aspose_slides_cloud/models/duotone_effect.rb +243 -0
  17. data/lib/aspose_slides_cloud/models/{box_and_whisker_series.rb → fill_overlay_image_effect.rb} +31 -71
  18. data/lib/aspose_slides_cloud/models/{waterfall_chart_data_point.rb → gray_scale_effect.rb} +26 -13
  19. data/lib/aspose_slides_cloud/models/hsl_effect.rb +268 -0
  20. data/lib/aspose_slides_cloud/models/image_transform_effect.rb +244 -0
  21. data/lib/aspose_slides_cloud/models/luminance_effect.rb +253 -0
  22. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +12 -2
  23. data/lib/aspose_slides_cloud/models/one_value_series.rb +74 -2
  24. data/lib/aspose_slides_cloud/models/picture_fill.rb +14 -2
  25. data/lib/aspose_slides_cloud/models/resource_uri.rb +22 -2
  26. data/lib/aspose_slides_cloud/models/smart_art_node.rb +12 -2
  27. data/lib/aspose_slides_cloud/models/tint_effect.rb +253 -0
  28. data/lib/aspose_slides_cloud/models/video_frame.rb +12 -2
  29. data/lib/aspose_slides_cloud/type_registry.rb +35 -6
  30. data/lib/aspose_slides_cloud/version.rb +1 -1
  31. data/lib/aspose_slides_cloud.rb +18 -3
  32. data/testRules.json +1 -1
  33. metadata +21 -5
@@ -0,0 +1,238 @@
1
+ =begin
2
+ Copyright (c) 2019 Aspose Pty Ltd
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
21
+ =end
22
+
23
+ require 'date'
24
+
25
+ module AsposeSlidesCloud
26
+ # Represents an Alpha Replace Effect effect.
27
+ class AlphaReplaceEffect < ImageTransformEffect
28
+ # The new opacity value.
29
+ attr_accessor :alpha
30
+
31
+ class EnumAttributeValidator
32
+ attr_reader :datatype
33
+ attr_reader :allowable_values
34
+
35
+ def initialize(datatype, allowable_values)
36
+ @allowable_values = allowable_values.map do |value|
37
+ case datatype.to_s
38
+ when /Integer/i
39
+ value.to_i
40
+ when /Float/i
41
+ value.to_f
42
+ else
43
+ value
44
+ end
45
+ end
46
+ end
47
+
48
+ def valid?(value)
49
+ !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
50
+ end
51
+ end
52
+
53
+ # Attribute mapping from ruby-style variable name to JSON key.
54
+ def self.attribute_map
55
+ super.merge({
56
+ :'alpha' => :'Alpha',
57
+ })
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.swagger_types
62
+ super.merge({
63
+ :'alpha' => :'Float',
64
+ })
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ super
71
+
72
+ if attributes.has_key?(:'Alpha')
73
+ self.alpha = attributes[:'Alpha']
74
+ end
75
+ self.type = "AlphaReplace"
76
+ end
77
+
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properties with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = super
82
+ if @alpha.nil?
83
+ invalid_properties.push('invalid value for "alpha", alpha cannot be nil.')
84
+ end
85
+
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ return false if !super
93
+ return false if @alpha.nil?
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ type == o.type &&
103
+ alpha == o.alpha
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Fixnum] Hash code
114
+ def hash
115
+ [type, alpha].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ self.class.swagger_types.each_pair do |key, type|
124
+ mapKey = self.class.attribute_map[key]
125
+ if !mapKey.nil?
126
+ val = attributes[mapKey]
127
+ if val.nil?
128
+ mapKeyString = mapKey.to_s
129
+ mapKeyString[0] = mapKeyString[0].downcase
130
+ mapKey = mapKeyString.to_sym
131
+ val = attributes[mapKey]
132
+ end
133
+ if !val.nil?
134
+ if type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the the attribute
136
+ # is documented as an array but the input is not
137
+ if val.is_a?(Array)
138
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
139
+ end
140
+ else
141
+ self.send("#{key}=", _deserialize(type, val))
142
+ end
143
+ end
144
+ end
145
+ end
146
+
147
+ self
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def _deserialize(type, value)
155
+ case type.to_sym
156
+ when :DateTime
157
+ DateTime.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :BOOLEAN
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
188
+ if registry_type
189
+ type = registry_type
190
+ end
191
+ temp_model = AsposeSlidesCloud.const_get(type).new
192
+ temp_model.build_from_hash(value)
193
+ end
194
+ end
195
+
196
+ # Returns the string representation of the object
197
+ # @return [String] String presentation of the object
198
+ def to_s
199
+ to_hash.to_s
200
+ end
201
+
202
+ # to_body is an alias to to_hash (backward compatibility)
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_body
205
+ to_hash
206
+ end
207
+
208
+ # Returns the object in the form of hash
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_hash
211
+ hash = {}
212
+ self.class.attribute_map.each_pair do |attr, param|
213
+ value = self.send(attr)
214
+ next if value.nil?
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+ end
238
+ end
@@ -0,0 +1,238 @@
1
+ =begin
2
+ Copyright (c) 2019 Aspose Pty Ltd
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
21
+ =end
22
+
23
+ require 'date'
24
+
25
+ module AsposeSlidesCloud
26
+ # Represents an BiLevel effect.
27
+ class BiLevelEffect < ImageTransformEffect
28
+ # Returns effect threshold.
29
+ attr_accessor :threshold
30
+
31
+ class EnumAttributeValidator
32
+ attr_reader :datatype
33
+ attr_reader :allowable_values
34
+
35
+ def initialize(datatype, allowable_values)
36
+ @allowable_values = allowable_values.map do |value|
37
+ case datatype.to_s
38
+ when /Integer/i
39
+ value.to_i
40
+ when /Float/i
41
+ value.to_f
42
+ else
43
+ value
44
+ end
45
+ end
46
+ end
47
+
48
+ def valid?(value)
49
+ !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
50
+ end
51
+ end
52
+
53
+ # Attribute mapping from ruby-style variable name to JSON key.
54
+ def self.attribute_map
55
+ super.merge({
56
+ :'threshold' => :'Threshold',
57
+ })
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.swagger_types
62
+ super.merge({
63
+ :'threshold' => :'Float',
64
+ })
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ super
71
+
72
+ if attributes.has_key?(:'Threshold')
73
+ self.threshold = attributes[:'Threshold']
74
+ end
75
+ self.type = "BiLevel"
76
+ end
77
+
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properties with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = super
82
+ if @threshold.nil?
83
+ invalid_properties.push('invalid value for "threshold", threshold cannot be nil.')
84
+ end
85
+
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ return false if !super
93
+ return false if @threshold.nil?
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ type == o.type &&
103
+ threshold == o.threshold
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Fixnum] Hash code
114
+ def hash
115
+ [type, threshold].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ self.class.swagger_types.each_pair do |key, type|
124
+ mapKey = self.class.attribute_map[key]
125
+ if !mapKey.nil?
126
+ val = attributes[mapKey]
127
+ if val.nil?
128
+ mapKeyString = mapKey.to_s
129
+ mapKeyString[0] = mapKeyString[0].downcase
130
+ mapKey = mapKeyString.to_sym
131
+ val = attributes[mapKey]
132
+ end
133
+ if !val.nil?
134
+ if type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the the attribute
136
+ # is documented as an array but the input is not
137
+ if val.is_a?(Array)
138
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
139
+ end
140
+ else
141
+ self.send("#{key}=", _deserialize(type, val))
142
+ end
143
+ end
144
+ end
145
+ end
146
+
147
+ self
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def _deserialize(type, value)
155
+ case type.to_sym
156
+ when :DateTime
157
+ DateTime.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :BOOLEAN
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
188
+ if registry_type
189
+ type = registry_type
190
+ end
191
+ temp_model = AsposeSlidesCloud.const_get(type).new
192
+ temp_model.build_from_hash(value)
193
+ end
194
+ end
195
+
196
+ # Returns the string representation of the object
197
+ # @return [String] String presentation of the object
198
+ def to_s
199
+ to_hash.to_s
200
+ end
201
+
202
+ # to_body is an alias to to_hash (backward compatibility)
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_body
205
+ to_hash
206
+ end
207
+
208
+ # Returns the object in the form of hash
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_hash
211
+ hash = {}
212
+ self.class.attribute_map.each_pair do |attr, param|
213
+ value = self.send(attr)
214
+ next if value.nil?
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+ end
238
+ end