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.
- checksums.yaml +4 -4
- data/Gemfile +7 -7
- data/LICENSE +20 -20
- data/README.md +27 -0
- data/Rakefile +8 -8
- data/TestData/oleObject.xlsx +0 -0
- data/TestData/test.pptx +0 -0
- data/aspose_slides_cloud.gemspec +56 -56
- data/lib/aspose_slides_cloud/api/slides_api.rb +192 -13
- data/lib/aspose_slides_cloud/api_error.rb +48 -48
- data/lib/aspose_slides_cloud/configuration.rb +188 -188
- data/lib/aspose_slides_cloud/models/access_permissions.rb +321 -0
- data/lib/aspose_slides_cloud/models/{waterfall_series.rb → alpha_bi_level_effect.rb} +16 -26
- data/lib/aspose_slides_cloud/models/alpha_ceiling_effect.rb +223 -0
- data/lib/aspose_slides_cloud/models/alpha_floor_effect.rb +223 -0
- data/lib/aspose_slides_cloud/models/alpha_inverse_effect.rb +223 -0
- data/lib/aspose_slides_cloud/models/alpha_modulate_effect.rb +223 -0
- data/lib/aspose_slides_cloud/models/alpha_modulate_fixed_effect.rb +238 -0
- data/lib/aspose_slides_cloud/models/alpha_replace_effect.rb +238 -0
- data/lib/aspose_slides_cloud/models/audio_frame.rb +12 -3
- data/lib/aspose_slides_cloud/models/axis.rb +22 -2
- data/lib/aspose_slides_cloud/models/bi_level_effect.rb +238 -0
- data/lib/aspose_slides_cloud/models/blur_image_effect.rb +253 -0
- data/lib/aspose_slides_cloud/models/chart.rb +1 -2
- data/lib/aspose_slides_cloud/models/chart_lines_format.rb +221 -0
- data/lib/aspose_slides_cloud/models/color_change_effect.rb +243 -0
- data/lib/aspose_slides_cloud/models/color_replace_effect.rb +233 -0
- data/lib/aspose_slides_cloud/models/connector.rb +1 -2
- data/lib/aspose_slides_cloud/models/duotone_effect.rb +243 -0
- data/lib/aspose_slides_cloud/models/export_options.rb +10 -18
- data/lib/aspose_slides_cloud/models/fill_overlay_image_effect.rb +260 -0
- data/lib/aspose_slides_cloud/models/font_fallback_rule.rb +243 -0
- data/lib/aspose_slides_cloud/models/geometry_shape.rb +1 -2
- data/lib/aspose_slides_cloud/models/gif_export_options.rb +4 -3
- data/lib/aspose_slides_cloud/models/graphical_object.rb +1 -2
- data/lib/aspose_slides_cloud/models/{waterfall_chart_data_point.rb → gray_scale_effect.rb} +26 -13
- data/lib/aspose_slides_cloud/models/group_shape.rb +12 -3
- data/lib/aspose_slides_cloud/models/hsl_effect.rb +268 -0
- data/lib/aspose_slides_cloud/models/html5_export_options.rb +2 -3
- data/lib/aspose_slides_cloud/models/html_export_options.rb +2 -3
- data/lib/aspose_slides_cloud/models/image_export_options.rb +4 -3
- data/lib/aspose_slides_cloud/models/image_export_options_base.rb +222 -0
- data/lib/aspose_slides_cloud/models/image_transform_effect.rb +244 -0
- data/lib/aspose_slides_cloud/models/legend.rb +12 -2
- data/lib/aspose_slides_cloud/models/luminance_effect.rb +253 -0
- data/lib/aspose_slides_cloud/models/ole_object_frame.rb +72 -3
- data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +12 -2
- data/lib/aspose_slides_cloud/models/one_value_series.rb +74 -2
- data/lib/aspose_slides_cloud/models/paragraph.rb +12 -2
- data/lib/aspose_slides_cloud/models/pdf_export_options.rb +3 -16
- data/lib/aspose_slides_cloud/models/picture_fill.rb +14 -2
- data/lib/aspose_slides_cloud/models/picture_frame.rb +1 -2
- data/lib/aspose_slides_cloud/models/portion.rb +32 -2
- data/lib/aspose_slides_cloud/models/portion_format.rb +633 -0
- data/lib/aspose_slides_cloud/models/pptx_export_options.rb +2 -3
- data/lib/aspose_slides_cloud/models/resource_uri.rb +22 -2
- data/lib/aspose_slides_cloud/models/section_zoom_frame.rb +1 -2
- data/lib/aspose_slides_cloud/models/shape.rb +1 -2
- data/lib/aspose_slides_cloud/models/shape_base.rb +1 -11
- data/lib/aspose_slides_cloud/models/shape_type.rb +54 -0
- data/lib/aspose_slides_cloud/models/slide_comment.rb +32 -48
- data/lib/aspose_slides_cloud/models/slide_comment_base.rb +286 -0
- data/lib/aspose_slides_cloud/models/slide_comments.rb +1 -1
- data/lib/aspose_slides_cloud/models/{box_and_whisker_series.rb → slide_modern_comment.rb} +37 -68
- data/lib/aspose_slides_cloud/models/smart_art.rb +1 -2
- data/lib/aspose_slides_cloud/models/smart_art_node.rb +12 -2
- data/lib/aspose_slides_cloud/models/smart_art_shape.rb +1 -2
- data/lib/aspose_slides_cloud/models/summary_zoom_frame.rb +1 -2
- data/lib/aspose_slides_cloud/models/summary_zoom_section.rb +1 -2
- data/lib/aspose_slides_cloud/models/svg_export_options.rb +2 -3
- data/lib/aspose_slides_cloud/models/swf_export_options.rb +2 -3
- data/lib/aspose_slides_cloud/models/table.rb +1 -2
- data/lib/aspose_slides_cloud/models/table_cell.rb +22 -2
- data/lib/aspose_slides_cloud/models/text_bounds.rb +261 -0
- data/lib/aspose_slides_cloud/models/tiff_export_options.rb +4 -3
- data/lib/aspose_slides_cloud/models/tint_effect.rb +253 -0
- data/lib/aspose_slides_cloud/models/video_export_options.rb +35 -4
- data/lib/aspose_slides_cloud/models/video_frame.rb +12 -3
- data/lib/aspose_slides_cloud/models/xaml_export_options.rb +2 -3
- data/lib/aspose_slides_cloud/models/xps_export_options.rb +2 -3
- data/lib/aspose_slides_cloud/models/zoom_frame.rb +1 -2
- data/lib/aspose_slides_cloud/models/zoom_object.rb +2 -2
- data/lib/aspose_slides_cloud/type_registry.rb +54 -13
- data/lib/aspose_slides_cloud/version.rb +1 -1
- data/lib/aspose_slides_cloud.rb +31 -7
- data/spec/api/slides_api_spec.rb +585 -33
- data/spec/spec_helper.rb +122 -122
- data/spec/use_cases/merge_spec.rb +0 -1
- data/spec/use_cases/shape_spec.rb +0 -2
- data/testRules.json +6 -4
- metadata +30 -7
- data/Dockerfile +0 -16
- data/docker-entrypoint.sh +0 -7
@@ -0,0 +1,244 @@
|
|
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
|
+
# Image transform effect
|
27
|
+
class ImageTransformEffect
|
28
|
+
attr_accessor :type
|
29
|
+
|
30
|
+
class EnumAttributeValidator
|
31
|
+
attr_reader :datatype
|
32
|
+
attr_reader :allowable_values
|
33
|
+
|
34
|
+
def initialize(datatype, allowable_values)
|
35
|
+
@allowable_values = allowable_values.map do |value|
|
36
|
+
case datatype.to_s
|
37
|
+
when /Integer/i
|
38
|
+
value.to_i
|
39
|
+
when /Float/i
|
40
|
+
value.to_f
|
41
|
+
else
|
42
|
+
value
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def valid?(value)
|
48
|
+
!value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
53
|
+
def self.attribute_map
|
54
|
+
{
|
55
|
+
:'type' => :'Type',
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Attribute type mapping.
|
60
|
+
def self.swagger_types
|
61
|
+
{
|
62
|
+
:'type' => :'String',
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
# Initializes the object
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
68
|
+
def initialize(attributes = {})
|
69
|
+
return unless attributes.is_a?(Hash)
|
70
|
+
|
71
|
+
# convert string to symbol for hash key
|
72
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
73
|
+
|
74
|
+
if attributes.has_key?(:'Type')
|
75
|
+
self.type = attributes[:'Type']
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
80
|
+
# @return Array for valid properties with the reasons
|
81
|
+
def list_invalid_properties
|
82
|
+
invalid_properties = Array.new
|
83
|
+
invalid_properties
|
84
|
+
end
|
85
|
+
|
86
|
+
# Check to see if the all the properties in the model are valid
|
87
|
+
# @return true if the model is valid
|
88
|
+
def valid?
|
89
|
+
type_validator = EnumAttributeValidator.new('String', ['AlphaBiLevel', 'AlphaCeiling', 'AlphaFloor', 'AlphaInverse', 'AlphaModulate', 'AlphaModulateFixed', 'AlphaReplace', 'BiLevel', 'Blur', 'ColorChange', 'ColorReplace', 'Duotone', 'FillOverlay', 'GrayScale', 'Hsl', 'Luminance', 'Tint'])
|
90
|
+
return false unless type_validator.valid?(@type)
|
91
|
+
true
|
92
|
+
end
|
93
|
+
|
94
|
+
# Custom attribute writer method checking allowed values (enum).
|
95
|
+
# @param [Object] type Object to be assigned
|
96
|
+
def type=(type)
|
97
|
+
validator = EnumAttributeValidator.new('String', ['AlphaBiLevel', 'AlphaCeiling', 'AlphaFloor', 'AlphaInverse', 'AlphaModulate', 'AlphaModulateFixed', 'AlphaReplace', 'BiLevel', 'Blur', 'ColorChange', 'ColorReplace', 'Duotone', 'FillOverlay', 'GrayScale', 'Hsl', 'Luminance', 'Tint'])
|
98
|
+
unless validator.valid?(type)
|
99
|
+
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
100
|
+
end
|
101
|
+
@type = type
|
102
|
+
end
|
103
|
+
|
104
|
+
# Checks equality by comparing each attribute.
|
105
|
+
# @param [Object] Object to be compared
|
106
|
+
def ==(o)
|
107
|
+
return true if self.equal?(o)
|
108
|
+
self.class == o.class &&
|
109
|
+
type == o.type
|
110
|
+
end
|
111
|
+
|
112
|
+
# @see the `==` method
|
113
|
+
# @param [Object] Object to be compared
|
114
|
+
def eql?(o)
|
115
|
+
self == o
|
116
|
+
end
|
117
|
+
|
118
|
+
# Calculates hash code according to all attributes.
|
119
|
+
# @return [Fixnum] Hash code
|
120
|
+
def hash
|
121
|
+
[type].hash
|
122
|
+
end
|
123
|
+
|
124
|
+
# Builds the object from hash
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
+
# @return [Object] Returns the model itself
|
127
|
+
def build_from_hash(attributes)
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
129
|
+
self.class.swagger_types.each_pair do |key, type|
|
130
|
+
mapKey = self.class.attribute_map[key]
|
131
|
+
if !mapKey.nil?
|
132
|
+
val = attributes[mapKey]
|
133
|
+
if val.nil?
|
134
|
+
mapKeyString = mapKey.to_s
|
135
|
+
mapKeyString[0] = mapKeyString[0].downcase
|
136
|
+
mapKey = mapKeyString.to_sym
|
137
|
+
val = attributes[mapKey]
|
138
|
+
end
|
139
|
+
if !val.nil?
|
140
|
+
if type =~ /\AArray<(.*)>/i
|
141
|
+
# check to ensure the input is an array given that the the attribute
|
142
|
+
# is documented as an array but the input is not
|
143
|
+
if val.is_a?(Array)
|
144
|
+
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
145
|
+
end
|
146
|
+
else
|
147
|
+
self.send("#{key}=", _deserialize(type, val))
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
self
|
154
|
+
end
|
155
|
+
|
156
|
+
# Deserializes the data based on type
|
157
|
+
# @param string type Data type
|
158
|
+
# @param string value Value to be deserialized
|
159
|
+
# @return [Object] Deserialized data
|
160
|
+
def _deserialize(type, value)
|
161
|
+
case type.to_sym
|
162
|
+
when :DateTime
|
163
|
+
DateTime.parse(value)
|
164
|
+
when :Date
|
165
|
+
Date.parse(value)
|
166
|
+
when :String
|
167
|
+
value.to_s
|
168
|
+
when :Integer
|
169
|
+
value.to_i
|
170
|
+
when :Float
|
171
|
+
value.to_f
|
172
|
+
when :BOOLEAN
|
173
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
174
|
+
true
|
175
|
+
else
|
176
|
+
false
|
177
|
+
end
|
178
|
+
when :Object
|
179
|
+
# generic object (usually a Hash), return directly
|
180
|
+
value
|
181
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
182
|
+
inner_type = Regexp.last_match[:inner_type]
|
183
|
+
value.map { |v| _deserialize(inner_type, v) }
|
184
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
185
|
+
k_type = Regexp.last_match[:k_type]
|
186
|
+
v_type = Regexp.last_match[:v_type]
|
187
|
+
{}.tap do |hash|
|
188
|
+
value.each do |k, v|
|
189
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
else # model
|
193
|
+
registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
|
194
|
+
if registry_type
|
195
|
+
type = registry_type
|
196
|
+
end
|
197
|
+
temp_model = AsposeSlidesCloud.const_get(type).new
|
198
|
+
temp_model.build_from_hash(value)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
# Returns the string representation of the object
|
203
|
+
# @return [String] String presentation of the object
|
204
|
+
def to_s
|
205
|
+
to_hash.to_s
|
206
|
+
end
|
207
|
+
|
208
|
+
# to_body is an alias to to_hash (backward compatibility)
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_body
|
211
|
+
to_hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Returns the object in the form of hash
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_hash
|
217
|
+
hash = {}
|
218
|
+
self.class.attribute_map.each_pair do |attr, param|
|
219
|
+
value = self.send(attr)
|
220
|
+
next if value.nil?
|
221
|
+
hash[param] = _to_hash(value)
|
222
|
+
end
|
223
|
+
hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Outputs non-array value in the form of hash
|
227
|
+
# For object, use to_hash. Otherwise, just return the value
|
228
|
+
# @param [Object] value Any valid value
|
229
|
+
# @return [Hash] Returns the value in the form of hash
|
230
|
+
def _to_hash(value)
|
231
|
+
if value.is_a?(Array)
|
232
|
+
value.compact.map { |v| _to_hash(v) }
|
233
|
+
elsif value.is_a?(Hash)
|
234
|
+
{}.tap do |hash|
|
235
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
236
|
+
end
|
237
|
+
elsif value.respond_to? :to_hash
|
238
|
+
value.to_hash
|
239
|
+
else
|
240
|
+
value
|
241
|
+
end
|
242
|
+
end
|
243
|
+
end
|
244
|
+
end
|
@@ -52,6 +52,9 @@ module AsposeSlidesCloud
|
|
52
52
|
# Get or sets the line format.
|
53
53
|
attr_accessor :line_format
|
54
54
|
|
55
|
+
# Get or sets value determines the visibility of legend
|
56
|
+
attr_accessor :has_legend
|
57
|
+
|
55
58
|
class EnumAttributeValidator
|
56
59
|
attr_reader :datatype
|
57
60
|
attr_reader :allowable_values
|
@@ -86,6 +89,7 @@ module AsposeSlidesCloud
|
|
86
89
|
:'fill_format' => :'FillFormat',
|
87
90
|
:'effect_format' => :'EffectFormat',
|
88
91
|
:'line_format' => :'LineFormat',
|
92
|
+
:'has_legend' => :'HasLegend',
|
89
93
|
}
|
90
94
|
end
|
91
95
|
|
@@ -101,6 +105,7 @@ module AsposeSlidesCloud
|
|
101
105
|
:'fill_format' => :'FillFormat',
|
102
106
|
:'effect_format' => :'EffectFormat',
|
103
107
|
:'line_format' => :'LineFormat',
|
108
|
+
:'has_legend' => :'BOOLEAN',
|
104
109
|
}
|
105
110
|
end
|
106
111
|
|
@@ -147,6 +152,10 @@ module AsposeSlidesCloud
|
|
147
152
|
if attributes.has_key?(:'LineFormat')
|
148
153
|
self.line_format = attributes[:'LineFormat']
|
149
154
|
end
|
155
|
+
|
156
|
+
if attributes.has_key?(:'HasLegend')
|
157
|
+
self.has_legend = attributes[:'HasLegend']
|
158
|
+
end
|
150
159
|
end
|
151
160
|
|
152
161
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -187,7 +196,8 @@ module AsposeSlidesCloud
|
|
187
196
|
overlay == o.overlay &&
|
188
197
|
fill_format == o.fill_format &&
|
189
198
|
effect_format == o.effect_format &&
|
190
|
-
line_format == o.line_format
|
199
|
+
line_format == o.line_format &&
|
200
|
+
has_legend == o.has_legend
|
191
201
|
end
|
192
202
|
|
193
203
|
# @see the `==` method
|
@@ -199,7 +209,7 @@ module AsposeSlidesCloud
|
|
199
209
|
# Calculates hash code according to all attributes.
|
200
210
|
# @return [Fixnum] Hash code
|
201
211
|
def hash
|
202
|
-
[position, x, y, width, height, overlay, fill_format, effect_format, line_format].hash
|
212
|
+
[position, x, y, width, height, overlay, fill_format, effect_format, line_format, has_legend].hash
|
203
213
|
end
|
204
214
|
|
205
215
|
# Builds the object from hash
|
@@ -0,0 +1,253 @@
|
|
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 a Luminance effect.
|
27
|
+
class LuminanceEffect < ImageTransformEffect
|
28
|
+
# Brightness
|
29
|
+
attr_accessor :brightness
|
30
|
+
|
31
|
+
# Contrast
|
32
|
+
attr_accessor :contrast
|
33
|
+
|
34
|
+
class EnumAttributeValidator
|
35
|
+
attr_reader :datatype
|
36
|
+
attr_reader :allowable_values
|
37
|
+
|
38
|
+
def initialize(datatype, allowable_values)
|
39
|
+
@allowable_values = allowable_values.map do |value|
|
40
|
+
case datatype.to_s
|
41
|
+
when /Integer/i
|
42
|
+
value.to_i
|
43
|
+
when /Float/i
|
44
|
+
value.to_f
|
45
|
+
else
|
46
|
+
value
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def valid?(value)
|
52
|
+
!value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
57
|
+
def self.attribute_map
|
58
|
+
super.merge({
|
59
|
+
:'brightness' => :'Brightness',
|
60
|
+
:'contrast' => :'Contrast',
|
61
|
+
})
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute type mapping.
|
65
|
+
def self.swagger_types
|
66
|
+
super.merge({
|
67
|
+
:'brightness' => :'Float',
|
68
|
+
:'contrast' => :'Float',
|
69
|
+
})
|
70
|
+
end
|
71
|
+
|
72
|
+
# Initializes the object
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
74
|
+
def initialize(attributes = {})
|
75
|
+
super
|
76
|
+
|
77
|
+
if attributes.has_key?(:'Brightness')
|
78
|
+
self.brightness = attributes[:'Brightness']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'Contrast')
|
82
|
+
self.contrast = attributes[:'Contrast']
|
83
|
+
end
|
84
|
+
self.type = "Luminance"
|
85
|
+
end
|
86
|
+
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
88
|
+
# @return Array for valid properties with the reasons
|
89
|
+
def list_invalid_properties
|
90
|
+
invalid_properties = super
|
91
|
+
if @brightness.nil?
|
92
|
+
invalid_properties.push('invalid value for "brightness", brightness cannot be nil.')
|
93
|
+
end
|
94
|
+
|
95
|
+
if @contrast.nil?
|
96
|
+
invalid_properties.push('invalid value for "contrast", contrast cannot be nil.')
|
97
|
+
end
|
98
|
+
|
99
|
+
invalid_properties
|
100
|
+
end
|
101
|
+
|
102
|
+
# Check to see if the all the properties in the model are valid
|
103
|
+
# @return true if the model is valid
|
104
|
+
def valid?
|
105
|
+
return false if !super
|
106
|
+
return false if @brightness.nil?
|
107
|
+
return false if @contrast.nil?
|
108
|
+
true
|
109
|
+
end
|
110
|
+
|
111
|
+
# Checks equality by comparing each attribute.
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def ==(o)
|
114
|
+
return true if self.equal?(o)
|
115
|
+
self.class == o.class &&
|
116
|
+
type == o.type &&
|
117
|
+
brightness == o.brightness &&
|
118
|
+
contrast == o.contrast
|
119
|
+
end
|
120
|
+
|
121
|
+
# @see the `==` method
|
122
|
+
# @param [Object] Object to be compared
|
123
|
+
def eql?(o)
|
124
|
+
self == o
|
125
|
+
end
|
126
|
+
|
127
|
+
# Calculates hash code according to all attributes.
|
128
|
+
# @return [Fixnum] Hash code
|
129
|
+
def hash
|
130
|
+
[type, brightness, contrast].hash
|
131
|
+
end
|
132
|
+
|
133
|
+
# Builds the object from hash
|
134
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
135
|
+
# @return [Object] Returns the model itself
|
136
|
+
def build_from_hash(attributes)
|
137
|
+
return nil unless attributes.is_a?(Hash)
|
138
|
+
self.class.swagger_types.each_pair do |key, type|
|
139
|
+
mapKey = self.class.attribute_map[key]
|
140
|
+
if !mapKey.nil?
|
141
|
+
val = attributes[mapKey]
|
142
|
+
if val.nil?
|
143
|
+
mapKeyString = mapKey.to_s
|
144
|
+
mapKeyString[0] = mapKeyString[0].downcase
|
145
|
+
mapKey = mapKeyString.to_sym
|
146
|
+
val = attributes[mapKey]
|
147
|
+
end
|
148
|
+
if !val.nil?
|
149
|
+
if type =~ /\AArray<(.*)>/i
|
150
|
+
# check to ensure the input is an array given that the the attribute
|
151
|
+
# is documented as an array but the input is not
|
152
|
+
if val.is_a?(Array)
|
153
|
+
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
154
|
+
end
|
155
|
+
else
|
156
|
+
self.send("#{key}=", _deserialize(type, val))
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
self
|
163
|
+
end
|
164
|
+
|
165
|
+
# Deserializes the data based on type
|
166
|
+
# @param string type Data type
|
167
|
+
# @param string value Value to be deserialized
|
168
|
+
# @return [Object] Deserialized data
|
169
|
+
def _deserialize(type, value)
|
170
|
+
case type.to_sym
|
171
|
+
when :DateTime
|
172
|
+
DateTime.parse(value)
|
173
|
+
when :Date
|
174
|
+
Date.parse(value)
|
175
|
+
when :String
|
176
|
+
value.to_s
|
177
|
+
when :Integer
|
178
|
+
value.to_i
|
179
|
+
when :Float
|
180
|
+
value.to_f
|
181
|
+
when :BOOLEAN
|
182
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
183
|
+
true
|
184
|
+
else
|
185
|
+
false
|
186
|
+
end
|
187
|
+
when :Object
|
188
|
+
# generic object (usually a Hash), return directly
|
189
|
+
value
|
190
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
191
|
+
inner_type = Regexp.last_match[:inner_type]
|
192
|
+
value.map { |v| _deserialize(inner_type, v) }
|
193
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
194
|
+
k_type = Regexp.last_match[:k_type]
|
195
|
+
v_type = Regexp.last_match[:v_type]
|
196
|
+
{}.tap do |hash|
|
197
|
+
value.each do |k, v|
|
198
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
else # model
|
202
|
+
registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
|
203
|
+
if registry_type
|
204
|
+
type = registry_type
|
205
|
+
end
|
206
|
+
temp_model = AsposeSlidesCloud.const_get(type).new
|
207
|
+
temp_model.build_from_hash(value)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the string representation of the object
|
212
|
+
# @return [String] String presentation of the object
|
213
|
+
def to_s
|
214
|
+
to_hash.to_s
|
215
|
+
end
|
216
|
+
|
217
|
+
# to_body is an alias to to_hash (backward compatibility)
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_body
|
220
|
+
to_hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns the object in the form of hash
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_hash
|
226
|
+
hash = {}
|
227
|
+
self.class.attribute_map.each_pair do |attr, param|
|
228
|
+
value = self.send(attr)
|
229
|
+
next if value.nil?
|
230
|
+
hash[param] = _to_hash(value)
|
231
|
+
end
|
232
|
+
hash
|
233
|
+
end
|
234
|
+
|
235
|
+
# Outputs non-array value in the form of hash
|
236
|
+
# For object, use to_hash. Otherwise, just return the value
|
237
|
+
# @param [Object] value Any valid value
|
238
|
+
# @return [Hash] Returns the value in the form of hash
|
239
|
+
def _to_hash(value)
|
240
|
+
if value.is_a?(Array)
|
241
|
+
value.compact.map { |v| _to_hash(v) }
|
242
|
+
elsif value.is_a?(Hash)
|
243
|
+
{}.tap do |hash|
|
244
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
245
|
+
end
|
246
|
+
elsif value.respond_to? :to_hash
|
247
|
+
value.to_hash
|
248
|
+
else
|
249
|
+
value
|
250
|
+
end
|
251
|
+
end
|
252
|
+
end
|
253
|
+
end
|
@@ -31,6 +31,27 @@ module AsposeSlidesCloud
|
|
31
31
|
# The title for OleObject icon.
|
32
32
|
attr_accessor :substitute_picture_title
|
33
33
|
|
34
|
+
# OleObject image fill properties.
|
35
|
+
attr_accessor :substitute_picture_format
|
36
|
+
|
37
|
+
# Returns or sets the name of an object.
|
38
|
+
attr_accessor :object_name
|
39
|
+
|
40
|
+
# File data of embedded OLE object.
|
41
|
+
attr_accessor :embedded_file_base64_data
|
42
|
+
|
43
|
+
# File extension for the current embedded OLE object
|
44
|
+
attr_accessor :embedded_file_extension
|
45
|
+
|
46
|
+
# ProgID of an object.
|
47
|
+
attr_accessor :object_prog_id
|
48
|
+
|
49
|
+
# Full path to a linked file.
|
50
|
+
attr_accessor :link_path
|
51
|
+
|
52
|
+
# Determines if the linked embedded object is automatically updated when the presentation is opened or printed. Read/write Boolean.
|
53
|
+
attr_accessor :update_automatic
|
54
|
+
|
34
55
|
class EnumAttributeValidator
|
35
56
|
attr_reader :datatype
|
36
57
|
attr_reader :allowable_values
|
@@ -58,6 +79,13 @@ module AsposeSlidesCloud
|
|
58
79
|
super.merge({
|
59
80
|
:'is_object_icon' => :'IsObjectIcon',
|
60
81
|
:'substitute_picture_title' => :'SubstitutePictureTitle',
|
82
|
+
:'substitute_picture_format' => :'SubstitutePictureFormat',
|
83
|
+
:'object_name' => :'ObjectName',
|
84
|
+
:'embedded_file_base64_data' => :'EmbeddedFileBase64Data',
|
85
|
+
:'embedded_file_extension' => :'EmbeddedFileExtension',
|
86
|
+
:'object_prog_id' => :'ObjectProgId',
|
87
|
+
:'link_path' => :'LinkPath',
|
88
|
+
:'update_automatic' => :'UpdateAutomatic',
|
61
89
|
})
|
62
90
|
end
|
63
91
|
|
@@ -66,6 +94,13 @@ module AsposeSlidesCloud
|
|
66
94
|
super.merge({
|
67
95
|
:'is_object_icon' => :'BOOLEAN',
|
68
96
|
:'substitute_picture_title' => :'String',
|
97
|
+
:'substitute_picture_format' => :'PictureFill',
|
98
|
+
:'object_name' => :'String',
|
99
|
+
:'embedded_file_base64_data' => :'String',
|
100
|
+
:'embedded_file_extension' => :'String',
|
101
|
+
:'object_prog_id' => :'String',
|
102
|
+
:'link_path' => :'String',
|
103
|
+
:'update_automatic' => :'BOOLEAN',
|
69
104
|
})
|
70
105
|
end
|
71
106
|
|
@@ -81,6 +116,34 @@ module AsposeSlidesCloud
|
|
81
116
|
if attributes.has_key?(:'SubstitutePictureTitle')
|
82
117
|
self.substitute_picture_title = attributes[:'SubstitutePictureTitle']
|
83
118
|
end
|
119
|
+
|
120
|
+
if attributes.has_key?(:'SubstitutePictureFormat')
|
121
|
+
self.substitute_picture_format = attributes[:'SubstitutePictureFormat']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.has_key?(:'ObjectName')
|
125
|
+
self.object_name = attributes[:'ObjectName']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.has_key?(:'EmbeddedFileBase64Data')
|
129
|
+
self.embedded_file_base64_data = attributes[:'EmbeddedFileBase64Data']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.has_key?(:'EmbeddedFileExtension')
|
133
|
+
self.embedded_file_extension = attributes[:'EmbeddedFileExtension']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.has_key?(:'ObjectProgId')
|
137
|
+
self.object_prog_id = attributes[:'ObjectProgId']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.has_key?(:'LinkPath')
|
141
|
+
self.link_path = attributes[:'LinkPath']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.has_key?(:'UpdateAutomatic')
|
145
|
+
self.update_automatic = attributes[:'UpdateAutomatic']
|
146
|
+
end
|
84
147
|
self.type = "OleObjectFrame"
|
85
148
|
end
|
86
149
|
|
@@ -119,7 +182,6 @@ module AsposeSlidesCloud
|
|
119
182
|
x == o.x &&
|
120
183
|
y == o.y &&
|
121
184
|
z_order_position == o.z_order_position &&
|
122
|
-
shapes == o.shapes &&
|
123
185
|
fill_format == o.fill_format &&
|
124
186
|
effect_format == o.effect_format &&
|
125
187
|
three_d_format == o.three_d_format &&
|
@@ -128,7 +190,14 @@ module AsposeSlidesCloud
|
|
128
190
|
hyperlink_mouse_over == o.hyperlink_mouse_over &&
|
129
191
|
type == o.type &&
|
130
192
|
is_object_icon == o.is_object_icon &&
|
131
|
-
substitute_picture_title == o.substitute_picture_title
|
193
|
+
substitute_picture_title == o.substitute_picture_title &&
|
194
|
+
substitute_picture_format == o.substitute_picture_format &&
|
195
|
+
object_name == o.object_name &&
|
196
|
+
embedded_file_base64_data == o.embedded_file_base64_data &&
|
197
|
+
embedded_file_extension == o.embedded_file_extension &&
|
198
|
+
object_prog_id == o.object_prog_id &&
|
199
|
+
link_path == o.link_path &&
|
200
|
+
update_automatic == o.update_automatic
|
132
201
|
end
|
133
202
|
|
134
203
|
# @see the `==` method
|
@@ -140,7 +209,7 @@ module AsposeSlidesCloud
|
|
140
209
|
# Calculates hash code according to all attributes.
|
141
210
|
# @return [Fixnum] Hash code
|
142
211
|
def hash
|
143
|
-
[self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position,
|
212
|
+
[self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, fill_format, effect_format, three_d_format, line_format, hyperlink_click, hyperlink_mouse_over, type, is_object_icon, substitute_picture_title, substitute_picture_format, object_name, embedded_file_base64_data, embedded_file_extension, object_prog_id, link_path, update_automatic].hash
|
144
213
|
end
|
145
214
|
|
146
215
|
# Builds the object from hash
|