aspose_slides_cloud 22.2.0 → 22.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +7 -7
  3. data/LICENSE +20 -20
  4. data/README.md +27 -0
  5. data/Rakefile +8 -8
  6. data/TestData/oleObject.xlsx +0 -0
  7. data/TestData/test.pptx +0 -0
  8. data/aspose_slides_cloud.gemspec +56 -56
  9. data/lib/aspose_slides_cloud/api/slides_api.rb +192 -13
  10. data/lib/aspose_slides_cloud/api_error.rb +48 -48
  11. data/lib/aspose_slides_cloud/configuration.rb +188 -188
  12. data/lib/aspose_slides_cloud/models/access_permissions.rb +321 -0
  13. data/lib/aspose_slides_cloud/models/{waterfall_series.rb → alpha_bi_level_effect.rb} +16 -26
  14. data/lib/aspose_slides_cloud/models/alpha_ceiling_effect.rb +223 -0
  15. data/lib/aspose_slides_cloud/models/alpha_floor_effect.rb +223 -0
  16. data/lib/aspose_slides_cloud/models/alpha_inverse_effect.rb +223 -0
  17. data/lib/aspose_slides_cloud/models/alpha_modulate_effect.rb +223 -0
  18. data/lib/aspose_slides_cloud/models/alpha_modulate_fixed_effect.rb +238 -0
  19. data/lib/aspose_slides_cloud/models/alpha_replace_effect.rb +238 -0
  20. data/lib/aspose_slides_cloud/models/audio_frame.rb +12 -3
  21. data/lib/aspose_slides_cloud/models/axis.rb +22 -2
  22. data/lib/aspose_slides_cloud/models/bi_level_effect.rb +238 -0
  23. data/lib/aspose_slides_cloud/models/blur_image_effect.rb +253 -0
  24. data/lib/aspose_slides_cloud/models/chart.rb +1 -2
  25. data/lib/aspose_slides_cloud/models/chart_lines_format.rb +221 -0
  26. data/lib/aspose_slides_cloud/models/color_change_effect.rb +243 -0
  27. data/lib/aspose_slides_cloud/models/color_replace_effect.rb +233 -0
  28. data/lib/aspose_slides_cloud/models/connector.rb +1 -2
  29. data/lib/aspose_slides_cloud/models/duotone_effect.rb +243 -0
  30. data/lib/aspose_slides_cloud/models/export_options.rb +10 -18
  31. data/lib/aspose_slides_cloud/models/fill_overlay_image_effect.rb +260 -0
  32. data/lib/aspose_slides_cloud/models/font_fallback_rule.rb +243 -0
  33. data/lib/aspose_slides_cloud/models/geometry_shape.rb +1 -2
  34. data/lib/aspose_slides_cloud/models/gif_export_options.rb +4 -3
  35. data/lib/aspose_slides_cloud/models/graphical_object.rb +1 -2
  36. data/lib/aspose_slides_cloud/models/{waterfall_chart_data_point.rb → gray_scale_effect.rb} +26 -13
  37. data/lib/aspose_slides_cloud/models/group_shape.rb +12 -3
  38. data/lib/aspose_slides_cloud/models/hsl_effect.rb +268 -0
  39. data/lib/aspose_slides_cloud/models/html5_export_options.rb +2 -3
  40. data/lib/aspose_slides_cloud/models/html_export_options.rb +2 -3
  41. data/lib/aspose_slides_cloud/models/image_export_options.rb +4 -3
  42. data/lib/aspose_slides_cloud/models/image_export_options_base.rb +222 -0
  43. data/lib/aspose_slides_cloud/models/image_transform_effect.rb +244 -0
  44. data/lib/aspose_slides_cloud/models/legend.rb +12 -2
  45. data/lib/aspose_slides_cloud/models/luminance_effect.rb +253 -0
  46. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +72 -3
  47. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +12 -2
  48. data/lib/aspose_slides_cloud/models/one_value_series.rb +74 -2
  49. data/lib/aspose_slides_cloud/models/paragraph.rb +12 -2
  50. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +3 -16
  51. data/lib/aspose_slides_cloud/models/picture_fill.rb +14 -2
  52. data/lib/aspose_slides_cloud/models/picture_frame.rb +1 -2
  53. data/lib/aspose_slides_cloud/models/portion.rb +32 -2
  54. data/lib/aspose_slides_cloud/models/portion_format.rb +633 -0
  55. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +2 -3
  56. data/lib/aspose_slides_cloud/models/resource_uri.rb +22 -2
  57. data/lib/aspose_slides_cloud/models/section_zoom_frame.rb +1 -2
  58. data/lib/aspose_slides_cloud/models/shape.rb +1 -2
  59. data/lib/aspose_slides_cloud/models/shape_base.rb +1 -11
  60. data/lib/aspose_slides_cloud/models/shape_type.rb +54 -0
  61. data/lib/aspose_slides_cloud/models/slide_comment.rb +32 -48
  62. data/lib/aspose_slides_cloud/models/slide_comment_base.rb +286 -0
  63. data/lib/aspose_slides_cloud/models/slide_comments.rb +1 -1
  64. data/lib/aspose_slides_cloud/models/{box_and_whisker_series.rb → slide_modern_comment.rb} +37 -68
  65. data/lib/aspose_slides_cloud/models/smart_art.rb +1 -2
  66. data/lib/aspose_slides_cloud/models/smart_art_node.rb +12 -2
  67. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +1 -2
  68. data/lib/aspose_slides_cloud/models/summary_zoom_frame.rb +1 -2
  69. data/lib/aspose_slides_cloud/models/summary_zoom_section.rb +1 -2
  70. data/lib/aspose_slides_cloud/models/svg_export_options.rb +2 -3
  71. data/lib/aspose_slides_cloud/models/swf_export_options.rb +2 -3
  72. data/lib/aspose_slides_cloud/models/table.rb +1 -2
  73. data/lib/aspose_slides_cloud/models/table_cell.rb +22 -2
  74. data/lib/aspose_slides_cloud/models/text_bounds.rb +261 -0
  75. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +4 -3
  76. data/lib/aspose_slides_cloud/models/tint_effect.rb +253 -0
  77. data/lib/aspose_slides_cloud/models/video_export_options.rb +35 -4
  78. data/lib/aspose_slides_cloud/models/video_frame.rb +12 -3
  79. data/lib/aspose_slides_cloud/models/xaml_export_options.rb +2 -3
  80. data/lib/aspose_slides_cloud/models/xps_export_options.rb +2 -3
  81. data/lib/aspose_slides_cloud/models/zoom_frame.rb +1 -2
  82. data/lib/aspose_slides_cloud/models/zoom_object.rb +2 -2
  83. data/lib/aspose_slides_cloud/type_registry.rb +54 -13
  84. data/lib/aspose_slides_cloud/version.rb +1 -1
  85. data/lib/aspose_slides_cloud.rb +31 -7
  86. data/spec/api/slides_api_spec.rb +585 -33
  87. data/spec/spec_helper.rb +122 -122
  88. data/spec/use_cases/merge_spec.rb +0 -1
  89. data/spec/use_cases/shape_spec.rb +0 -2
  90. data/testRules.json +6 -4
  91. metadata +30 -7
  92. data/Dockerfile +0 -16
  93. data/docker-entrypoint.sh +0 -7
@@ -0,0 +1,321 @@
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
+ # A set of properties specifying which access permissions should be granted when the document is opened with user access.
27
+ class AccessPermissions
28
+ # The user may print the document (possibly not at the highest quality level, depending on whether bit HighQualityPrint is also set).
29
+ attr_accessor :print_document
30
+
31
+ # The user may modify the contents of the document by operations other than those controlled by bits AddOrModifyFields, FillExistingFields, AssembleDocument.
32
+ attr_accessor :modify_content
33
+
34
+ # The user may copy or otherwise extract text and graphics from the document by operations other than that controlled by bit ExtractTextAndGraphics.
35
+ attr_accessor :copy_text_and_graphics
36
+
37
+ # The user may add or modify text annotations, fill in interactive form fields, and, if bit ModifyContent is also set, create or modify interactive form fields (including signature fields).
38
+ attr_accessor :add_or_modify_fields
39
+
40
+ # The user may fill in existing interactive form fields (including signature fields), even if bit AddOrModifyFields is clear.
41
+ attr_accessor :fill_existing_fields
42
+
43
+ # The user may extract text and graphics in support of accessibility to users with disabilities or for other purposes.
44
+ attr_accessor :extract_text_and_graphics
45
+
46
+ # The user may assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if bit ModifyContent is clear.
47
+ attr_accessor :assemble_document
48
+
49
+ # The user may print the document to a representation from which a faithful digital copy of the PDF content could be generated. When this bit is clear (and bit PrintDocument is set), printing is limited to a low-level representation of the appearance, possibly of degraded quality.
50
+ attr_accessor :high_quality_print
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'print_document' => :'PrintDocument',
56
+ :'modify_content' => :'ModifyContent',
57
+ :'copy_text_and_graphics' => :'CopyTextAndGraphics',
58
+ :'add_or_modify_fields' => :'AddOrModifyFields',
59
+ :'fill_existing_fields' => :'FillExistingFields',
60
+ :'extract_text_and_graphics' => :'ExtractTextAndGraphics',
61
+ :'assemble_document' => :'AssembleDocument',
62
+ :'high_quality_print' => :'HighQualityPrint',
63
+ }
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.swagger_types
68
+ {
69
+ :'print_document' => :'BOOLEAN',
70
+ :'modify_content' => :'BOOLEAN',
71
+ :'copy_text_and_graphics' => :'BOOLEAN',
72
+ :'add_or_modify_fields' => :'BOOLEAN',
73
+ :'fill_existing_fields' => :'BOOLEAN',
74
+ :'extract_text_and_graphics' => :'BOOLEAN',
75
+ :'assemble_document' => :'BOOLEAN',
76
+ :'high_quality_print' => :'BOOLEAN',
77
+ }
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ return unless attributes.is_a?(Hash)
84
+
85
+ # convert string to symbol for hash key
86
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
87
+
88
+ if attributes.has_key?(:'PrintDocument')
89
+ self.print_document = attributes[:'PrintDocument']
90
+ end
91
+
92
+ if attributes.has_key?(:'ModifyContent')
93
+ self.modify_content = attributes[:'ModifyContent']
94
+ end
95
+
96
+ if attributes.has_key?(:'CopyTextAndGraphics')
97
+ self.copy_text_and_graphics = attributes[:'CopyTextAndGraphics']
98
+ end
99
+
100
+ if attributes.has_key?(:'AddOrModifyFields')
101
+ self.add_or_modify_fields = attributes[:'AddOrModifyFields']
102
+ end
103
+
104
+ if attributes.has_key?(:'FillExistingFields')
105
+ self.fill_existing_fields = attributes[:'FillExistingFields']
106
+ end
107
+
108
+ if attributes.has_key?(:'ExtractTextAndGraphics')
109
+ self.extract_text_and_graphics = attributes[:'ExtractTextAndGraphics']
110
+ end
111
+
112
+ if attributes.has_key?(:'AssembleDocument')
113
+ self.assemble_document = attributes[:'AssembleDocument']
114
+ end
115
+
116
+ if attributes.has_key?(:'HighQualityPrint')
117
+ self.high_quality_print = attributes[:'HighQualityPrint']
118
+ end
119
+ end
120
+
121
+ # Show invalid properties with the reasons. Usually used together with valid?
122
+ # @return Array for valid properties with the reasons
123
+ def list_invalid_properties
124
+ invalid_properties = Array.new
125
+ if @print_document.nil?
126
+ invalid_properties.push('invalid value for "print_document", print_document cannot be nil.')
127
+ end
128
+
129
+ if @modify_content.nil?
130
+ invalid_properties.push('invalid value for "modify_content", modify_content cannot be nil.')
131
+ end
132
+
133
+ if @copy_text_and_graphics.nil?
134
+ invalid_properties.push('invalid value for "copy_text_and_graphics", copy_text_and_graphics cannot be nil.')
135
+ end
136
+
137
+ if @add_or_modify_fields.nil?
138
+ invalid_properties.push('invalid value for "add_or_modify_fields", add_or_modify_fields cannot be nil.')
139
+ end
140
+
141
+ if @fill_existing_fields.nil?
142
+ invalid_properties.push('invalid value for "fill_existing_fields", fill_existing_fields cannot be nil.')
143
+ end
144
+
145
+ if @extract_text_and_graphics.nil?
146
+ invalid_properties.push('invalid value for "extract_text_and_graphics", extract_text_and_graphics cannot be nil.')
147
+ end
148
+
149
+ if @assemble_document.nil?
150
+ invalid_properties.push('invalid value for "assemble_document", assemble_document cannot be nil.')
151
+ end
152
+
153
+ if @high_quality_print.nil?
154
+ invalid_properties.push('invalid value for "high_quality_print", high_quality_print cannot be nil.')
155
+ end
156
+
157
+ invalid_properties
158
+ end
159
+
160
+ # Check to see if the all the properties in the model are valid
161
+ # @return true if the model is valid
162
+ def valid?
163
+ return false if @print_document.nil?
164
+ return false if @modify_content.nil?
165
+ return false if @copy_text_and_graphics.nil?
166
+ return false if @add_or_modify_fields.nil?
167
+ return false if @fill_existing_fields.nil?
168
+ return false if @extract_text_and_graphics.nil?
169
+ return false if @assemble_document.nil?
170
+ return false if @high_quality_print.nil?
171
+ true
172
+ end
173
+
174
+ # Checks equality by comparing each attribute.
175
+ # @param [Object] Object to be compared
176
+ def ==(o)
177
+ return true if self.equal?(o)
178
+ self.class == o.class &&
179
+ print_document == o.print_document &&
180
+ modify_content == o.modify_content &&
181
+ copy_text_and_graphics == o.copy_text_and_graphics &&
182
+ add_or_modify_fields == o.add_or_modify_fields &&
183
+ fill_existing_fields == o.fill_existing_fields &&
184
+ extract_text_and_graphics == o.extract_text_and_graphics &&
185
+ assemble_document == o.assemble_document &&
186
+ high_quality_print == o.high_quality_print
187
+ end
188
+
189
+ # @see the `==` method
190
+ # @param [Object] Object to be compared
191
+ def eql?(o)
192
+ self == o
193
+ end
194
+
195
+ # Calculates hash code according to all attributes.
196
+ # @return [Fixnum] Hash code
197
+ def hash
198
+ [print_document, modify_content, copy_text_and_graphics, add_or_modify_fields, fill_existing_fields, extract_text_and_graphics, assemble_document, high_quality_print].hash
199
+ end
200
+
201
+ # Builds the object from hash
202
+ # @param [Hash] attributes Model attributes in the form of hash
203
+ # @return [Object] Returns the model itself
204
+ def build_from_hash(attributes)
205
+ return nil unless attributes.is_a?(Hash)
206
+ self.class.swagger_types.each_pair do |key, type|
207
+ mapKey = self.class.attribute_map[key]
208
+ if !mapKey.nil?
209
+ val = attributes[mapKey]
210
+ if val.nil?
211
+ mapKeyString = mapKey.to_s
212
+ mapKeyString[0] = mapKeyString[0].downcase
213
+ mapKey = mapKeyString.to_sym
214
+ val = attributes[mapKey]
215
+ end
216
+ if !val.nil?
217
+ if type =~ /\AArray<(.*)>/i
218
+ # check to ensure the input is an array given that the the attribute
219
+ # is documented as an array but the input is not
220
+ if val.is_a?(Array)
221
+ self.send("#{key}=", val.map { |v| _deserialize($1, v) })
222
+ end
223
+ else
224
+ self.send("#{key}=", _deserialize(type, val))
225
+ end
226
+ end
227
+ end
228
+ end
229
+
230
+ self
231
+ end
232
+
233
+ # Deserializes the data based on type
234
+ # @param string type Data type
235
+ # @param string value Value to be deserialized
236
+ # @return [Object] Deserialized data
237
+ def _deserialize(type, value)
238
+ case type.to_sym
239
+ when :DateTime
240
+ DateTime.parse(value)
241
+ when :Date
242
+ Date.parse(value)
243
+ when :String
244
+ value.to_s
245
+ when :Integer
246
+ value.to_i
247
+ when :Float
248
+ value.to_f
249
+ when :BOOLEAN
250
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
251
+ true
252
+ else
253
+ false
254
+ end
255
+ when :Object
256
+ # generic object (usually a Hash), return directly
257
+ value
258
+ when /\AArray<(?<inner_type>.+)>\z/
259
+ inner_type = Regexp.last_match[:inner_type]
260
+ value.map { |v| _deserialize(inner_type, v) }
261
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
262
+ k_type = Regexp.last_match[:k_type]
263
+ v_type = Regexp.last_match[:v_type]
264
+ {}.tap do |hash|
265
+ value.each do |k, v|
266
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
267
+ end
268
+ end
269
+ else # model
270
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
271
+ if registry_type
272
+ type = registry_type
273
+ end
274
+ temp_model = AsposeSlidesCloud.const_get(type).new
275
+ temp_model.build_from_hash(value)
276
+ end
277
+ end
278
+
279
+ # Returns the string representation of the object
280
+ # @return [String] String presentation of the object
281
+ def to_s
282
+ to_hash.to_s
283
+ end
284
+
285
+ # to_body is an alias to to_hash (backward compatibility)
286
+ # @return [Hash] Returns the object in the form of hash
287
+ def to_body
288
+ to_hash
289
+ end
290
+
291
+ # Returns the object in the form of hash
292
+ # @return [Hash] Returns the object in the form of hash
293
+ def to_hash
294
+ hash = {}
295
+ self.class.attribute_map.each_pair do |attr, param|
296
+ value = self.send(attr)
297
+ next if value.nil?
298
+ hash[param] = _to_hash(value)
299
+ end
300
+ hash
301
+ end
302
+
303
+ # Outputs non-array value in the form of hash
304
+ # For object, use to_hash. Otherwise, just return the value
305
+ # @param [Object] value Any valid value
306
+ # @return [Hash] Returns the value in the form of hash
307
+ def _to_hash(value)
308
+ if value.is_a?(Array)
309
+ value.compact.map { |v| _to_hash(v) }
310
+ elsif value.is_a?(Hash)
311
+ {}.tap do |hash|
312
+ value.each { |k, v| hash[k] = _to_hash(v) }
313
+ end
314
+ elsif value.respond_to? :to_hash
315
+ value.to_hash
316
+ else
317
+ value
318
+ end
319
+ end
320
+ end
321
+ end
@@ -23,10 +23,10 @@ SOFTWARE.
23
23
  require 'date'
24
24
 
25
25
  module AsposeSlidesCloud
26
- # One value series.
27
- class WaterfallSeries < OneValueSeries
28
- # True if inner points are shown.
29
- attr_accessor :show_connector_lines
26
+ # Represents an Alpha Bi-Level effect.
27
+ class AlphaBiLevelEffect < ImageTransformEffect
28
+ # Returns effect threshold.
29
+ attr_accessor :threshold
30
30
 
31
31
  class EnumAttributeValidator
32
32
  attr_reader :datatype
@@ -53,14 +53,14 @@ module AsposeSlidesCloud
53
53
  # Attribute mapping from ruby-style variable name to JSON key.
54
54
  def self.attribute_map
55
55
  super.merge({
56
- :'show_connector_lines' => :'ShowConnectorLines',
56
+ :'threshold' => :'Threshold',
57
57
  })
58
58
  end
59
59
 
60
60
  # Attribute type mapping.
61
61
  def self.swagger_types
62
62
  super.merge({
63
- :'show_connector_lines' => :'BOOLEAN',
63
+ :'threshold' => :'Float',
64
64
  })
65
65
  end
66
66
 
@@ -69,16 +69,20 @@ module AsposeSlidesCloud
69
69
  def initialize(attributes = {})
70
70
  super
71
71
 
72
- if attributes.has_key?(:'ShowConnectorLines')
73
- self.show_connector_lines = attributes[:'ShowConnectorLines']
72
+ if attributes.has_key?(:'Threshold')
73
+ self.threshold = attributes[:'Threshold']
74
74
  end
75
- self.data_point_type = "OneValue"
75
+ self.type = "AlphaBiLevel"
76
76
  end
77
77
 
78
78
  # Show invalid properties with the reasons. Usually used together with valid?
79
79
  # @return Array for valid properties with the reasons
80
80
  def list_invalid_properties
81
81
  invalid_properties = super
82
+ if @threshold.nil?
83
+ invalid_properties.push('invalid value for "threshold", threshold cannot be nil.')
84
+ end
85
+
82
86
  invalid_properties
83
87
  end
84
88
 
@@ -86,6 +90,7 @@ module AsposeSlidesCloud
86
90
  # @return true if the model is valid
87
91
  def valid?
88
92
  return false if !super
93
+ return false if @threshold.nil?
89
94
  true
90
95
  end
91
96
 
@@ -95,22 +100,7 @@ module AsposeSlidesCloud
95
100
  return true if self.equal?(o)
96
101
  self.class == o.class &&
97
102
  type == o.type &&
98
- name == o.name &&
99
- is_color_varied == o.is_color_varied &&
100
- inverted_solid_fill_color == o.inverted_solid_fill_color &&
101
- smooth == o.smooth &&
102
- plot_on_second_axis == o.plot_on_second_axis &&
103
- order == o.order &&
104
- invert_if_negative == o.invert_if_negative &&
105
- explosion == o.explosion &&
106
- marker == o.marker &&
107
- fill_format == o.fill_format &&
108
- effect_format == o.effect_format &&
109
- line_format == o.line_format &&
110
- data_point_type == o.data_point_type &&
111
- data_points == o.data_points &&
112
- number_format_of_values == o.number_format_of_values &&
113
- show_connector_lines == o.show_connector_lines
103
+ threshold == o.threshold
114
104
  end
115
105
 
116
106
  # @see the `==` method
@@ -122,7 +112,7 @@ module AsposeSlidesCloud
122
112
  # Calculates hash code according to all attributes.
123
113
  # @return [Fixnum] Hash code
124
114
  def hash
125
- [type, name, is_color_varied, inverted_solid_fill_color, smooth, plot_on_second_axis, order, invert_if_negative, explosion, marker, fill_format, effect_format, line_format, data_point_type, data_points, number_format_of_values, show_connector_lines].hash
115
+ [type, threshold].hash
126
116
  end
127
117
 
128
118
  # Builds the object from hash
@@ -0,0 +1,223 @@
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 Ceiling effect.
27
+ class AlphaCeilingEffect < ImageTransformEffect
28
+ class EnumAttributeValidator
29
+ attr_reader :datatype
30
+ attr_reader :allowable_values
31
+
32
+ def initialize(datatype, allowable_values)
33
+ @allowable_values = allowable_values.map do |value|
34
+ case datatype.to_s
35
+ when /Integer/i
36
+ value.to_i
37
+ when /Float/i
38
+ value.to_f
39
+ else
40
+ value
41
+ end
42
+ end
43
+ end
44
+
45
+ def valid?(value)
46
+ !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
47
+ end
48
+ end
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ super.merge({
53
+ })
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.swagger_types
58
+ super.merge({
59
+ })
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ super
66
+ self.type = "AlphaCeiling"
67
+ end
68
+
69
+ # Show invalid properties with the reasons. Usually used together with valid?
70
+ # @return Array for valid properties with the reasons
71
+ def list_invalid_properties
72
+ invalid_properties = super
73
+ invalid_properties
74
+ end
75
+
76
+ # Check to see if the all the properties in the model are valid
77
+ # @return true if the model is valid
78
+ def valid?
79
+ return false if !super
80
+ true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ type == o.type
89
+ end
90
+
91
+ # @see the `==` method
92
+ # @param [Object] Object to be compared
93
+ def eql?(o)
94
+ self == o
95
+ end
96
+
97
+ # Calculates hash code according to all attributes.
98
+ # @return [Fixnum] Hash code
99
+ def hash
100
+ [type].hash
101
+ end
102
+
103
+ # Builds the object from hash
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ # @return [Object] Returns the model itself
106
+ def build_from_hash(attributes)
107
+ return nil unless attributes.is_a?(Hash)
108
+ self.class.swagger_types.each_pair do |key, type|
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
128
+ end
129
+ end
130
+ end
131
+
132
+ self
133
+ end
134
+
135
+ # Deserializes the data based on type
136
+ # @param string type Data type
137
+ # @param string value Value to be deserialized
138
+ # @return [Object] Deserialized data
139
+ def _deserialize(type, value)
140
+ case type.to_sym
141
+ when :DateTime
142
+ DateTime.parse(value)
143
+ when :Date
144
+ Date.parse(value)
145
+ when :String
146
+ value.to_s
147
+ when :Integer
148
+ value.to_i
149
+ when :Float
150
+ value.to_f
151
+ when :BOOLEAN
152
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
153
+ true
154
+ else
155
+ false
156
+ end
157
+ when :Object
158
+ # generic object (usually a Hash), return directly
159
+ value
160
+ when /\AArray<(?<inner_type>.+)>\z/
161
+ inner_type = Regexp.last_match[:inner_type]
162
+ value.map { |v| _deserialize(inner_type, v) }
163
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
164
+ k_type = Regexp.last_match[:k_type]
165
+ v_type = Regexp.last_match[:v_type]
166
+ {}.tap do |hash|
167
+ value.each do |k, v|
168
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
169
+ end
170
+ end
171
+ else # model
172
+ registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
173
+ if registry_type
174
+ type = registry_type
175
+ end
176
+ temp_model = AsposeSlidesCloud.const_get(type).new
177
+ temp_model.build_from_hash(value)
178
+ end
179
+ end
180
+
181
+ # Returns the string representation of the object
182
+ # @return [String] String presentation of the object
183
+ def to_s
184
+ to_hash.to_s
185
+ end
186
+
187
+ # to_body is an alias to to_hash (backward compatibility)
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_body
190
+ to_hash
191
+ end
192
+
193
+ # Returns the object in the form of hash
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_hash
196
+ hash = {}
197
+ self.class.attribute_map.each_pair do |attr, param|
198
+ value = self.send(attr)
199
+ next if value.nil?
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end
222
+ end
223
+ end