aspose_slides_cloud 1.0.3 → 19.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/Gemfile +7 -0
  4. data/LICENSE +2 -3
  5. data/README.md +7 -39
  6. data/Rakefile +8 -0
  7. data/TestData/TemplateCV.pptx +0 -0
  8. data/TestData/TemplatingCVDataWithBase64.xml +23 -0
  9. data/TestData/placeholders.pptx +0 -0
  10. data/TestData/test-unprotected.ppt +0 -0
  11. data/TestData/test.ppt +0 -0
  12. data/aspose_slides_cloud.gemspec +42 -14
  13. data/lib/aspose_slides_cloud.rb +183 -78
  14. data/lib/aspose_slides_cloud/api/slides_api.rb +6906 -2256
  15. data/lib/aspose_slides_cloud/api/slides_api_requests.rb +3067 -0
  16. data/lib/aspose_slides_cloud/api_client.rb +273 -183
  17. data/lib/aspose_slides_cloud/api_error.rb +29 -5
  18. data/lib/aspose_slides_cloud/configuration.rb +93 -81
  19. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +261 -0
  20. data/lib/aspose_slides_cloud/models/add_master_slide.rb +276 -0
  21. data/lib/aspose_slides_cloud/models/add_shape.rb +256 -0
  22. data/lib/aspose_slides_cloud/models/add_slide.rb +286 -0
  23. data/lib/aspose_slides_cloud/models/api_info.rb +205 -0
  24. data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +257 -22
  25. data/lib/aspose_slides_cloud/models/audio_frame.rb +573 -0
  26. data/lib/aspose_slides_cloud/models/axes.rb +225 -0
  27. data/lib/aspose_slides_cloud/models/axis.rb +847 -0
  28. data/lib/aspose_slides_cloud/models/base64_input_file.rb +256 -0
  29. data/lib/aspose_slides_cloud/models/blur_effect.rb +215 -0
  30. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +230 -0
  31. data/lib/aspose_slides_cloud/models/bubble_series.rb +463 -0
  32. data/lib/aspose_slides_cloud/models/chart.rb +543 -0
  33. data/lib/aspose_slides_cloud/models/chart_title.rb +210 -0
  34. data/lib/aspose_slides_cloud/models/chart_wall.rb +279 -0
  35. data/lib/aspose_slides_cloud/models/color_scheme.rb +258 -84
  36. data/lib/aspose_slides_cloud/models/connector.rb +487 -0
  37. data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +171 -13
  38. data/lib/aspose_slides_cloud/models/disc_usage.rb +215 -0
  39. data/lib/aspose_slides_cloud/models/document.rb +222 -46
  40. data/lib/aspose_slides_cloud/models/document_properties.rb +188 -36
  41. data/lib/aspose_slides_cloud/models/document_property.rb +209 -48
  42. data/lib/aspose_slides_cloud/models/document_replace_result.rb +272 -0
  43. data/lib/aspose_slides_cloud/models/effect.rb +412 -0
  44. data/lib/aspose_slides_cloud/models/effect_format.rb +265 -0
  45. data/lib/aspose_slides_cloud/models/error.rb +225 -0
  46. data/lib/aspose_slides_cloud/models/error_details.rb +210 -0
  47. data/lib/aspose_slides_cloud/models/export_format.rb +59 -0
  48. data/lib/aspose_slides_cloud/models/export_options.rb +194 -0
  49. data/lib/aspose_slides_cloud/models/file_version.rb +270 -0
  50. data/lib/aspose_slides_cloud/models/file_versions.rb +197 -0
  51. data/lib/aspose_slides_cloud/models/files_list.rb +197 -0
  52. data/lib/aspose_slides_cloud/models/files_upload_result.rb +209 -0
  53. data/lib/aspose_slides_cloud/models/fill_format.rb +204 -13
  54. data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +234 -0
  55. data/lib/aspose_slides_cloud/models/font_scheme.rb +204 -48
  56. data/lib/aspose_slides_cloud/models/font_set.rb +184 -22
  57. data/lib/aspose_slides_cloud/models/format_scheme.rb +210 -52
  58. data/lib/aspose_slides_cloud/models/geometry_shape.rb +439 -0
  59. data/lib/aspose_slides_cloud/models/glow_effect.rb +210 -0
  60. data/lib/aspose_slides_cloud/models/gradient_fill.rb +359 -0
  61. data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +210 -0
  62. data/lib/aspose_slides_cloud/models/graphical_object.rb +422 -0
  63. data/lib/aspose_slides_cloud/models/group_shape.rb +422 -0
  64. data/lib/aspose_slides_cloud/models/html_export_options.rb +392 -25
  65. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +195 -0
  66. data/lib/aspose_slides_cloud/models/image.rb +216 -42
  67. data/lib/aspose_slides_cloud/models/image_export_format.rb +43 -0
  68. data/lib/aspose_slides_cloud/models/image_export_options.rb +298 -0
  69. data/lib/aspose_slides_cloud/models/images.rb +188 -36
  70. data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +240 -0
  71. data/lib/aspose_slides_cloud/models/input.rb +215 -0
  72. data/lib/aspose_slides_cloud/models/input_file.rb +238 -0
  73. data/lib/aspose_slides_cloud/models/interactive_sequence.rb +212 -0
  74. data/lib/aspose_slides_cloud/models/layout_slide.rb +288 -0
  75. data/lib/aspose_slides_cloud/models/layout_slides.rb +219 -0
  76. data/lib/aspose_slides_cloud/models/legend.rb +339 -0
  77. data/lib/aspose_slides_cloud/models/line_format.rb +349 -54
  78. data/lib/aspose_slides_cloud/models/master_slide.rb +241 -0
  79. data/lib/aspose_slides_cloud/models/master_slides.rb +219 -0
  80. data/lib/aspose_slides_cloud/models/merge.rb +248 -0
  81. data/lib/aspose_slides_cloud/models/merging_source.rb +207 -0
  82. data/lib/aspose_slides_cloud/models/no_fill.rb +236 -0
  83. data/lib/aspose_slides_cloud/models/notes_slide.rb +227 -0
  84. data/lib/aspose_slides_cloud/models/notes_slide_export_format.rb +43 -0
  85. data/lib/aspose_slides_cloud/models/object_exist.rb +215 -0
  86. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +447 -0
  87. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +200 -0
  88. data/lib/aspose_slides_cloud/models/one_value_series.rb +463 -0
  89. data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +171 -13
  90. data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +240 -0
  91. data/lib/aspose_slides_cloud/models/output_file.rb +228 -0
  92. data/lib/aspose_slides_cloud/models/paragraph.rb +494 -34
  93. data/lib/aspose_slides_cloud/models/paragraphs.rb +187 -35
  94. data/lib/aspose_slides_cloud/models/path_input_file.rb +266 -0
  95. data/lib/aspose_slides_cloud/models/path_output_file.rb +256 -0
  96. data/lib/aspose_slides_cloud/models/pattern_fill.rb +283 -0
  97. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +467 -49
  98. data/lib/aspose_slides_cloud/models/picture_fill.rb +368 -0
  99. data/lib/aspose_slides_cloud/models/picture_frame.rb +459 -0
  100. data/lib/aspose_slides_cloud/models/pipeline.rb +207 -0
  101. data/lib/aspose_slides_cloud/models/placeholder.rb +294 -56
  102. data/lib/aspose_slides_cloud/models/placeholders.rb +188 -36
  103. data/lib/aspose_slides_cloud/models/plot_area.rb +324 -0
  104. data/lib/aspose_slides_cloud/models/portion.rb +564 -46
  105. data/lib/aspose_slides_cloud/models/portions.rb +219 -0
  106. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +246 -0
  107. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +188 -18
  108. data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +185 -15
  109. data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +274 -0
  110. data/lib/aspose_slides_cloud/models/reflection_effect.rb +429 -0
  111. data/lib/aspose_slides_cloud/models/remove_shape.rb +246 -0
  112. data/lib/aspose_slides_cloud/models/remove_slide.rb +251 -0
  113. data/lib/aspose_slides_cloud/models/reorder_slide.rb +266 -0
  114. data/lib/aspose_slides_cloud/models/replace_text.rb +286 -0
  115. data/lib/aspose_slides_cloud/models/request_input_file.rb +261 -0
  116. data/lib/aspose_slides_cloud/models/reset_slide.rb +251 -0
  117. data/lib/aspose_slides_cloud/models/resource_base.rb +207 -0
  118. data/lib/aspose_slides_cloud/models/resource_uri.rb +190 -26
  119. data/lib/aspose_slides_cloud/models/resource_uri_element.rb +171 -13
  120. data/lib/aspose_slides_cloud/models/response_output_file.rb +236 -0
  121. data/lib/aspose_slides_cloud/models/save.rb +283 -0
  122. data/lib/aspose_slides_cloud/models/save_shape.rb +293 -0
  123. data/lib/aspose_slides_cloud/models/save_slide.rb +318 -0
  124. data/lib/aspose_slides_cloud/models/scale_type.rb +41 -0
  125. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +215 -0
  126. data/lib/aspose_slides_cloud/models/scatter_series.rb +463 -0
  127. data/lib/aspose_slides_cloud/models/series.rb +424 -0
  128. data/lib/aspose_slides_cloud/models/series_marker.rb +279 -0
  129. data/lib/aspose_slides_cloud/models/shape.rb +398 -100
  130. data/lib/aspose_slides_cloud/models/shape_base.rb +406 -0
  131. data/lib/aspose_slides_cloud/models/shape_export_format.rb +44 -0
  132. data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +274 -0
  133. data/lib/aspose_slides_cloud/models/shape_thumbnail_bounds.rb +41 -0
  134. data/lib/aspose_slides_cloud/models/shapes.rb +219 -0
  135. data/lib/aspose_slides_cloud/models/size_type.rb +55 -0
  136. data/lib/aspose_slides_cloud/models/slide.rb +277 -66
  137. data/lib/aspose_slides_cloud/models/slide_animation.rb +231 -0
  138. data/lib/aspose_slides_cloud/models/slide_background.rb +245 -42
  139. data/lib/aspose_slides_cloud/models/slide_comment.rb +198 -24
  140. data/lib/aspose_slides_cloud/models/slide_comments.rb +188 -36
  141. data/lib/aspose_slides_cloud/models/slide_export_format.rb +58 -0
  142. data/lib/aspose_slides_cloud/models/slide_replace_result.rb +347 -0
  143. data/lib/aspose_slides_cloud/models/slides.rb +188 -36
  144. data/lib/aspose_slides_cloud/models/smart_art.rb +530 -0
  145. data/lib/aspose_slides_cloud/models/smart_art_node.rb +281 -0
  146. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +422 -0
  147. data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +200 -0
  148. data/lib/aspose_slides_cloud/models/solid_fill.rb +246 -0
  149. data/lib/aspose_slides_cloud/models/split_document_result.rb +188 -36
  150. data/lib/aspose_slides_cloud/models/storage_exist.rb +200 -0
  151. data/lib/aspose_slides_cloud/models/storage_file.rb +245 -0
  152. data/lib/aspose_slides_cloud/models/svg_export_options.rb +378 -0
  153. data/lib/aspose_slides_cloud/models/swf_export_options.rb +528 -0
  154. data/lib/aspose_slides_cloud/models/table.rb +578 -0
  155. data/lib/aspose_slides_cloud/models/table_cell.rb +431 -0
  156. data/lib/aspose_slides_cloud/models/table_column.rb +200 -0
  157. data/lib/aspose_slides_cloud/models/table_row.rb +227 -0
  158. data/lib/aspose_slides_cloud/models/task.rb +228 -0
  159. data/lib/aspose_slides_cloud/models/text_item.rb +178 -18
  160. data/lib/aspose_slides_cloud/models/text_items.rb +188 -36
  161. data/lib/aspose_slides_cloud/models/theme.rb +210 -52
  162. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +385 -40
  163. data/lib/aspose_slides_cloud/models/update_background.rb +258 -0
  164. data/lib/aspose_slides_cloud/models/update_shape.rb +256 -0
  165. data/lib/aspose_slides_cloud/models/video_frame.rb +543 -0
  166. data/lib/aspose_slides_cloud/models/xps_export_options.rb +242 -0
  167. data/lib/aspose_slides_cloud/version.rb +23 -1
  168. data/spec/api/slides_api_spec.rb +24188 -0
  169. data/spec/extra/extra_spec.rb +84 -0
  170. data/spec/spec_helper.rb +122 -0
  171. data/spec/spec_utils.rb +154 -0
  172. data/testConfig.json +7 -0
  173. data/testRules.json +333 -0
  174. metadata +273 -61
  175. data/lib/aspose_slides_cloud/models/base_object.rb +0 -86
  176. data/lib/aspose_slides_cloud/models/base_response.rb +0 -53
  177. data/lib/aspose_slides_cloud/models/color.rb +0 -29
  178. data/lib/aspose_slides_cloud/models/color_scheme_response.rb +0 -61
  179. data/lib/aspose_slides_cloud/models/common_response.rb +0 -53
  180. data/lib/aspose_slides_cloud/models/document_properties_response.rb +0 -61
  181. data/lib/aspose_slides_cloud/models/document_property_response.rb +0 -61
  182. data/lib/aspose_slides_cloud/models/document_response.rb +0 -61
  183. data/lib/aspose_slides_cloud/models/font_scheme_response.rb +0 -61
  184. data/lib/aspose_slides_cloud/models/format_scheme_response.rb +0 -61
  185. data/lib/aspose_slides_cloud/models/images_response.rb +0 -61
  186. data/lib/aspose_slides_cloud/models/new_shape_response.rb +0 -61
  187. data/lib/aspose_slides_cloud/models/paragraph_portion_response.rb +0 -61
  188. data/lib/aspose_slides_cloud/models/placeholder_response.rb +0 -61
  189. data/lib/aspose_slides_cloud/models/placeholders_response.rb +0 -61
  190. data/lib/aspose_slides_cloud/models/presentation_string_replace_response.rb +0 -69
  191. data/lib/aspose_slides_cloud/models/shape_list.rb +0 -67
  192. data/lib/aspose_slides_cloud/models/shape_paragraph_response.rb +0 -61
  193. data/lib/aspose_slides_cloud/models/shape_paragraphs_response.rb +0 -61
  194. data/lib/aspose_slides_cloud/models/shape_response.rb +0 -61
  195. data/lib/aspose_slides_cloud/models/slide_background_response.rb +0 -61
  196. data/lib/aspose_slides_cloud/models/slide_comments_response.rb +0 -61
  197. data/lib/aspose_slides_cloud/models/slide_list_response.rb +0 -61
  198. data/lib/aspose_slides_cloud/models/slide_response.rb +0 -61
  199. data/lib/aspose_slides_cloud/models/slide_string_replace_response.rb +0 -69
  200. data/lib/aspose_slides_cloud/models/split_document_response.rb +0 -61
  201. data/lib/aspose_slides_cloud/models/text_items_response.rb +0 -61
  202. data/lib/aspose_slides_cloud/models/theme_response.rb +0 -61
  203. data/test/slides_tests.rb +0 -580
@@ -0,0 +1,431 @@
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 one cell of table.
27
+ class TableCell
28
+ # Cell text.
29
+ attr_accessor :text
30
+
31
+ # The number of rows spanned by a merged cell.
32
+ attr_accessor :row_span
33
+
34
+ # The number of columns spanned by a merged cell.
35
+ attr_accessor :col_span
36
+
37
+ # The top margin of the cell.
38
+ attr_accessor :margin_top
39
+
40
+ # The right margin of the cell.
41
+ attr_accessor :margin_right
42
+
43
+ # The left margin of the cell.
44
+ attr_accessor :margin_left
45
+
46
+ # The bottom margin of the cell.
47
+ attr_accessor :margin_bottom
48
+
49
+ # Text anchor type.
50
+ attr_accessor :text_anchor_type
51
+
52
+ # The type of vertical text.
53
+ attr_accessor :text_vertical_type
54
+
55
+ # Fill properties set of the cell.
56
+ attr_accessor :fill_format
57
+
58
+ # Line properties set for the top border of the cell.
59
+ attr_accessor :border_top
60
+
61
+ # Line properties set for the right border of the cell.
62
+ attr_accessor :border_right
63
+
64
+ # Line properties set for the left border of the cell.
65
+ attr_accessor :border_left
66
+
67
+ # Line properties set for the bottom border of the cell.
68
+ attr_accessor :border_bottom
69
+
70
+ # Line properties set for the diagonal up border of the cell.
71
+ attr_accessor :border_diagonal_up
72
+
73
+ # Line properties set for the diagonal down border of the cell.
74
+ attr_accessor :border_diagonal_down
75
+
76
+ class EnumAttributeValidator
77
+ attr_reader :datatype
78
+ attr_reader :allowable_values
79
+
80
+ def initialize(datatype, allowable_values)
81
+ @allowable_values = allowable_values.map do |value|
82
+ case datatype.to_s
83
+ when /Integer/i
84
+ value.to_i
85
+ when /Float/i
86
+ value.to_f
87
+ else
88
+ value
89
+ end
90
+ end
91
+ end
92
+
93
+ def valid?(value)
94
+ !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
95
+ end
96
+ end
97
+
98
+ # Attribute mapping from ruby-style variable name to JSON key.
99
+ def self.attribute_map
100
+ {
101
+ :'text' => :'Text',
102
+ :'row_span' => :'RowSpan',
103
+ :'col_span' => :'ColSpan',
104
+ :'margin_top' => :'MarginTop',
105
+ :'margin_right' => :'MarginRight',
106
+ :'margin_left' => :'MarginLeft',
107
+ :'margin_bottom' => :'MarginBottom',
108
+ :'text_anchor_type' => :'TextAnchorType',
109
+ :'text_vertical_type' => :'TextVerticalType',
110
+ :'fill_format' => :'FillFormat',
111
+ :'border_top' => :'BorderTop',
112
+ :'border_right' => :'BorderRight',
113
+ :'border_left' => :'BorderLeft',
114
+ :'border_bottom' => :'BorderBottom',
115
+ :'border_diagonal_up' => :'BorderDiagonalUp',
116
+ :'border_diagonal_down' => :'BorderDiagonalDown'
117
+ }
118
+ end
119
+
120
+ # Attribute type mapping.
121
+ def self.swagger_types
122
+ {
123
+ :'text' => :'String',
124
+ :'row_span' => :'Integer',
125
+ :'col_span' => :'Integer',
126
+ :'margin_top' => :'Float',
127
+ :'margin_right' => :'Float',
128
+ :'margin_left' => :'Float',
129
+ :'margin_bottom' => :'Float',
130
+ :'text_anchor_type' => :'String',
131
+ :'text_vertical_type' => :'String',
132
+ :'fill_format' => :'FillFormat',
133
+ :'border_top' => :'LineFormat',
134
+ :'border_right' => :'LineFormat',
135
+ :'border_left' => :'LineFormat',
136
+ :'border_bottom' => :'LineFormat',
137
+ :'border_diagonal_up' => :'LineFormat',
138
+ :'border_diagonal_down' => :'LineFormat'
139
+ }
140
+ end
141
+
142
+ # Initializes the object
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ def initialize(attributes = {})
145
+ return unless attributes.is_a?(Hash)
146
+
147
+ # convert string to symbol for hash key
148
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
149
+
150
+ if attributes.has_key?(:'Text')
151
+ self.text = attributes[:'Text']
152
+ end
153
+
154
+ if attributes.has_key?(:'RowSpan')
155
+ self.row_span = attributes[:'RowSpan']
156
+ end
157
+
158
+ if attributes.has_key?(:'ColSpan')
159
+ self.col_span = attributes[:'ColSpan']
160
+ end
161
+
162
+ if attributes.has_key?(:'MarginTop')
163
+ self.margin_top = attributes[:'MarginTop']
164
+ end
165
+
166
+ if attributes.has_key?(:'MarginRight')
167
+ self.margin_right = attributes[:'MarginRight']
168
+ end
169
+
170
+ if attributes.has_key?(:'MarginLeft')
171
+ self.margin_left = attributes[:'MarginLeft']
172
+ end
173
+
174
+ if attributes.has_key?(:'MarginBottom')
175
+ self.margin_bottom = attributes[:'MarginBottom']
176
+ end
177
+
178
+ if attributes.has_key?(:'TextAnchorType')
179
+ self.text_anchor_type = attributes[:'TextAnchorType']
180
+ end
181
+
182
+ if attributes.has_key?(:'TextVerticalType')
183
+ self.text_vertical_type = attributes[:'TextVerticalType']
184
+ end
185
+
186
+ if attributes.has_key?(:'FillFormat')
187
+ self.fill_format = attributes[:'FillFormat']
188
+ end
189
+
190
+ if attributes.has_key?(:'BorderTop')
191
+ self.border_top = attributes[:'BorderTop']
192
+ end
193
+
194
+ if attributes.has_key?(:'BorderRight')
195
+ self.border_right = attributes[:'BorderRight']
196
+ end
197
+
198
+ if attributes.has_key?(:'BorderLeft')
199
+ self.border_left = attributes[:'BorderLeft']
200
+ end
201
+
202
+ if attributes.has_key?(:'BorderBottom')
203
+ self.border_bottom = attributes[:'BorderBottom']
204
+ end
205
+
206
+ if attributes.has_key?(:'BorderDiagonalUp')
207
+ self.border_diagonal_up = attributes[:'BorderDiagonalUp']
208
+ end
209
+
210
+ if attributes.has_key?(:'BorderDiagonalDown')
211
+ self.border_diagonal_down = attributes[:'BorderDiagonalDown']
212
+ end
213
+ end
214
+
215
+ # Show invalid properties with the reasons. Usually used together with valid?
216
+ # @return Array for valid properties with the reasons
217
+ def list_invalid_properties
218
+ invalid_properties = Array.new
219
+ if @row_span.nil?
220
+ invalid_properties.push('invalid value for "row_span", row_span cannot be nil.')
221
+ end
222
+
223
+ if @col_span.nil?
224
+ invalid_properties.push('invalid value for "col_span", col_span cannot be nil.')
225
+ end
226
+
227
+ if @margin_top.nil?
228
+ invalid_properties.push('invalid value for "margin_top", margin_top cannot be nil.')
229
+ end
230
+
231
+ if @margin_right.nil?
232
+ invalid_properties.push('invalid value for "margin_right", margin_right cannot be nil.')
233
+ end
234
+
235
+ if @margin_left.nil?
236
+ invalid_properties.push('invalid value for "margin_left", margin_left cannot be nil.')
237
+ end
238
+
239
+ if @margin_bottom.nil?
240
+ invalid_properties.push('invalid value for "margin_bottom", margin_bottom cannot be nil.')
241
+ end
242
+
243
+ if @text_anchor_type.nil?
244
+ invalid_properties.push('invalid value for "text_anchor_type", text_anchor_type cannot be nil.')
245
+ end
246
+
247
+ if @text_vertical_type.nil?
248
+ invalid_properties.push('invalid value for "text_vertical_type", text_vertical_type cannot be nil.')
249
+ end
250
+
251
+ invalid_properties
252
+ end
253
+
254
+ # Check to see if the all the properties in the model are valid
255
+ # @return true if the model is valid
256
+ def valid?
257
+ return false if @row_span.nil?
258
+ return false if @col_span.nil?
259
+ return false if @margin_top.nil?
260
+ return false if @margin_right.nil?
261
+ return false if @margin_left.nil?
262
+ return false if @margin_bottom.nil?
263
+ return false if @text_anchor_type.nil?
264
+ text_anchor_type_validator = EnumAttributeValidator.new('String', ['Top', 'Center', 'Bottom', 'Justified', 'Distributed', 'NotDefined'])
265
+ return false unless text_anchor_type_validator.valid?(@text_anchor_type)
266
+ return false if @text_vertical_type.nil?
267
+ text_vertical_type_validator = EnumAttributeValidator.new('String', ['Horizontal', 'Vertical', 'Vertical270', 'WordArtVertical', 'EastAsianVertical', 'MongolianVertical', 'WordArtVerticalRightToLeft', 'NotDefined'])
268
+ return false unless text_vertical_type_validator.valid?(@text_vertical_type)
269
+ true
270
+ end
271
+
272
+ # Custom attribute writer method checking allowed values (enum).
273
+ # @param [Object] text_anchor_type Object to be assigned
274
+ def text_anchor_type=(text_anchor_type)
275
+ validator = EnumAttributeValidator.new('String', ['Top', 'Center', 'Bottom', 'Justified', 'Distributed', 'NotDefined'])
276
+ unless validator.valid?(text_anchor_type)
277
+ fail ArgumentError, 'invalid value for "text_anchor_type", must be one of #{validator.allowable_values}.'
278
+ end
279
+ @text_anchor_type = text_anchor_type
280
+ end
281
+
282
+ # Custom attribute writer method checking allowed values (enum).
283
+ # @param [Object] text_vertical_type Object to be assigned
284
+ def text_vertical_type=(text_vertical_type)
285
+ validator = EnumAttributeValidator.new('String', ['Horizontal', 'Vertical', 'Vertical270', 'WordArtVertical', 'EastAsianVertical', 'MongolianVertical', 'WordArtVerticalRightToLeft', 'NotDefined'])
286
+ unless validator.valid?(text_vertical_type)
287
+ fail ArgumentError, 'invalid value for "text_vertical_type", must be one of #{validator.allowable_values}.'
288
+ end
289
+ @text_vertical_type = text_vertical_type
290
+ end
291
+
292
+ # Checks equality by comparing each attribute.
293
+ # @param [Object] Object to be compared
294
+ def ==(o)
295
+ return true if self.equal?(o)
296
+ self.class == o.class &&
297
+ text == o.text &&
298
+ row_span == o.row_span &&
299
+ col_span == o.col_span &&
300
+ margin_top == o.margin_top &&
301
+ margin_right == o.margin_right &&
302
+ margin_left == o.margin_left &&
303
+ margin_bottom == o.margin_bottom &&
304
+ text_anchor_type == o.text_anchor_type &&
305
+ text_vertical_type == o.text_vertical_type &&
306
+ fill_format == o.fill_format &&
307
+ border_top == o.border_top &&
308
+ border_right == o.border_right &&
309
+ border_left == o.border_left &&
310
+ border_bottom == o.border_bottom &&
311
+ border_diagonal_up == o.border_diagonal_up &&
312
+ border_diagonal_down == o.border_diagonal_down
313
+ end
314
+
315
+ # @see the `==` method
316
+ # @param [Object] Object to be compared
317
+ def eql?(o)
318
+ self == o
319
+ end
320
+
321
+ # Calculates hash code according to all attributes.
322
+ # @return [Fixnum] Hash code
323
+ def hash
324
+ [text, row_span, col_span, margin_top, margin_right, margin_left, margin_bottom, text_anchor_type, text_vertical_type, fill_format, border_top, border_right, border_left, border_bottom, border_diagonal_up, border_diagonal_down].hash
325
+ end
326
+
327
+ # Builds the object from hash
328
+ # @param [Hash] attributes Model attributes in the form of hash
329
+ # @return [Object] Returns the model itself
330
+ def build_from_hash(attributes)
331
+ return nil unless attributes.is_a?(Hash)
332
+ self.class.swagger_types.each_pair do |key, type|
333
+ if type =~ /\AArray<(.*)>/i
334
+ # check to ensure the input is an array given that the the attribute
335
+ # is documented as an array but the input is not
336
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
337
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
338
+ end
339
+ elsif !attributes[self.class.attribute_map[key]].nil?
340
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
341
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
342
+ end
343
+
344
+ self
345
+ end
346
+
347
+ # Deserializes the data based on type
348
+ # @param string type Data type
349
+ # @param string value Value to be deserialized
350
+ # @return [Object] Deserialized data
351
+ def _deserialize(type, value)
352
+ case type.to_sym
353
+ when :DateTime
354
+ DateTime.parse(value)
355
+ when :Date
356
+ Date.parse(value)
357
+ when :String
358
+ value.to_s
359
+ when :Integer
360
+ value.to_i
361
+ when :Float
362
+ value.to_f
363
+ when :BOOLEAN
364
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
365
+ true
366
+ else
367
+ false
368
+ end
369
+ when :Object
370
+ # generic object (usually a Hash), return directly
371
+ value
372
+ when /\AArray<(?<inner_type>.+)>\z/
373
+ inner_type = Regexp.last_match[:inner_type]
374
+ value.map { |v| _deserialize(inner_type, v) }
375
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
376
+ k_type = Regexp.last_match[:k_type]
377
+ v_type = Regexp.last_match[:v_type]
378
+ {}.tap do |hash|
379
+ value.each do |k, v|
380
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
381
+ end
382
+ end
383
+ else # model
384
+ temp_model = AsposeSlidesCloud.const_get(type).new
385
+ temp_model.build_from_hash(value)
386
+ end
387
+ end
388
+
389
+ # Returns the string representation of the object
390
+ # @return [String] String presentation of the object
391
+ def to_s
392
+ to_hash.to_s
393
+ end
394
+
395
+ # to_body is an alias to to_hash (backward compatibility)
396
+ # @return [Hash] Returns the object in the form of hash
397
+ def to_body
398
+ to_hash
399
+ end
400
+
401
+ # Returns the object in the form of hash
402
+ # @return [Hash] Returns the object in the form of hash
403
+ def to_hash
404
+ hash = {}
405
+ self.class.attribute_map.each_pair do |attr, param|
406
+ value = self.send(attr)
407
+ next if value.nil?
408
+ hash[param] = _to_hash(value)
409
+ end
410
+ hash
411
+ end
412
+
413
+ # Outputs non-array value in the form of hash
414
+ # For object, use to_hash. Otherwise, just return the value
415
+ # @param [Object] value Any valid value
416
+ # @return [Hash] Returns the value in the form of hash
417
+ def _to_hash(value)
418
+ if value.is_a?(Array)
419
+ value.compact.map { |v| _to_hash(v) }
420
+ elsif value.is_a?(Hash)
421
+ {}.tap do |hash|
422
+ value.each { |k, v| hash[k] = _to_hash(v) }
423
+ end
424
+ elsif value.respond_to? :to_hash
425
+ value.to_hash
426
+ else
427
+ value
428
+ end
429
+ end
430
+ end
431
+ end
@@ -0,0 +1,200 @@
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
+ # Table column.
27
+ class TableColumn
28
+ # Width.
29
+ attr_accessor :width
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'width' => :'Width'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'width' => :'Float'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ return unless attributes.is_a?(Hash)
49
+
50
+ # convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
+
53
+ if attributes.has_key?(:'Width')
54
+ self.width = attributes[:'Width']
55
+ end
56
+ end
57
+
58
+ # Show invalid properties with the reasons. Usually used together with valid?
59
+ # @return Array for valid properties with the reasons
60
+ def list_invalid_properties
61
+ invalid_properties = Array.new
62
+ if @width.nil?
63
+ invalid_properties.push('invalid value for "width", width cannot be nil.')
64
+ end
65
+
66
+ invalid_properties
67
+ end
68
+
69
+ # Check to see if the all the properties in the model are valid
70
+ # @return true if the model is valid
71
+ def valid?
72
+ return false if @width.nil?
73
+ true
74
+ end
75
+
76
+ # Checks equality by comparing each attribute.
77
+ # @param [Object] Object to be compared
78
+ def ==(o)
79
+ return true if self.equal?(o)
80
+ self.class == o.class &&
81
+ width == o.width
82
+ end
83
+
84
+ # @see the `==` method
85
+ # @param [Object] Object to be compared
86
+ def eql?(o)
87
+ self == o
88
+ end
89
+
90
+ # Calculates hash code according to all attributes.
91
+ # @return [Fixnum] Hash code
92
+ def hash
93
+ [width].hash
94
+ end
95
+
96
+ # Builds the object from hash
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ # @return [Object] Returns the model itself
99
+ def build_from_hash(attributes)
100
+ return nil unless attributes.is_a?(Hash)
101
+ self.class.swagger_types.each_pair do |key, type|
102
+ if type =~ /\AArray<(.*)>/i
103
+ # check to ensure the input is an array given that the the attribute
104
+ # is documented as an array but the input is not
105
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
106
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
107
+ end
108
+ elsif !attributes[self.class.attribute_map[key]].nil?
109
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
110
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
111
+ end
112
+
113
+ self
114
+ end
115
+
116
+ # Deserializes the data based on type
117
+ # @param string type Data type
118
+ # @param string value Value to be deserialized
119
+ # @return [Object] Deserialized data
120
+ def _deserialize(type, value)
121
+ case type.to_sym
122
+ when :DateTime
123
+ DateTime.parse(value)
124
+ when :Date
125
+ Date.parse(value)
126
+ when :String
127
+ value.to_s
128
+ when :Integer
129
+ value.to_i
130
+ when :Float
131
+ value.to_f
132
+ when :BOOLEAN
133
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
134
+ true
135
+ else
136
+ false
137
+ end
138
+ when :Object
139
+ # generic object (usually a Hash), return directly
140
+ value
141
+ when /\AArray<(?<inner_type>.+)>\z/
142
+ inner_type = Regexp.last_match[:inner_type]
143
+ value.map { |v| _deserialize(inner_type, v) }
144
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
145
+ k_type = Regexp.last_match[:k_type]
146
+ v_type = Regexp.last_match[:v_type]
147
+ {}.tap do |hash|
148
+ value.each do |k, v|
149
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
150
+ end
151
+ end
152
+ else # model
153
+ temp_model = AsposeSlidesCloud.const_get(type).new
154
+ temp_model.build_from_hash(value)
155
+ end
156
+ end
157
+
158
+ # Returns the string representation of the object
159
+ # @return [String] String presentation of the object
160
+ def to_s
161
+ to_hash.to_s
162
+ end
163
+
164
+ # to_body is an alias to to_hash (backward compatibility)
165
+ # @return [Hash] Returns the object in the form of hash
166
+ def to_body
167
+ to_hash
168
+ end
169
+
170
+ # Returns the object in the form of hash
171
+ # @return [Hash] Returns the object in the form of hash
172
+ def to_hash
173
+ hash = {}
174
+ self.class.attribute_map.each_pair do |attr, param|
175
+ value = self.send(attr)
176
+ next if value.nil?
177
+ hash[param] = _to_hash(value)
178
+ end
179
+ hash
180
+ end
181
+
182
+ # Outputs non-array value in the form of hash
183
+ # For object, use to_hash. Otherwise, just return the value
184
+ # @param [Object] value Any valid value
185
+ # @return [Hash] Returns the value in the form of hash
186
+ def _to_hash(value)
187
+ if value.is_a?(Array)
188
+ value.compact.map { |v| _to_hash(v) }
189
+ elsif value.is_a?(Hash)
190
+ {}.tap do |hash|
191
+ value.each { |k, v| hash[k] = _to_hash(v) }
192
+ end
193
+ elsif value.respond_to? :to_hash
194
+ value.to_hash
195
+ else
196
+ value
197
+ end
198
+ end
199
+ end
200
+ end