aspose_slides_cloud 23.3.0 → 23.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +35 -10
- data/README.md +12 -0
- data/TestData/macros.pptm +0 -0
- data/TestData/test.pptx +0 -0
- data/aspose_slides_cloud.gemspec +3 -1
- data/docker-entrypoint.sh +4 -3
- data/lib/aspose_slides_cloud/api/slides_api.rb +3669 -1888
- data/lib/aspose_slides_cloud/api_client.rb +3 -0
- data/lib/aspose_slides_cloud/models/accent_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/access_permissions.rb +1 -125
- data/lib/aspose_slides_cloud/models/add_layout_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/add_master_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/add_shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/add_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/alpha_bi_level_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/alpha_ceiling_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/alpha_floor_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/alpha_inverse_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/alpha_modulate_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/alpha_modulate_fixed_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/alpha_replace_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/api_info.rb +1 -125
- data/lib/aspose_slides_cloud/models/arc_to_path_segment.rb +0 -146
- data/lib/aspose_slides_cloud/models/array_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +1 -147
- data/lib/aspose_slides_cloud/models/audio_frame.rb +0 -146
- data/lib/aspose_slides_cloud/models/axes.rb +1 -125
- data/lib/aspose_slides_cloud/models/axis.rb +1 -147
- data/lib/aspose_slides_cloud/models/bar_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/base64_input_file.rb +0 -146
- data/lib/aspose_slides_cloud/models/base_object.rb +173 -0
- data/lib/aspose_slides_cloud/models/bi_level_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/block_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/blur_effect.rb +1 -125
- data/lib/aspose_slides_cloud/models/blur_image_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/border_box_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/box_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +0 -146
- data/lib/aspose_slides_cloud/models/bubble_series.rb +0 -146
- data/lib/aspose_slides_cloud/models/camera.rb +1 -147
- data/lib/aspose_slides_cloud/models/chart.rb +0 -146
- data/lib/aspose_slides_cloud/models/chart_category.rb +1 -125
- data/lib/aspose_slides_cloud/models/chart_lines_format.rb +1 -125
- data/lib/aspose_slides_cloud/models/chart_series_group.rb +1 -147
- data/lib/aspose_slides_cloud/models/chart_title.rb +1 -125
- data/lib/aspose_slides_cloud/models/chart_wall.rb +1 -147
- data/lib/aspose_slides_cloud/models/close_path_segment.rb +0 -146
- data/lib/aspose_slides_cloud/models/color_change_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/color_replace_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/color_scheme.rb +0 -124
- data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +1 -125
- data/lib/aspose_slides_cloud/models/connector.rb +0 -146
- data/lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb +0 -146
- data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +1 -125
- data/lib/aspose_slides_cloud/models/data_point.rb +1 -147
- data/lib/aspose_slides_cloud/models/data_source.rb +1 -147
- data/lib/aspose_slides_cloud/models/delimiter_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/disc_usage.rb +1 -125
- data/lib/aspose_slides_cloud/models/document.rb +0 -124
- data/lib/aspose_slides_cloud/models/document_properties.rb +0 -124
- data/lib/aspose_slides_cloud/models/document_property.rb +0 -124
- data/lib/aspose_slides_cloud/models/document_replace_result.rb +0 -124
- data/lib/aspose_slides_cloud/models/duotone_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/effect.rb +1 -147
- data/lib/aspose_slides_cloud/models/effect_format.rb +1 -125
- data/lib/aspose_slides_cloud/models/entity_exists.rb +1 -125
- data/lib/aspose_slides_cloud/models/error.rb +1 -125
- data/lib/aspose_slides_cloud/models/error_details.rb +1 -125
- data/lib/aspose_slides_cloud/models/export_options.rb +1 -125
- data/lib/aspose_slides_cloud/models/file_version.rb +0 -124
- data/lib/aspose_slides_cloud/models/file_versions.rb +1 -125
- data/lib/aspose_slides_cloud/models/files_list.rb +1 -125
- data/lib/aspose_slides_cloud/models/files_upload_result.rb +1 -125
- data/lib/aspose_slides_cloud/models/fill_format.rb +1 -147
- data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +1 -147
- data/lib/aspose_slides_cloud/models/fill_overlay_image_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/font_data.rb +1 -125
- data/lib/aspose_slides_cloud/models/font_fallback_rule.rb +1 -125
- data/lib/aspose_slides_cloud/models/font_scheme.rb +0 -124
- data/lib/aspose_slides_cloud/models/font_set.rb +1 -125
- data/lib/aspose_slides_cloud/models/font_subst_rule.rb +1 -125
- data/lib/aspose_slides_cloud/models/fonts_data.rb +1 -125
- data/lib/aspose_slides_cloud/models/format_scheme.rb +0 -124
- data/lib/aspose_slides_cloud/models/fraction_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/function_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/geometry_path.rb +1 -147
- data/lib/aspose_slides_cloud/models/geometry_paths.rb +1 -125
- data/lib/aspose_slides_cloud/models/geometry_shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/gif_export_options.rb +0 -124
- data/lib/aspose_slides_cloud/models/glow_effect.rb +1 -125
- data/lib/aspose_slides_cloud/models/gradient_fill.rb +0 -146
- data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +1 -125
- data/lib/aspose_slides_cloud/models/graphical_object.rb +0 -146
- data/lib/aspose_slides_cloud/models/gray_scale_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/group_shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/grouping_character_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/header_footer.rb +0 -124
- data/lib/aspose_slides_cloud/models/hsl_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/html5_export_options.rb +0 -124
- data/lib/aspose_slides_cloud/models/html_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/hyperlink.rb +1 -147
- data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +1 -125
- data/lib/aspose_slides_cloud/models/image.rb +0 -124
- data/lib/aspose_slides_cloud/models/image_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/image_export_options_base.rb +0 -124
- data/lib/aspose_slides_cloud/models/image_transform_effect.rb +1 -147
- data/lib/aspose_slides_cloud/models/images.rb +0 -124
- data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +1 -125
- data/lib/aspose_slides_cloud/models/input.rb +1 -125
- data/lib/aspose_slides_cloud/models/input_file.rb +1 -147
- data/lib/aspose_slides_cloud/models/interactive_sequence.rb +1 -125
- data/lib/aspose_slides_cloud/models/layout_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/layout_slides.rb +0 -124
- data/lib/aspose_slides_cloud/models/left_sub_superscript_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/legend.rb +1 -147
- data/lib/aspose_slides_cloud/models/light_rig.rb +1 -147
- data/lib/aspose_slides_cloud/models/limit_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/line_format.rb +1 -147
- data/lib/aspose_slides_cloud/models/line_to_path_segment.rb +0 -146
- data/lib/aspose_slides_cloud/models/literals.rb +0 -146
- data/lib/aspose_slides_cloud/models/luminance_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/master_slide.rb +0 -124
- data/lib/aspose_slides_cloud/models/master_slides.rb +0 -124
- data/lib/aspose_slides_cloud/models/math_element.rb +1 -147
- data/lib/aspose_slides_cloud/models/math_paragraph.rb +1 -147
- data/lib/aspose_slides_cloud/models/matrix_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/merge.rb +0 -146
- data/lib/aspose_slides_cloud/models/merging_source.rb +1 -125
- data/lib/aspose_slides_cloud/models/move_to_path_segment.rb +0 -146
- data/lib/aspose_slides_cloud/models/nary_operator_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/no_fill.rb +0 -146
- data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +1 -125
- data/lib/aspose_slides_cloud/models/notes_slide.rb +0 -124
- data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +0 -124
- data/lib/aspose_slides_cloud/models/object_exist.rb +1 -125
- data/lib/aspose_slides_cloud/models/ole_object_frame.rb +0 -146
- data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +0 -146
- data/lib/aspose_slides_cloud/models/one_value_series.rb +0 -146
- data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +1 -125
- data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +1 -125
- data/lib/aspose_slides_cloud/models/output_file.rb +1 -147
- data/lib/aspose_slides_cloud/models/paragraph.rb +0 -146
- data/lib/aspose_slides_cloud/models/paragraph_format.rb +1 -147
- data/lib/aspose_slides_cloud/models/paragraphs.rb +0 -124
- data/lib/aspose_slides_cloud/models/path_input_file.rb +0 -146
- data/lib/aspose_slides_cloud/models/path_output_file.rb +0 -146
- data/lib/aspose_slides_cloud/models/path_segment.rb +1 -147
- data/lib/aspose_slides_cloud/models/pattern_fill.rb +0 -146
- data/lib/aspose_slides_cloud/models/pdf_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/picture_fill.rb +0 -146
- data/lib/aspose_slides_cloud/models/picture_frame.rb +0 -146
- data/lib/aspose_slides_cloud/models/pipeline.rb +1 -125
- data/lib/aspose_slides_cloud/models/placeholder.rb +0 -146
- data/lib/aspose_slides_cloud/models/placeholders.rb +0 -124
- data/lib/aspose_slides_cloud/models/plot_area.rb +1 -147
- data/lib/aspose_slides_cloud/models/portion.rb +0 -146
- data/lib/aspose_slides_cloud/models/portion_format.rb +1 -147
- data/lib/aspose_slides_cloud/models/portions.rb +0 -124
- data/lib/aspose_slides_cloud/models/pptx_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +1 -147
- data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +1 -125
- data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +1 -147
- data/lib/aspose_slides_cloud/models/protection_properties.rb +0 -124
- data/lib/aspose_slides_cloud/models/quadratic_bezier_to_path_segment.rb +0 -146
- data/lib/aspose_slides_cloud/models/radical_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/reflection_effect.rb +1 -147
- data/lib/aspose_slides_cloud/models/remove_shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/remove_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/reorder_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/replace_text.rb +0 -146
- data/lib/aspose_slides_cloud/models/request_input_file.rb +0 -146
- data/lib/aspose_slides_cloud/models/reset_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/resource_base.rb +1 -125
- data/lib/aspose_slides_cloud/models/resource_uri.rb +1 -125
- data/lib/aspose_slides_cloud/models/response_output_file.rb +0 -146
- data/lib/aspose_slides_cloud/models/right_sub_superscript_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/save.rb +0 -146
- data/lib/aspose_slides_cloud/models/save_shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/save_slide.rb +0 -146
- data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +0 -146
- data/lib/aspose_slides_cloud/models/scatter_series.rb +0 -146
- data/lib/aspose_slides_cloud/models/section.rb +0 -124
- data/lib/aspose_slides_cloud/models/section_zoom_frame.rb +0 -146
- data/lib/aspose_slides_cloud/models/sections.rb +0 -124
- data/lib/aspose_slides_cloud/models/series.rb +1 -147
- data/lib/aspose_slides_cloud/models/series_marker.rb +1 -147
- data/lib/aspose_slides_cloud/models/shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/shape_base.rb +0 -146
- data/lib/aspose_slides_cloud/models/shape_bevel.rb +1 -147
- data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +1 -147
- data/lib/aspose_slides_cloud/models/shapes.rb +0 -124
- data/lib/aspose_slides_cloud/models/slide.rb +0 -124
- data/lib/aspose_slides_cloud/models/slide_animation.rb +0 -124
- data/lib/aspose_slides_cloud/models/slide_background.rb +0 -146
- data/lib/aspose_slides_cloud/models/slide_comment.rb +0 -146
- data/lib/aspose_slides_cloud/models/slide_comment_base.rb +1 -147
- data/lib/aspose_slides_cloud/models/slide_comments.rb +0 -124
- data/lib/aspose_slides_cloud/models/slide_modern_comment.rb +0 -146
- data/lib/aspose_slides_cloud/models/slide_properties.rb +0 -146
- data/lib/aspose_slides_cloud/models/slide_replace_result.rb +0 -124
- data/lib/aspose_slides_cloud/models/slide_show_properties.rb +0 -146
- data/lib/aspose_slides_cloud/models/slides.rb +0 -124
- data/lib/aspose_slides_cloud/models/smart_art.rb +0 -146
- data/lib/aspose_slides_cloud/models/smart_art_node.rb +1 -147
- data/lib/aspose_slides_cloud/models/smart_art_shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +1 -125
- data/lib/aspose_slides_cloud/models/solid_fill.rb +0 -146
- data/lib/aspose_slides_cloud/models/split_document_result.rb +0 -124
- data/lib/aspose_slides_cloud/models/storage_exist.rb +1 -125
- data/lib/aspose_slides_cloud/models/storage_file.rb +1 -125
- data/lib/aspose_slides_cloud/models/subscript_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/summary_zoom_frame.rb +0 -146
- data/lib/aspose_slides_cloud/models/summary_zoom_section.rb +0 -146
- data/lib/aspose_slides_cloud/models/superscript_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/svg_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/swf_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/table.rb +0 -146
- data/lib/aspose_slides_cloud/models/table_cell.rb +21 -147
- data/lib/aspose_slides_cloud/models/table_cell_merge_options.rb +156 -0
- data/lib/aspose_slides_cloud/models/table_cell_split_type.rb +42 -0
- data/lib/aspose_slides_cloud/models/table_column.rb +1 -125
- data/lib/aspose_slides_cloud/models/table_row.rb +1 -125
- data/lib/aspose_slides_cloud/models/task.rb +1 -147
- data/lib/aspose_slides_cloud/models/text_bounds.rb +1 -125
- data/lib/aspose_slides_cloud/models/text_element.rb +0 -146
- data/lib/aspose_slides_cloud/models/text_frame_format.rb +1 -147
- data/lib/aspose_slides_cloud/models/text_item.rb +1 -125
- data/lib/aspose_slides_cloud/models/text_items.rb +0 -124
- data/lib/aspose_slides_cloud/models/theme.rb +0 -124
- data/lib/aspose_slides_cloud/models/three_d_format.rb +1 -147
- data/lib/aspose_slides_cloud/models/tiff_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/tint_effect.rb +0 -146
- data/lib/aspose_slides_cloud/models/update_background.rb +0 -146
- data/lib/aspose_slides_cloud/models/update_shape.rb +0 -146
- data/lib/aspose_slides_cloud/models/vba_module.rb +113 -0
- data/lib/aspose_slides_cloud/models/vba_project.rb +105 -0
- data/lib/aspose_slides_cloud/models/vba_reference.rb +101 -0
- data/lib/aspose_slides_cloud/models/video_export_options.rb +0 -146
- data/lib/aspose_slides_cloud/models/video_frame.rb +0 -146
- data/lib/aspose_slides_cloud/models/view_properties.rb +0 -146
- data/lib/aspose_slides_cloud/models/workbook.rb +0 -146
- data/lib/aspose_slides_cloud/models/xaml_export_options.rb +0 -124
- data/lib/aspose_slides_cloud/models/xps_export_options.rb +0 -124
- data/lib/aspose_slides_cloud/models/xy_series.rb +0 -146
- data/lib/aspose_slides_cloud/models/zoom_frame.rb +0 -146
- data/lib/aspose_slides_cloud/models/zoom_object.rb +0 -146
- data/lib/aspose_slides_cloud/type_registry.rb +7 -0
- data/lib/aspose_slides_cloud/version.rb +1 -1
- data/lib/aspose_slides_cloud.rb +6 -0
- data/spec/api/slides_api_spec.rb +15105 -9783
- data/spec/spec_utils.rb +1 -1
- data/spec/use_cases/auth_spec.rb +15 -0
- data/spec/use_cases/slide_spec.rb +9 -9
- data/spec/use_cases/table_spec.rb +392 -0
- data/spec/use_cases/vba_spec.rb +94 -0
- data/testConfig.json +2 -2
- data/testRules.json +10 -0
- metadata +57 -6
@@ -31,28 +31,6 @@ module AsposeSlidesCloud
|
|
31
31
|
# Position of the bar line.
|
32
32
|
attr_accessor :position
|
33
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
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
57
35
|
def self.attribute_map
|
58
36
|
super.merge({
|
@@ -131,129 +109,5 @@ module AsposeSlidesCloud
|
|
131
109
|
def hash
|
132
110
|
[type, base, position].hash
|
133
111
|
end
|
134
|
-
|
135
|
-
# Builds the object from hash
|
136
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
-
# @return [Object] Returns the model itself
|
138
|
-
def build_from_hash(attributes)
|
139
|
-
return nil unless attributes.is_a?(Hash)
|
140
|
-
self.class.swagger_types.each_pair do |key, type|
|
141
|
-
mapKey = self.class.attribute_map[key]
|
142
|
-
if !mapKey.nil?
|
143
|
-
val = attributes[mapKey]
|
144
|
-
if val.nil?
|
145
|
-
mapKeyString = mapKey.to_s
|
146
|
-
mapKeyString[0] = mapKeyString[0].downcase
|
147
|
-
mapKey = mapKeyString.to_sym
|
148
|
-
val = attributes[mapKey]
|
149
|
-
end
|
150
|
-
if !val.nil?
|
151
|
-
if type =~ /\AArray<(.*)>/i
|
152
|
-
# check to ensure the input is an array given that the the attribute
|
153
|
-
# is documented as an array but the input is not
|
154
|
-
if val.is_a?(Array)
|
155
|
-
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
156
|
-
end
|
157
|
-
else
|
158
|
-
self.send("#{key}=", _deserialize(type, val))
|
159
|
-
end
|
160
|
-
end
|
161
|
-
end
|
162
|
-
end
|
163
|
-
|
164
|
-
self
|
165
|
-
end
|
166
|
-
|
167
|
-
# Deserializes the data based on type
|
168
|
-
# @param string type Data type
|
169
|
-
# @param string value Value to be deserialized
|
170
|
-
# @return [Object] Deserialized data
|
171
|
-
def _deserialize(type, value)
|
172
|
-
if value.nil?
|
173
|
-
nil
|
174
|
-
else
|
175
|
-
case type.to_sym
|
176
|
-
when :DateTime
|
177
|
-
DateTime.parse(value)
|
178
|
-
when :Date
|
179
|
-
Date.parse(value)
|
180
|
-
when :String
|
181
|
-
value.to_s
|
182
|
-
when :Integer
|
183
|
-
value.to_i
|
184
|
-
when :Float
|
185
|
-
value.to_f
|
186
|
-
when :BOOLEAN
|
187
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
188
|
-
true
|
189
|
-
else
|
190
|
-
false
|
191
|
-
end
|
192
|
-
when :Object
|
193
|
-
# generic object (usually a Hash), return directly
|
194
|
-
value
|
195
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
196
|
-
inner_type = Regexp.last_match[:inner_type]
|
197
|
-
value.map { |v| _deserialize(inner_type, v) }
|
198
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
199
|
-
k_type = Regexp.last_match[:k_type]
|
200
|
-
v_type = Regexp.last_match[:v_type]
|
201
|
-
{}.tap do |hash|
|
202
|
-
value.each do |k, v|
|
203
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
204
|
-
end
|
205
|
-
end
|
206
|
-
else # model
|
207
|
-
registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
|
208
|
-
if registry_type
|
209
|
-
type = registry_type
|
210
|
-
end
|
211
|
-
temp_model = AsposeSlidesCloud.const_get(type).new
|
212
|
-
temp_model.build_from_hash(value)
|
213
|
-
end
|
214
|
-
end
|
215
|
-
end
|
216
|
-
|
217
|
-
# Returns the string representation of the object
|
218
|
-
# @return [String] String presentation of the object
|
219
|
-
def to_s
|
220
|
-
to_hash.to_s
|
221
|
-
end
|
222
|
-
|
223
|
-
# to_body is an alias to to_hash (backward compatibility)
|
224
|
-
# @return [Hash] Returns the object in the form of hash
|
225
|
-
def to_body
|
226
|
-
to_hash
|
227
|
-
end
|
228
|
-
|
229
|
-
# Returns the object in the form of hash
|
230
|
-
# @return [Hash] Returns the object in the form of hash
|
231
|
-
def to_hash
|
232
|
-
hash = {}
|
233
|
-
self.class.attribute_map.each_pair do |attr, param|
|
234
|
-
value = self.send(attr)
|
235
|
-
next if value.nil?
|
236
|
-
hash[param] = _to_hash(value)
|
237
|
-
end
|
238
|
-
hash
|
239
|
-
end
|
240
|
-
|
241
|
-
# Outputs non-array value in the form of hash
|
242
|
-
# For object, use to_hash. Otherwise, just return the value
|
243
|
-
# @param [Object] value Any valid value
|
244
|
-
# @return [Hash] Returns the value in the form of hash
|
245
|
-
def _to_hash(value)
|
246
|
-
if value.is_a?(Array)
|
247
|
-
value.compact.map { |v| _to_hash(v) }
|
248
|
-
elsif value.is_a?(Hash)
|
249
|
-
{}.tap do |hash|
|
250
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
251
|
-
end
|
252
|
-
elsif value.respond_to? :to_hash
|
253
|
-
value.to_hash
|
254
|
-
else
|
255
|
-
value
|
256
|
-
end
|
257
|
-
end
|
258
112
|
end
|
259
113
|
end
|
@@ -28,28 +28,6 @@ module AsposeSlidesCloud
|
|
28
28
|
# Get or sets base64 data.
|
29
29
|
attr_accessor :data
|
30
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
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
32
|
def self.attribute_map
|
55
33
|
super.merge({
|
@@ -110,129 +88,5 @@ module AsposeSlidesCloud
|
|
110
88
|
def hash
|
111
89
|
[password, type, data].hash
|
112
90
|
end
|
113
|
-
|
114
|
-
# Builds the object from hash
|
115
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
-
# @return [Object] Returns the model itself
|
117
|
-
def build_from_hash(attributes)
|
118
|
-
return nil unless attributes.is_a?(Hash)
|
119
|
-
self.class.swagger_types.each_pair do |key, type|
|
120
|
-
mapKey = self.class.attribute_map[key]
|
121
|
-
if !mapKey.nil?
|
122
|
-
val = attributes[mapKey]
|
123
|
-
if val.nil?
|
124
|
-
mapKeyString = mapKey.to_s
|
125
|
-
mapKeyString[0] = mapKeyString[0].downcase
|
126
|
-
mapKey = mapKeyString.to_sym
|
127
|
-
val = attributes[mapKey]
|
128
|
-
end
|
129
|
-
if !val.nil?
|
130
|
-
if type =~ /\AArray<(.*)>/i
|
131
|
-
# check to ensure the input is an array given that the the attribute
|
132
|
-
# is documented as an array but the input is not
|
133
|
-
if val.is_a?(Array)
|
134
|
-
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
135
|
-
end
|
136
|
-
else
|
137
|
-
self.send("#{key}=", _deserialize(type, val))
|
138
|
-
end
|
139
|
-
end
|
140
|
-
end
|
141
|
-
end
|
142
|
-
|
143
|
-
self
|
144
|
-
end
|
145
|
-
|
146
|
-
# Deserializes the data based on type
|
147
|
-
# @param string type Data type
|
148
|
-
# @param string value Value to be deserialized
|
149
|
-
# @return [Object] Deserialized data
|
150
|
-
def _deserialize(type, value)
|
151
|
-
if value.nil?
|
152
|
-
nil
|
153
|
-
else
|
154
|
-
case type.to_sym
|
155
|
-
when :DateTime
|
156
|
-
DateTime.parse(value)
|
157
|
-
when :Date
|
158
|
-
Date.parse(value)
|
159
|
-
when :String
|
160
|
-
value.to_s
|
161
|
-
when :Integer
|
162
|
-
value.to_i
|
163
|
-
when :Float
|
164
|
-
value.to_f
|
165
|
-
when :BOOLEAN
|
166
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
167
|
-
true
|
168
|
-
else
|
169
|
-
false
|
170
|
-
end
|
171
|
-
when :Object
|
172
|
-
# generic object (usually a Hash), return directly
|
173
|
-
value
|
174
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
175
|
-
inner_type = Regexp.last_match[:inner_type]
|
176
|
-
value.map { |v| _deserialize(inner_type, v) }
|
177
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
178
|
-
k_type = Regexp.last_match[:k_type]
|
179
|
-
v_type = Regexp.last_match[:v_type]
|
180
|
-
{}.tap do |hash|
|
181
|
-
value.each do |k, v|
|
182
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
183
|
-
end
|
184
|
-
end
|
185
|
-
else # model
|
186
|
-
registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
|
187
|
-
if registry_type
|
188
|
-
type = registry_type
|
189
|
-
end
|
190
|
-
temp_model = AsposeSlidesCloud.const_get(type).new
|
191
|
-
temp_model.build_from_hash(value)
|
192
|
-
end
|
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
91
|
end
|
238
92
|
end
|
@@ -0,0 +1,173 @@
|
|
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
|
+
class BaseObject
|
27
|
+
class EnumAttributeValidator
|
28
|
+
attr_reader :datatype
|
29
|
+
attr_reader :allowable_values
|
30
|
+
|
31
|
+
def initialize(datatype, allowable_values)
|
32
|
+
@allowable_values = allowable_values.map do |value|
|
33
|
+
case datatype.to_s
|
34
|
+
when /Integer/i
|
35
|
+
value.to_i
|
36
|
+
when /Float/i
|
37
|
+
value.to_f
|
38
|
+
else
|
39
|
+
value
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def valid?(value)
|
45
|
+
!value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# Builds the object from hash
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
# @return [Object] Returns the model itself
|
52
|
+
def build_from_hash(attributes)
|
53
|
+
return nil unless attributes.is_a?(Hash)
|
54
|
+
self.class.swagger_types.each_pair do |key, type|
|
55
|
+
mapKey = self.class.attribute_map[key]
|
56
|
+
if !mapKey.nil?
|
57
|
+
val = attributes[mapKey]
|
58
|
+
if val.nil?
|
59
|
+
mapKeyString = mapKey.to_s
|
60
|
+
mapKeyString[0] = mapKeyString[0].downcase
|
61
|
+
mapKey = mapKeyString.to_sym
|
62
|
+
val = attributes[mapKey]
|
63
|
+
end
|
64
|
+
if !val.nil?
|
65
|
+
if type =~ /\AArray<(.*)>/i
|
66
|
+
# check to ensure the input is an array given that the the attribute
|
67
|
+
# is documented as an array but the input is not
|
68
|
+
if val.is_a?(Array)
|
69
|
+
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
70
|
+
end
|
71
|
+
else
|
72
|
+
self.send("#{key}=", _deserialize(type, val))
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
self
|
79
|
+
end
|
80
|
+
|
81
|
+
# Deserializes the data based on type
|
82
|
+
# @param string type Data type
|
83
|
+
# @param string value Value to be deserialized
|
84
|
+
# @return [Object] Deserialized data
|
85
|
+
def _deserialize(type, value)
|
86
|
+
if value.nil?
|
87
|
+
nil
|
88
|
+
else
|
89
|
+
case type.to_sym
|
90
|
+
when :DateTime
|
91
|
+
DateTime.parse(value)
|
92
|
+
when :Date
|
93
|
+
Date.parse(value)
|
94
|
+
when :String
|
95
|
+
value.to_s
|
96
|
+
when :Integer
|
97
|
+
value.to_i
|
98
|
+
when :Float
|
99
|
+
value.to_f
|
100
|
+
when :BOOLEAN
|
101
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
102
|
+
true
|
103
|
+
else
|
104
|
+
false
|
105
|
+
end
|
106
|
+
when :Object
|
107
|
+
# generic object (usually a Hash), return directly
|
108
|
+
value
|
109
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
110
|
+
inner_type = Regexp.last_match[:inner_type]
|
111
|
+
value.map { |v| _deserialize(inner_type, v) }
|
112
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
113
|
+
k_type = Regexp.last_match[:k_type]
|
114
|
+
v_type = Regexp.last_match[:v_type]
|
115
|
+
{}.tap do |hash|
|
116
|
+
value.each do |k, v|
|
117
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
else # model
|
121
|
+
registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
|
122
|
+
if registry_type
|
123
|
+
type = registry_type
|
124
|
+
end
|
125
|
+
temp_model = AsposeSlidesCloud.const_get(type).new
|
126
|
+
temp_model.build_from_hash(value)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# Returns the string representation of the object
|
132
|
+
# @return [String] String presentation of the object
|
133
|
+
def to_s
|
134
|
+
to_hash.to_s
|
135
|
+
end
|
136
|
+
|
137
|
+
# to_body is an alias to to_hash (backward compatibility)
|
138
|
+
# @return [Hash] Returns the object in the form of hash
|
139
|
+
def to_body
|
140
|
+
to_hash
|
141
|
+
end
|
142
|
+
|
143
|
+
# Returns the object in the form of hash
|
144
|
+
# @return [Hash] Returns the object in the form of hash
|
145
|
+
def to_hash
|
146
|
+
hash = {}
|
147
|
+
self.class.attribute_map.each_pair do |attr, param|
|
148
|
+
value = self.send(attr)
|
149
|
+
next if value.nil?
|
150
|
+
hash[param] = _to_hash(value)
|
151
|
+
end
|
152
|
+
hash
|
153
|
+
end
|
154
|
+
|
155
|
+
# Outputs non-array value in the form of hash
|
156
|
+
# For object, use to_hash. Otherwise, just return the value
|
157
|
+
# @param [Object] value Any valid value
|
158
|
+
# @return [Hash] Returns the value in the form of hash
|
159
|
+
def _to_hash(value)
|
160
|
+
if value.is_a?(Array)
|
161
|
+
value.compact.map { |v| _to_hash(v) }
|
162
|
+
elsif value.is_a?(Hash)
|
163
|
+
{}.tap do |hash|
|
164
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
165
|
+
end
|
166
|
+
elsif value.respond_to? :to_hash
|
167
|
+
value.to_hash
|
168
|
+
else
|
169
|
+
value
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
@@ -28,28 +28,6 @@ module AsposeSlidesCloud
|
|
28
28
|
# Returns effect threshold.
|
29
29
|
attr_accessor :threshold
|
30
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
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
32
|
def self.attribute_map
|
55
33
|
super.merge({
|
@@ -114,129 +92,5 @@ module AsposeSlidesCloud
|
|
114
92
|
def hash
|
115
93
|
[type, threshold].hash
|
116
94
|
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
|
-
if value.nil?
|
156
|
-
nil
|
157
|
-
else
|
158
|
-
case type.to_sym
|
159
|
-
when :DateTime
|
160
|
-
DateTime.parse(value)
|
161
|
-
when :Date
|
162
|
-
Date.parse(value)
|
163
|
-
when :String
|
164
|
-
value.to_s
|
165
|
-
when :Integer
|
166
|
-
value.to_i
|
167
|
-
when :Float
|
168
|
-
value.to_f
|
169
|
-
when :BOOLEAN
|
170
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
171
|
-
true
|
172
|
-
else
|
173
|
-
false
|
174
|
-
end
|
175
|
-
when :Object
|
176
|
-
# generic object (usually a Hash), return directly
|
177
|
-
value
|
178
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
179
|
-
inner_type = Regexp.last_match[:inner_type]
|
180
|
-
value.map { |v| _deserialize(inner_type, v) }
|
181
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
182
|
-
k_type = Regexp.last_match[:k_type]
|
183
|
-
v_type = Regexp.last_match[:v_type]
|
184
|
-
{}.tap do |hash|
|
185
|
-
value.each do |k, v|
|
186
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
187
|
-
end
|
188
|
-
end
|
189
|
-
else # model
|
190
|
-
registry_type = AsposeSlidesCloud::TypeRegistry.get_type(type.to_s, value)
|
191
|
-
if registry_type
|
192
|
-
type = registry_type
|
193
|
-
end
|
194
|
-
temp_model = AsposeSlidesCloud.const_get(type).new
|
195
|
-
temp_model.build_from_hash(value)
|
196
|
-
end
|
197
|
-
end
|
198
|
-
end
|
199
|
-
|
200
|
-
# Returns the string representation of the object
|
201
|
-
# @return [String] String presentation of the object
|
202
|
-
def to_s
|
203
|
-
to_hash.to_s
|
204
|
-
end
|
205
|
-
|
206
|
-
# to_body is an alias to to_hash (backward compatibility)
|
207
|
-
# @return [Hash] Returns the object in the form of hash
|
208
|
-
def to_body
|
209
|
-
to_hash
|
210
|
-
end
|
211
|
-
|
212
|
-
# Returns the object in the form of hash
|
213
|
-
# @return [Hash] Returns the object in the form of hash
|
214
|
-
def to_hash
|
215
|
-
hash = {}
|
216
|
-
self.class.attribute_map.each_pair do |attr, param|
|
217
|
-
value = self.send(attr)
|
218
|
-
next if value.nil?
|
219
|
-
hash[param] = _to_hash(value)
|
220
|
-
end
|
221
|
-
hash
|
222
|
-
end
|
223
|
-
|
224
|
-
# Outputs non-array value in the form of hash
|
225
|
-
# For object, use to_hash. Otherwise, just return the value
|
226
|
-
# @param [Object] value Any valid value
|
227
|
-
# @return [Hash] Returns the value in the form of hash
|
228
|
-
def _to_hash(value)
|
229
|
-
if value.is_a?(Array)
|
230
|
-
value.compact.map { |v| _to_hash(v) }
|
231
|
-
elsif value.is_a?(Hash)
|
232
|
-
{}.tap do |hash|
|
233
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
234
|
-
end
|
235
|
-
elsif value.respond_to? :to_hash
|
236
|
-
value.to_hash
|
237
|
-
else
|
238
|
-
value
|
239
|
-
end
|
240
|
-
end
|
241
95
|
end
|
242
96
|
end
|