aspose_slides_cloud 20.5.0 → 20.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/TestData/ChartTest.pptx +0 -0
- data/TestData/Sections.pptx +0 -0
- data/lib/aspose_slides_cloud.rb +12 -5
- data/lib/aspose_slides_cloud/api/slides_api.rb +4571 -1683
- data/lib/aspose_slides_cloud/api/slides_api_requests.rb +1191 -185
- data/lib/aspose_slides_cloud/api_client.rb +30 -23
- data/lib/aspose_slides_cloud/configuration.rb +7 -2
- data/lib/aspose_slides_cloud/models/add_layout_slide.rb +31 -48
- data/lib/aspose_slides_cloud/models/add_master_slide.rb +31 -48
- data/lib/aspose_slides_cloud/models/add_shape.rb +31 -48
- data/lib/aspose_slides_cloud/models/add_slide.rb +31 -48
- data/lib/aspose_slides_cloud/models/api_info.rb +22 -10
- data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +22 -10
- data/lib/aspose_slides_cloud/models/audio_frame.rb +32 -246
- data/lib/aspose_slides_cloud/models/axes.rb +22 -10
- data/lib/aspose_slides_cloud/models/axis.rb +22 -10
- data/lib/aspose_slides_cloud/models/base64_input_file.rb +31 -57
- data/lib/aspose_slides_cloud/models/blur_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +31 -222
- data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +30 -48
- data/lib/aspose_slides_cloud/models/bubble_series.rb +31 -211
- data/lib/aspose_slides_cloud/models/chart.rb +32 -220
- data/lib/aspose_slides_cloud/models/chart_category.rb +54 -20
- data/lib/aspose_slides_cloud/models/chart_title.rb +22 -10
- data/lib/aspose_slides_cloud/models/chart_wall.rb +22 -10
- data/lib/aspose_slides_cloud/models/color_scheme.rb +30 -40
- data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +22 -10
- data/lib/aspose_slides_cloud/models/connector.rb +32 -244
- data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +22 -10
- data/lib/aspose_slides_cloud/models/{resource_uri_element.rb → data_point.rb} +24 -22
- data/lib/aspose_slides_cloud/models/disc_usage.rb +22 -10
- data/lib/aspose_slides_cloud/models/document.rb +35 -45
- data/lib/aspose_slides_cloud/models/document_properties.rb +30 -40
- data/lib/aspose_slides_cloud/models/document_property.rb +30 -40
- data/lib/aspose_slides_cloud/models/document_replace_result.rb +30 -94
- data/lib/aspose_slides_cloud/models/effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/effect_format.rb +22 -10
- data/lib/aspose_slides_cloud/models/entity_exists.rb +212 -0
- data/lib/aspose_slides_cloud/models/error.rb +22 -10
- data/lib/aspose_slides_cloud/models/error_details.rb +22 -10
- data/lib/aspose_slides_cloud/models/export_format.rb +1 -0
- data/lib/aspose_slides_cloud/models/export_options.rb +33 -11
- data/lib/aspose_slides_cloud/models/file_version.rb +30 -75
- data/lib/aspose_slides_cloud/models/file_versions.rb +22 -10
- data/lib/aspose_slides_cloud/models/files_list.rb +22 -10
- data/lib/aspose_slides_cloud/models/files_upload_result.rb +22 -10
- data/lib/aspose_slides_cloud/models/fill_format.rb +22 -10
- data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/font_scheme.rb +30 -40
- data/lib/aspose_slides_cloud/models/font_set.rb +22 -10
- data/lib/aspose_slides_cloud/models/format_scheme.rb +30 -40
- data/lib/aspose_slides_cloud/models/geometry_shape.rb +33 -212
- data/lib/aspose_slides_cloud/models/glow_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/gradient_fill.rb +31 -48
- data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +22 -10
- data/lib/aspose_slides_cloud/models/graphical_object.rb +31 -219
- data/lib/aspose_slides_cloud/models/group_shape.rb +31 -219
- data/lib/aspose_slides_cloud/models/header_footer.rb +247 -0
- data/lib/aspose_slides_cloud/models/html_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +22 -20
- data/lib/aspose_slides_cloud/models/image.rb +30 -40
- data/lib/aspose_slides_cloud/models/image_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/models/images.rb +30 -40
- data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/input.rb +22 -10
- data/lib/aspose_slides_cloud/models/input_file.rb +22 -10
- data/lib/aspose_slides_cloud/models/interactive_sequence.rb +22 -10
- data/lib/aspose_slides_cloud/models/layout_slide.rb +31 -41
- data/lib/aspose_slides_cloud/models/layout_slides.rb +30 -40
- data/lib/aspose_slides_cloud/models/legend.rb +22 -10
- data/lib/aspose_slides_cloud/models/line_format.rb +22 -10
- data/lib/aspose_slides_cloud/models/master_slide.rb +31 -41
- data/lib/aspose_slides_cloud/models/master_slides.rb +30 -40
- data/lib/aspose_slides_cloud/models/merge.rb +31 -48
- data/lib/aspose_slides_cloud/models/merging_source.rb +22 -10
- data/lib/aspose_slides_cloud/models/no_fill.rb +29 -46
- data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +22 -10
- data/lib/aspose_slides_cloud/models/notes_slide.rb +30 -40
- data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +267 -0
- data/lib/aspose_slides_cloud/models/object_exist.rb +22 -10
- data/lib/aspose_slides_cloud/models/ole_object_frame.rb +32 -220
- data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +30 -20
- data/lib/aspose_slides_cloud/models/one_value_series.rb +31 -211
- data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +22 -10
- data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/output_file.rb +22 -10
- data/lib/aspose_slides_cloud/models/paragraph.rb +30 -40
- data/lib/aspose_slides_cloud/models/paragraphs.rb +30 -40
- data/lib/aspose_slides_cloud/models/path_input_file.rb +31 -57
- data/lib/aspose_slides_cloud/models/path_output_file.rb +31 -48
- data/lib/aspose_slides_cloud/models/pattern_fill.rb +31 -48
- data/lib/aspose_slides_cloud/models/pdf_export_options.rb +63 -35
- data/lib/aspose_slides_cloud/models/picture_fill.rb +32 -49
- data/lib/aspose_slides_cloud/models/picture_frame.rb +32 -246
- data/lib/aspose_slides_cloud/models/pipeline.rb +22 -10
- data/lib/aspose_slides_cloud/models/placeholder.rb +30 -40
- data/lib/aspose_slides_cloud/models/placeholders.rb +30 -40
- data/lib/aspose_slides_cloud/models/plot_area.rb +22 -10
- data/lib/aspose_slides_cloud/models/portion.rb +30 -40
- data/lib/aspose_slides_cloud/models/portions.rb +36 -46
- data/lib/aspose_slides_cloud/models/pptx_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +22 -10
- data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +22 -10
- data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/reflection_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/remove_shape.rb +31 -48
- data/lib/aspose_slides_cloud/models/remove_slide.rb +31 -48
- data/lib/aspose_slides_cloud/models/reorder_slide.rb +31 -48
- data/lib/aspose_slides_cloud/models/replace_text.rb +31 -48
- data/lib/aspose_slides_cloud/models/request_input_file.rb +31 -57
- data/lib/aspose_slides_cloud/models/reset_slide.rb +31 -48
- data/lib/aspose_slides_cloud/models/resource_base.rb +22 -10
- data/lib/aspose_slides_cloud/models/resource_uri.rb +22 -10
- data/lib/aspose_slides_cloud/models/response_output_file.rb +29 -46
- data/lib/aspose_slides_cloud/models/save.rb +33 -50
- data/lib/aspose_slides_cloud/models/save_shape.rb +31 -48
- data/lib/aspose_slides_cloud/models/save_slide.rb +33 -50
- data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +30 -20
- data/lib/aspose_slides_cloud/models/scatter_series.rb +31 -211
- data/lib/aspose_slides_cloud/models/section.rb +234 -0
- data/lib/aspose_slides_cloud/models/sections.rb +209 -0
- data/lib/aspose_slides_cloud/models/series.rb +45 -12
- data/lib/aspose_slides_cloud/models/series_marker.rb +22 -10
- data/lib/aspose_slides_cloud/models/shape.rb +32 -244
- data/lib/aspose_slides_cloud/models/shape_base.rb +31 -62
- data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +22 -10
- data/lib/aspose_slides_cloud/models/shapes.rb +30 -40
- data/lib/aspose_slides_cloud/models/slide.rb +37 -47
- data/lib/aspose_slides_cloud/models/slide_animation.rb +30 -40
- data/lib/aspose_slides_cloud/models/slide_background.rb +30 -40
- data/lib/aspose_slides_cloud/models/slide_comment.rb +22 -10
- data/lib/aspose_slides_cloud/models/slide_comments.rb +30 -40
- data/lib/aspose_slides_cloud/models/slide_export_format.rb +1 -0
- data/lib/aspose_slides_cloud/models/slide_replace_result.rb +30 -154
- data/lib/aspose_slides_cloud/models/slides.rb +30 -40
- data/lib/aspose_slides_cloud/models/smart_art.rb +32 -220
- data/lib/aspose_slides_cloud/models/smart_art_node.rb +23 -11
- data/lib/aspose_slides_cloud/models/smart_art_shape.rb +30 -217
- data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +22 -10
- data/lib/aspose_slides_cloud/models/solid_fill.rb +31 -48
- data/lib/aspose_slides_cloud/models/split_document_result.rb +30 -40
- data/lib/aspose_slides_cloud/models/storage_exist.rb +22 -10
- data/lib/aspose_slides_cloud/models/storage_file.rb +22 -10
- data/lib/aspose_slides_cloud/models/svg_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/models/swf_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/models/table.rb +32 -220
- data/lib/aspose_slides_cloud/models/table_cell.rb +22 -10
- data/lib/aspose_slides_cloud/models/table_column.rb +22 -10
- data/lib/aspose_slides_cloud/models/table_row.rb +22 -10
- data/lib/aspose_slides_cloud/models/task.rb +22 -10
- data/lib/aspose_slides_cloud/models/text_item.rb +22 -10
- data/lib/aspose_slides_cloud/models/text_items.rb +30 -40
- data/lib/aspose_slides_cloud/models/theme.rb +32 -42
- data/lib/aspose_slides_cloud/models/tiff_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/models/update_background.rb +31 -48
- data/lib/aspose_slides_cloud/models/update_shape.rb +31 -48
- data/lib/aspose_slides_cloud/models/video_frame.rb +32 -246
- data/lib/aspose_slides_cloud/models/view_properties.rb +30 -40
- data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +206 -0
- data/lib/aspose_slides_cloud/models/waterfall_series.rb +31 -222
- data/lib/aspose_slides_cloud/models/xps_export_options.rb +33 -32
- data/lib/aspose_slides_cloud/type_registry.rb +320 -0
- data/lib/aspose_slides_cloud/version.rb +1 -1
- data/spec/api/slides_api_spec.rb +25246 -14028
- data/spec/extra/extra_spec.rb +156 -22
- data/spec/spec_utils.rb +11 -4
- data/testConfig.json +2 -2
- data/testRules.json +172 -77
- metadata +12 -3
@@ -35,7 +35,7 @@ module AsposeSlidesCloud
|
|
35
35
|
def self.attribute_map
|
36
36
|
{
|
37
37
|
:'input' => :'Input',
|
38
|
-
:'slides' => :'Slides'
|
38
|
+
:'slides' => :'Slides',
|
39
39
|
}
|
40
40
|
end
|
41
41
|
|
@@ -43,7 +43,7 @@ module AsposeSlidesCloud
|
|
43
43
|
def self.swagger_types
|
44
44
|
{
|
45
45
|
:'input' => :'InputFile',
|
46
|
-
:'slides' => :'Array<Integer>'
|
46
|
+
:'slides' => :'Array<Integer>',
|
47
47
|
}
|
48
48
|
end
|
49
49
|
|
@@ -106,15 +106,27 @@ module AsposeSlidesCloud
|
|
106
106
|
def build_from_hash(attributes)
|
107
107
|
return nil unless attributes.is_a?(Hash)
|
108
108
|
self.class.swagger_types.each_pair do |key, type|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
if
|
113
|
-
|
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]
|
114
117
|
end
|
115
|
-
|
116
|
-
|
117
|
-
|
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
|
118
130
|
end
|
119
131
|
|
120
132
|
self
|
@@ -24,10 +24,7 @@ require 'date'
|
|
24
24
|
|
25
25
|
module AsposeSlidesCloud
|
26
26
|
# Represents empty fill
|
27
|
-
class NoFill
|
28
|
-
# Fill type.
|
29
|
-
attr_accessor :type
|
30
|
-
|
27
|
+
class NoFill < FillFormat
|
31
28
|
class EnumAttributeValidator
|
32
29
|
attr_reader :datatype
|
33
30
|
attr_reader :allowable_values
|
@@ -52,63 +49,37 @@ module AsposeSlidesCloud
|
|
52
49
|
|
53
50
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
51
|
def self.attribute_map
|
55
|
-
{
|
56
|
-
|
57
|
-
}
|
52
|
+
super.merge({
|
53
|
+
})
|
58
54
|
end
|
59
55
|
|
60
56
|
# Attribute type mapping.
|
61
57
|
def self.swagger_types
|
62
|
-
{
|
63
|
-
|
64
|
-
}
|
58
|
+
super.merge({
|
59
|
+
})
|
65
60
|
end
|
66
61
|
|
67
62
|
# Initializes the object
|
68
63
|
# @param [Hash] attributes Model attributes in the form of hash
|
69
64
|
def initialize(attributes = {})
|
70
|
-
|
71
|
-
|
72
|
-
# convert string to symbol for hash key
|
73
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
74
|
-
|
75
|
-
if attributes.has_key?(:'Type')
|
76
|
-
self.type = attributes[:'Type']
|
77
|
-
else
|
78
|
-
self.type = "NoFill"
|
79
|
-
end
|
65
|
+
super
|
66
|
+
self.type = "NoFill"
|
80
67
|
end
|
81
68
|
|
82
69
|
# Show invalid properties with the reasons. Usually used together with valid?
|
83
70
|
# @return Array for valid properties with the reasons
|
84
71
|
def list_invalid_properties
|
85
|
-
invalid_properties =
|
86
|
-
if @type.nil?
|
87
|
-
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
88
|
-
end
|
89
|
-
|
72
|
+
invalid_properties = super
|
90
73
|
invalid_properties
|
91
74
|
end
|
92
75
|
|
93
76
|
# Check to see if the all the properties in the model are valid
|
94
77
|
# @return true if the model is valid
|
95
78
|
def valid?
|
96
|
-
return false if
|
97
|
-
type_validator = EnumAttributeValidator.new('String', ['NoFill', 'Solid', 'Gradient', 'Pattern', 'Picture', 'NotDefined'])
|
98
|
-
return false unless type_validator.valid?(@type)
|
79
|
+
return false if !super
|
99
80
|
true
|
100
81
|
end
|
101
82
|
|
102
|
-
# Custom attribute writer method checking allowed values (enum).
|
103
|
-
# @param [Object] type Object to be assigned
|
104
|
-
def type=(type)
|
105
|
-
validator = EnumAttributeValidator.new('String', ['NoFill', 'Solid', 'Gradient', 'Pattern', 'Picture', 'NotDefined'])
|
106
|
-
unless validator.valid?(type)
|
107
|
-
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
108
|
-
end
|
109
|
-
@type = type
|
110
|
-
end
|
111
|
-
|
112
83
|
# Checks equality by comparing each attribute.
|
113
84
|
# @param [Object] Object to be compared
|
114
85
|
def ==(o)
|
@@ -135,15 +106,27 @@ module AsposeSlidesCloud
|
|
135
106
|
def build_from_hash(attributes)
|
136
107
|
return nil unless attributes.is_a?(Hash)
|
137
108
|
self.class.swagger_types.each_pair do |key, type|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
if
|
142
|
-
|
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
|
143
128
|
end
|
144
|
-
|
145
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
146
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
129
|
+
end
|
147
130
|
end
|
148
131
|
|
149
132
|
self
|
@@ -35,7 +35,7 @@ module AsposeSlidesCloud
|
|
35
35
|
def self.attribute_map
|
36
36
|
{
|
37
37
|
:'auto_adjust' => :'AutoAdjust',
|
38
|
-
:'dimension_size' => :'DimensionSize'
|
38
|
+
:'dimension_size' => :'DimensionSize',
|
39
39
|
}
|
40
40
|
end
|
41
41
|
|
@@ -43,7 +43,7 @@ module AsposeSlidesCloud
|
|
43
43
|
def self.swagger_types
|
44
44
|
{
|
45
45
|
:'auto_adjust' => :'BOOLEAN',
|
46
|
-
:'dimension_size' => :'Float'
|
46
|
+
:'dimension_size' => :'Float',
|
47
47
|
}
|
48
48
|
end
|
49
49
|
|
@@ -104,15 +104,27 @@ module AsposeSlidesCloud
|
|
104
104
|
def build_from_hash(attributes)
|
105
105
|
return nil unless attributes.is_a?(Hash)
|
106
106
|
self.class.swagger_types.each_pair do |key, type|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
if
|
111
|
-
|
107
|
+
mapKey = self.class.attribute_map[key]
|
108
|
+
if !mapKey.nil?
|
109
|
+
val = attributes[mapKey]
|
110
|
+
if val.nil?
|
111
|
+
mapKeyString = mapKey.to_s
|
112
|
+
mapKeyString[0] = mapKeyString[0].downcase
|
113
|
+
mapKey = mapKeyString.to_sym
|
114
|
+
val = attributes[mapKey]
|
112
115
|
end
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
+
if !val.nil?
|
117
|
+
if type =~ /\AArray<(.*)>/i
|
118
|
+
# check to ensure the input is an array given that the the attribute
|
119
|
+
# is documented as an array but the input is not
|
120
|
+
if val.is_a?(Array)
|
121
|
+
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
122
|
+
end
|
123
|
+
else
|
124
|
+
self.send("#{key}=", _deserialize(type, val))
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
116
128
|
end
|
117
129
|
|
118
130
|
self
|
@@ -24,13 +24,7 @@ require 'date'
|
|
24
24
|
|
25
25
|
module AsposeSlidesCloud
|
26
26
|
# Represents notes slide DTO.
|
27
|
-
class NotesSlide
|
28
|
-
# Gets or sets the link to this resource.
|
29
|
-
attr_accessor :self_uri
|
30
|
-
|
31
|
-
# List of alternate links.
|
32
|
-
attr_accessor :alternate_links
|
33
|
-
|
27
|
+
class NotesSlide < ResourceBase
|
34
28
|
# Get or sets text of notes slide.
|
35
29
|
attr_accessor :text
|
36
30
|
|
@@ -39,41 +33,24 @@ module AsposeSlidesCloud
|
|
39
33
|
|
40
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
35
|
def self.attribute_map
|
42
|
-
{
|
43
|
-
:'self_uri' => :'SelfUri',
|
44
|
-
:'alternate_links' => :'AlternateLinks',
|
36
|
+
super.merge({
|
45
37
|
:'text' => :'Text',
|
46
|
-
:'shapes' => :'Shapes'
|
47
|
-
}
|
38
|
+
:'shapes' => :'Shapes',
|
39
|
+
})
|
48
40
|
end
|
49
41
|
|
50
42
|
# Attribute type mapping.
|
51
43
|
def self.swagger_types
|
52
|
-
{
|
53
|
-
:'self_uri' => :'ResourceUri',
|
54
|
-
:'alternate_links' => :'Array<ResourceUri>',
|
44
|
+
super.merge({
|
55
45
|
:'text' => :'String',
|
56
|
-
:'shapes' => :'
|
57
|
-
}
|
46
|
+
:'shapes' => :'ResourceUri',
|
47
|
+
})
|
58
48
|
end
|
59
49
|
|
60
50
|
# Initializes the object
|
61
51
|
# @param [Hash] attributes Model attributes in the form of hash
|
62
52
|
def initialize(attributes = {})
|
63
|
-
|
64
|
-
|
65
|
-
# convert string to symbol for hash key
|
66
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
67
|
-
|
68
|
-
if attributes.has_key?(:'SelfUri')
|
69
|
-
self.self_uri = attributes[:'SelfUri']
|
70
|
-
end
|
71
|
-
|
72
|
-
if attributes.has_key?(:'AlternateLinks')
|
73
|
-
if (value = attributes[:'AlternateLinks']).is_a?(Array)
|
74
|
-
self.alternate_links = value
|
75
|
-
end
|
76
|
-
end
|
53
|
+
super
|
77
54
|
|
78
55
|
if attributes.has_key?(:'Text')
|
79
56
|
self.text = attributes[:'Text']
|
@@ -87,13 +64,14 @@ module AsposeSlidesCloud
|
|
87
64
|
# Show invalid properties with the reasons. Usually used together with valid?
|
88
65
|
# @return Array for valid properties with the reasons
|
89
66
|
def list_invalid_properties
|
90
|
-
invalid_properties =
|
67
|
+
invalid_properties = super
|
91
68
|
invalid_properties
|
92
69
|
end
|
93
70
|
|
94
71
|
# Check to see if the all the properties in the model are valid
|
95
72
|
# @return true if the model is valid
|
96
73
|
def valid?
|
74
|
+
return false if !super
|
97
75
|
true
|
98
76
|
end
|
99
77
|
|
@@ -126,15 +104,27 @@ module AsposeSlidesCloud
|
|
126
104
|
def build_from_hash(attributes)
|
127
105
|
return nil unless attributes.is_a?(Hash)
|
128
106
|
self.class.swagger_types.each_pair do |key, type|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
if
|
133
|
-
|
107
|
+
mapKey = self.class.attribute_map[key]
|
108
|
+
if !mapKey.nil?
|
109
|
+
val = attributes[mapKey]
|
110
|
+
if val.nil?
|
111
|
+
mapKeyString = mapKey.to_s
|
112
|
+
mapKeyString[0] = mapKeyString[0].downcase
|
113
|
+
mapKey = mapKeyString.to_sym
|
114
|
+
val = attributes[mapKey]
|
134
115
|
end
|
135
|
-
|
136
|
-
|
137
|
-
|
116
|
+
if !val.nil?
|
117
|
+
if type =~ /\AArray<(.*)>/i
|
118
|
+
# check to ensure the input is an array given that the the attribute
|
119
|
+
# is documented as an array but the input is not
|
120
|
+
if val.is_a?(Array)
|
121
|
+
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
122
|
+
end
|
123
|
+
else
|
124
|
+
self.send("#{key}=", _deserialize(type, val))
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
138
128
|
end
|
139
129
|
|
140
130
|
self
|
@@ -0,0 +1,267 @@
|
|
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 header/footer info of notes slide
|
27
|
+
class NotesSlideHeaderFooter < ResourceBase
|
28
|
+
# True if date is displayed in the footer
|
29
|
+
attr_accessor :is_date_time_visible
|
30
|
+
|
31
|
+
# Text to be displayed as date in the footer
|
32
|
+
attr_accessor :date_time_text
|
33
|
+
|
34
|
+
# True if footer is displayed
|
35
|
+
attr_accessor :is_footer_visible
|
36
|
+
|
37
|
+
# Text to be displayed in the footer
|
38
|
+
attr_accessor :footer_text
|
39
|
+
|
40
|
+
# True if header is displayed
|
41
|
+
attr_accessor :is_header_visible
|
42
|
+
|
43
|
+
# Text to be displayed in the header
|
44
|
+
attr_accessor :header_text
|
45
|
+
|
46
|
+
# True if slide number is displayed in the footer
|
47
|
+
attr_accessor :is_slide_number_visible
|
48
|
+
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
50
|
+
def self.attribute_map
|
51
|
+
super.merge({
|
52
|
+
:'is_date_time_visible' => :'IsDateTimeVisible',
|
53
|
+
:'date_time_text' => :'DateTimeText',
|
54
|
+
:'is_footer_visible' => :'IsFooterVisible',
|
55
|
+
:'footer_text' => :'FooterText',
|
56
|
+
:'is_header_visible' => :'IsHeaderVisible',
|
57
|
+
:'header_text' => :'HeaderText',
|
58
|
+
:'is_slide_number_visible' => :'IsSlideNumberVisible',
|
59
|
+
})
|
60
|
+
end
|
61
|
+
|
62
|
+
# Attribute type mapping.
|
63
|
+
def self.swagger_types
|
64
|
+
super.merge({
|
65
|
+
:'is_date_time_visible' => :'BOOLEAN',
|
66
|
+
:'date_time_text' => :'String',
|
67
|
+
:'is_footer_visible' => :'BOOLEAN',
|
68
|
+
:'footer_text' => :'String',
|
69
|
+
:'is_header_visible' => :'BOOLEAN',
|
70
|
+
:'header_text' => :'String',
|
71
|
+
:'is_slide_number_visible' => :'BOOLEAN',
|
72
|
+
})
|
73
|
+
end
|
74
|
+
|
75
|
+
# Initializes the object
|
76
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
77
|
+
def initialize(attributes = {})
|
78
|
+
super
|
79
|
+
|
80
|
+
if attributes.has_key?(:'IsDateTimeVisible')
|
81
|
+
self.is_date_time_visible = attributes[:'IsDateTimeVisible']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.has_key?(:'DateTimeText')
|
85
|
+
self.date_time_text = attributes[:'DateTimeText']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.has_key?(:'IsFooterVisible')
|
89
|
+
self.is_footer_visible = attributes[:'IsFooterVisible']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.has_key?(:'FooterText')
|
93
|
+
self.footer_text = attributes[:'FooterText']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.has_key?(:'IsHeaderVisible')
|
97
|
+
self.is_header_visible = attributes[:'IsHeaderVisible']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.has_key?(:'HeaderText')
|
101
|
+
self.header_text = attributes[:'HeaderText']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.has_key?(:'IsSlideNumberVisible')
|
105
|
+
self.is_slide_number_visible = attributes[:'IsSlideNumberVisible']
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
110
|
+
# @return Array for valid properties with the reasons
|
111
|
+
def list_invalid_properties
|
112
|
+
invalid_properties = super
|
113
|
+
invalid_properties
|
114
|
+
end
|
115
|
+
|
116
|
+
# Check to see if the all the properties in the model are valid
|
117
|
+
# @return true if the model is valid
|
118
|
+
def valid?
|
119
|
+
return false if !super
|
120
|
+
true
|
121
|
+
end
|
122
|
+
|
123
|
+
# Checks equality by comparing each attribute.
|
124
|
+
# @param [Object] Object to be compared
|
125
|
+
def ==(o)
|
126
|
+
return true if self.equal?(o)
|
127
|
+
self.class == o.class &&
|
128
|
+
self_uri == o.self_uri &&
|
129
|
+
alternate_links == o.alternate_links &&
|
130
|
+
is_date_time_visible == o.is_date_time_visible &&
|
131
|
+
date_time_text == o.date_time_text &&
|
132
|
+
is_footer_visible == o.is_footer_visible &&
|
133
|
+
footer_text == o.footer_text &&
|
134
|
+
is_header_visible == o.is_header_visible &&
|
135
|
+
header_text == o.header_text &&
|
136
|
+
is_slide_number_visible == o.is_slide_number_visible
|
137
|
+
end
|
138
|
+
|
139
|
+
# @see the `==` method
|
140
|
+
# @param [Object] Object to be compared
|
141
|
+
def eql?(o)
|
142
|
+
self == o
|
143
|
+
end
|
144
|
+
|
145
|
+
# Calculates hash code according to all attributes.
|
146
|
+
# @return [Fixnum] Hash code
|
147
|
+
def hash
|
148
|
+
[self_uri, alternate_links, is_date_time_visible, date_time_text, is_footer_visible, footer_text, is_header_visible, header_text, is_slide_number_visible].hash
|
149
|
+
end
|
150
|
+
|
151
|
+
# Builds the object from hash
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
153
|
+
# @return [Object] Returns the model itself
|
154
|
+
def build_from_hash(attributes)
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
156
|
+
self.class.swagger_types.each_pair do |key, type|
|
157
|
+
mapKey = self.class.attribute_map[key]
|
158
|
+
if !mapKey.nil?
|
159
|
+
val = attributes[mapKey]
|
160
|
+
if val.nil?
|
161
|
+
mapKeyString = mapKey.to_s
|
162
|
+
mapKeyString[0] = mapKeyString[0].downcase
|
163
|
+
mapKey = mapKeyString.to_sym
|
164
|
+
val = attributes[mapKey]
|
165
|
+
end
|
166
|
+
if !val.nil?
|
167
|
+
if type =~ /\AArray<(.*)>/i
|
168
|
+
# check to ensure the input is an array given that the the attribute
|
169
|
+
# is documented as an array but the input is not
|
170
|
+
if val.is_a?(Array)
|
171
|
+
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
172
|
+
end
|
173
|
+
else
|
174
|
+
self.send("#{key}=", _deserialize(type, val))
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
self
|
181
|
+
end
|
182
|
+
|
183
|
+
# Deserializes the data based on type
|
184
|
+
# @param string type Data type
|
185
|
+
# @param string value Value to be deserialized
|
186
|
+
# @return [Object] Deserialized data
|
187
|
+
def _deserialize(type, value)
|
188
|
+
case type.to_sym
|
189
|
+
when :DateTime
|
190
|
+
DateTime.parse(value)
|
191
|
+
when :Date
|
192
|
+
Date.parse(value)
|
193
|
+
when :String
|
194
|
+
value.to_s
|
195
|
+
when :Integer
|
196
|
+
value.to_i
|
197
|
+
when :Float
|
198
|
+
value.to_f
|
199
|
+
when :BOOLEAN
|
200
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
201
|
+
true
|
202
|
+
else
|
203
|
+
false
|
204
|
+
end
|
205
|
+
when :Object
|
206
|
+
# generic object (usually a Hash), return directly
|
207
|
+
value
|
208
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
209
|
+
inner_type = Regexp.last_match[:inner_type]
|
210
|
+
value.map { |v| _deserialize(inner_type, v) }
|
211
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
212
|
+
k_type = Regexp.last_match[:k_type]
|
213
|
+
v_type = Regexp.last_match[:v_type]
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each do |k, v|
|
216
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
217
|
+
end
|
218
|
+
end
|
219
|
+
else # model
|
220
|
+
temp_model = AsposeSlidesCloud.const_get(type).new
|
221
|
+
temp_model.build_from_hash(value)
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
# Returns the string representation of the object
|
226
|
+
# @return [String] String presentation of the object
|
227
|
+
def to_s
|
228
|
+
to_hash.to_s
|
229
|
+
end
|
230
|
+
|
231
|
+
# to_body is an alias to to_hash (backward compatibility)
|
232
|
+
# @return [Hash] Returns the object in the form of hash
|
233
|
+
def to_body
|
234
|
+
to_hash
|
235
|
+
end
|
236
|
+
|
237
|
+
# Returns the object in the form of hash
|
238
|
+
# @return [Hash] Returns the object in the form of hash
|
239
|
+
def to_hash
|
240
|
+
hash = {}
|
241
|
+
self.class.attribute_map.each_pair do |attr, param|
|
242
|
+
value = self.send(attr)
|
243
|
+
next if value.nil?
|
244
|
+
hash[param] = _to_hash(value)
|
245
|
+
end
|
246
|
+
hash
|
247
|
+
end
|
248
|
+
|
249
|
+
# Outputs non-array value in the form of hash
|
250
|
+
# For object, use to_hash. Otherwise, just return the value
|
251
|
+
# @param [Object] value Any valid value
|
252
|
+
# @return [Hash] Returns the value in the form of hash
|
253
|
+
def _to_hash(value)
|
254
|
+
if value.is_a?(Array)
|
255
|
+
value.compact.map { |v| _to_hash(v) }
|
256
|
+
elsif value.is_a?(Hash)
|
257
|
+
{}.tap do |hash|
|
258
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
259
|
+
end
|
260
|
+
elsif value.respond_to? :to_hash
|
261
|
+
value.to_hash
|
262
|
+
else
|
263
|
+
value
|
264
|
+
end
|
265
|
+
end
|
266
|
+
end
|
267
|
+
end
|