aspose_slides_cloud 20.4.0 → 20.10.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 +61 -61
- data/TestData/ChartTest.pptx +0 -0
- data/TestData/Sections.pptx +0 -0
- data/TestData/TemplatingCVDataWithBase64.xml +22 -22
- data/lib/aspose_slides_cloud.rb +212 -205
- data/lib/aspose_slides_cloud/api/slides_api.rb +10979 -7974
- data/lib/aspose_slides_cloud/api/slides_api_requests.rb +4146 -3099
- data/lib/aspose_slides_cloud/api_client.rb +432 -429
- data/lib/aspose_slides_cloud/models/add_layout_slide.rb +244 -261
- data/lib/aspose_slides_cloud/models/add_master_slide.rb +259 -276
- data/lib/aspose_slides_cloud/models/add_shape.rb +239 -256
- data/lib/aspose_slides_cloud/models/add_slide.rb +269 -286
- data/lib/aspose_slides_cloud/models/api_info.rb +217 -205
- data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +285 -273
- data/lib/aspose_slides_cloud/models/audio_frame.rb +359 -573
- data/lib/aspose_slides_cloud/models/axes.rb +237 -225
- data/lib/aspose_slides_cloud/models/axis.rb +699 -687
- data/lib/aspose_slides_cloud/models/base64_input_file.rb +230 -256
- data/lib/aspose_slides_cloud/models/blur_effect.rb +227 -215
- data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +299 -0
- data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +212 -230
- data/lib/aspose_slides_cloud/models/bubble_series.rb +248 -428
- data/lib/aspose_slides_cloud/models/chart.rb +365 -553
- data/lib/aspose_slides_cloud/models/chart_category.rb +271 -0
- data/lib/aspose_slides_cloud/models/chart_title.rb +222 -210
- data/lib/aspose_slides_cloud/models/chart_wall.rb +281 -269
- data/lib/aspose_slides_cloud/models/color_scheme.rb +317 -327
- data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +217 -0
- data/lib/aspose_slides_cloud/models/connector.rb +275 -487
- data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +209 -197
- data/lib/aspose_slides_cloud/models/{resource_uri_element.rb → data_point.rb} +197 -195
- data/lib/aspose_slides_cloud/models/disc_usage.rb +227 -215
- data/lib/aspose_slides_cloud/models/document.rb +257 -267
- data/lib/aspose_slides_cloud/models/document_properties.rb +209 -219
- data/lib/aspose_slides_cloud/models/document_property.rb +232 -242
- data/lib/aspose_slides_cloud/models/document_replace_result.rb +218 -282
- data/lib/aspose_slides_cloud/models/effect.rb +424 -412
- data/lib/aspose_slides_cloud/models/effect_format.rb +277 -265
- data/lib/aspose_slides_cloud/models/entity_exists.rb +212 -0
- data/lib/aspose_slides_cloud/models/error.rb +237 -225
- data/lib/aspose_slides_cloud/models/error_details.rb +222 -210
- data/lib/aspose_slides_cloud/models/export_format.rb +60 -59
- data/lib/aspose_slides_cloud/models/export_options.rb +216 -194
- data/lib/aspose_slides_cloud/models/file_version.rb +225 -270
- data/lib/aspose_slides_cloud/models/file_versions.rb +209 -197
- data/lib/aspose_slides_cloud/models/files_list.rb +209 -197
- data/lib/aspose_slides_cloud/models/files_upload_result.rb +221 -209
- data/lib/aspose_slides_cloud/models/fill_format.rb +240 -228
- data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +246 -234
- data/lib/aspose_slides_cloud/models/font_scheme.rb +227 -237
- data/lib/aspose_slides_cloud/models/font_set.rb +227 -215
- data/lib/aspose_slides_cloud/models/format_scheme.rb +245 -255
- data/lib/aspose_slides_cloud/models/geometry_shape.rb +260 -439
- data/lib/aspose_slides_cloud/models/glow_effect.rb +222 -210
- data/lib/aspose_slides_cloud/models/gradient_fill.rb +342 -359
- data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +222 -210
- data/lib/aspose_slides_cloud/models/graphical_object.rb +234 -422
- data/lib/aspose_slides_cloud/models/group_shape.rb +234 -422
- data/lib/aspose_slides_cloud/models/header_footer.rb +247 -0
- data/lib/aspose_slides_cloud/models/html_export_options.rb +421 -420
- data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +197 -195
- data/lib/aspose_slides_cloud/models/image.rb +237 -247
- data/lib/aspose_slides_cloud/models/image_export_format.rb +43 -43
- data/lib/aspose_slides_cloud/models/image_export_options.rb +299 -298
- data/lib/aspose_slides_cloud/models/images.rb +209 -219
- data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +252 -240
- data/lib/aspose_slides_cloud/models/input.rb +227 -215
- data/lib/aspose_slides_cloud/models/input_file.rb +250 -238
- data/lib/aspose_slides_cloud/models/interactive_sequence.rb +224 -212
- data/lib/aspose_slides_cloud/models/layout_slide.rb +278 -288
- data/lib/aspose_slides_cloud/models/layout_slides.rb +209 -219
- data/lib/aspose_slides_cloud/models/legend.rb +321 -309
- data/lib/aspose_slides_cloud/models/line_format.rb +389 -377
- data/lib/aspose_slides_cloud/models/master_slide.rb +231 -241
- data/lib/aspose_slides_cloud/models/master_slides.rb +209 -219
- data/lib/aspose_slides_cloud/models/merge.rb +231 -248
- data/lib/aspose_slides_cloud/models/merging_source.rb +219 -207
- data/lib/aspose_slides_cloud/models/no_fill.rb +219 -236
- data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +217 -0
- data/lib/aspose_slides_cloud/models/notes_slide.rb +217 -227
- data/lib/aspose_slides_cloud/models/notes_slide_export_format.rb +43 -43
- data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +267 -0
- data/lib/aspose_slides_cloud/models/object_exist.rb +227 -215
- data/lib/aspose_slides_cloud/models/ole_object_frame.rb +259 -447
- data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +210 -200
- data/lib/aspose_slides_cloud/models/one_value_series.rb +248 -428
- data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +209 -197
- data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +252 -240
- data/lib/aspose_slides_cloud/models/output_file.rb +240 -228
- data/lib/aspose_slides_cloud/models/paragraph.rb +517 -527
- data/lib/aspose_slides_cloud/models/paragraphs.rb +209 -219
- data/lib/aspose_slides_cloud/models/path_input_file.rb +240 -266
- data/lib/aspose_slides_cloud/models/path_output_file.rb +239 -256
- data/lib/aspose_slides_cloud/models/pattern_fill.rb +266 -283
- data/lib/aspose_slides_cloud/models/pdf_export_options.rb +547 -519
- data/lib/aspose_slides_cloud/models/picture_fill.rb +351 -368
- data/lib/aspose_slides_cloud/models/picture_frame.rb +245 -459
- data/lib/aspose_slides_cloud/models/pipeline.rb +219 -207
- data/lib/aspose_slides_cloud/models/placeholder.rb +325 -335
- data/lib/aspose_slides_cloud/models/placeholders.rb +209 -219
- data/lib/aspose_slides_cloud/models/plot_area.rb +311 -299
- data/lib/aspose_slides_cloud/models/portion.rb +589 -599
- data/lib/aspose_slides_cloud/models/portions.rb +209 -219
- data/lib/aspose_slides_cloud/models/pptx_export_options.rb +247 -246
- data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +229 -217
- data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +221 -209
- data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +286 -274
- data/lib/aspose_slides_cloud/models/reflection_effect.rb +441 -429
- data/lib/aspose_slides_cloud/models/remove_shape.rb +229 -246
- data/lib/aspose_slides_cloud/models/remove_slide.rb +234 -251
- data/lib/aspose_slides_cloud/models/reorder_slide.rb +249 -266
- data/lib/aspose_slides_cloud/models/replace_text.rb +269 -286
- data/lib/aspose_slides_cloud/models/request_input_file.rb +235 -261
- data/lib/aspose_slides_cloud/models/reset_slide.rb +234 -251
- data/lib/aspose_slides_cloud/models/resource_base.rb +219 -207
- data/lib/aspose_slides_cloud/models/resource_uri.rb +237 -225
- data/lib/aspose_slides_cloud/models/response_output_file.rb +219 -236
- data/lib/aspose_slides_cloud/models/save.rb +266 -283
- data/lib/aspose_slides_cloud/models/save_shape.rb +276 -293
- data/lib/aspose_slides_cloud/models/save_slide.rb +301 -318
- data/lib/aspose_slides_cloud/models/scale_type.rb +41 -41
- data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +225 -215
- data/lib/aspose_slides_cloud/models/scatter_series.rb +248 -428
- 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 +422 -389
- data/lib/aspose_slides_cloud/models/series_marker.rb +281 -269
- data/lib/aspose_slides_cloud/models/shape.rb +255 -467
- data/lib/aspose_slides_cloud/models/shape_base.rb +375 -406
- data/lib/aspose_slides_cloud/models/shape_export_format.rb +44 -44
- data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +286 -274
- data/lib/aspose_slides_cloud/models/shape_thumbnail_bounds.rb +41 -41
- data/lib/aspose_slides_cloud/models/shapes.rb +209 -219
- data/lib/aspose_slides_cloud/models/size_type.rb +55 -55
- data/lib/aspose_slides_cloud/models/slide.rb +322 -332
- data/lib/aspose_slides_cloud/models/slide_animation.rb +221 -231
- data/lib/aspose_slides_cloud/models/slide_background.rb +266 -276
- data/lib/aspose_slides_cloud/models/slide_comment.rb +239 -227
- data/lib/aspose_slides_cloud/models/slide_comments.rb +209 -219
- data/lib/aspose_slides_cloud/models/slide_export_format.rb +59 -58
- data/lib/aspose_slides_cloud/models/slide_replace_result.rb +223 -347
- data/lib/aspose_slides_cloud/models/slides.rb +209 -219
- data/lib/aspose_slides_cloud/models/smart_art.rb +342 -530
- data/lib/aspose_slides_cloud/models/smart_art_node.rb +293 -281
- data/lib/aspose_slides_cloud/models/smart_art_shape.rb +235 -422
- data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +212 -200
- data/lib/aspose_slides_cloud/models/solid_fill.rb +229 -246
- data/lib/aspose_slides_cloud/models/split_document_result.rb +209 -219
- data/lib/aspose_slides_cloud/models/storage_exist.rb +212 -200
- data/lib/aspose_slides_cloud/models/storage_file.rb +257 -245
- data/lib/aspose_slides_cloud/models/svg_export_options.rb +379 -378
- data/lib/aspose_slides_cloud/models/swf_export_options.rb +529 -528
- data/lib/aspose_slides_cloud/models/table.rb +350 -538
- data/lib/aspose_slides_cloud/models/table_cell.rb +403 -391
- data/lib/aspose_slides_cloud/models/table_column.rb +212 -200
- data/lib/aspose_slides_cloud/models/table_row.rb +239 -227
- data/lib/aspose_slides_cloud/models/task.rb +240 -228
- data/lib/aspose_slides_cloud/models/text_item.rb +217 -205
- data/lib/aspose_slides_cloud/models/text_items.rb +209 -219
- data/lib/aspose_slides_cloud/models/theme.rb +237 -247
- data/lib/aspose_slides_cloud/models/tiff_export_options.rb +423 -422
- data/lib/aspose_slides_cloud/models/update_background.rb +241 -258
- data/lib/aspose_slides_cloud/models/update_shape.rb +239 -256
- data/lib/aspose_slides_cloud/models/video_frame.rb +329 -543
- data/lib/aspose_slides_cloud/models/view_properties.rb +357 -0
- data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +206 -0
- data/lib/aspose_slides_cloud/models/waterfall_series.rb +247 -0
- data/lib/aspose_slides_cloud/models/xps_export_options.rb +243 -242
- data/lib/aspose_slides_cloud/type_registry.rb +320 -0
- data/lib/aspose_slides_cloud/version.rb +25 -25
- data/spec/api/slides_api_spec.rb +35926 -24406
- data/spec/extra/extra_spec.rb +235 -101
- data/spec/spec_utils.rb +183 -176
- data/testConfig.json +7 -7
- data/testRules.json +472 -340
- metadata +18 -3
@@ -1,599 +1,589 @@
|
|
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 portion resource
|
27
|
-
class Portion
|
28
|
-
#
|
29
|
-
attr_accessor :
|
30
|
-
|
31
|
-
#
|
32
|
-
attr_accessor :
|
33
|
-
|
34
|
-
#
|
35
|
-
attr_accessor :
|
36
|
-
|
37
|
-
#
|
38
|
-
attr_accessor :
|
39
|
-
|
40
|
-
#
|
41
|
-
attr_accessor :
|
42
|
-
|
43
|
-
# Text
|
44
|
-
attr_accessor :
|
45
|
-
|
46
|
-
#
|
47
|
-
attr_accessor :
|
48
|
-
|
49
|
-
#
|
50
|
-
attr_accessor :
|
51
|
-
|
52
|
-
#
|
53
|
-
attr_accessor :
|
54
|
-
|
55
|
-
#
|
56
|
-
attr_accessor :
|
57
|
-
|
58
|
-
# Font
|
59
|
-
attr_accessor :
|
60
|
-
|
61
|
-
#
|
62
|
-
attr_accessor :
|
63
|
-
|
64
|
-
#
|
65
|
-
attr_accessor :
|
66
|
-
|
67
|
-
# True
|
68
|
-
attr_accessor :
|
69
|
-
|
70
|
-
#
|
71
|
-
attr_accessor :
|
72
|
-
|
73
|
-
# True if
|
74
|
-
attr_accessor :
|
75
|
-
|
76
|
-
#
|
77
|
-
attr_accessor :
|
78
|
-
|
79
|
-
#
|
80
|
-
attr_accessor :
|
81
|
-
|
82
|
-
#
|
83
|
-
attr_accessor :
|
84
|
-
|
85
|
-
#
|
86
|
-
attr_accessor :
|
87
|
-
|
88
|
-
#
|
89
|
-
attr_accessor :
|
90
|
-
|
91
|
-
#
|
92
|
-
attr_accessor :
|
93
|
-
|
94
|
-
#
|
95
|
-
attr_accessor :
|
96
|
-
|
97
|
-
#
|
98
|
-
attr_accessor :
|
99
|
-
|
100
|
-
#
|
101
|
-
attr_accessor :
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
:'
|
135
|
-
:'
|
136
|
-
:'
|
137
|
-
:'
|
138
|
-
:'
|
139
|
-
:'
|
140
|
-
:'
|
141
|
-
:'
|
142
|
-
:'
|
143
|
-
:'
|
144
|
-
:'
|
145
|
-
:'
|
146
|
-
:'
|
147
|
-
:'
|
148
|
-
:'
|
149
|
-
:'
|
150
|
-
:'
|
151
|
-
:'
|
152
|
-
:'
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
:'
|
160
|
-
:'
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
:'
|
168
|
-
:'
|
169
|
-
:'
|
170
|
-
:'
|
171
|
-
:'
|
172
|
-
:'
|
173
|
-
:'
|
174
|
-
:'
|
175
|
-
:'
|
176
|
-
:'
|
177
|
-
:'
|
178
|
-
:'
|
179
|
-
:'
|
180
|
-
:'
|
181
|
-
:'
|
182
|
-
:'
|
183
|
-
:'
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
if
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
when :
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
when :
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
591
|
-
end
|
592
|
-
elsif value.respond_to? :to_hash
|
593
|
-
value.to_hash
|
594
|
-
else
|
595
|
-
value
|
596
|
-
end
|
597
|
-
end
|
598
|
-
end
|
599
|
-
end
|
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 portion resource
|
27
|
+
class Portion < ResourceBase
|
28
|
+
# Text.
|
29
|
+
attr_accessor :text
|
30
|
+
|
31
|
+
# True for bold font.
|
32
|
+
attr_accessor :font_bold
|
33
|
+
|
34
|
+
# True for italic font.
|
35
|
+
attr_accessor :font_italic
|
36
|
+
|
37
|
+
# Text underline type.
|
38
|
+
attr_accessor :font_underline
|
39
|
+
|
40
|
+
# Text strikethrough type.
|
41
|
+
attr_accessor :strikethrough_type
|
42
|
+
|
43
|
+
# Text capitalization type.
|
44
|
+
attr_accessor :text_cap_type
|
45
|
+
|
46
|
+
# Superscript or subscript of the text.
|
47
|
+
attr_accessor :escapement
|
48
|
+
|
49
|
+
# Intercharacter spacing increment.
|
50
|
+
attr_accessor :spacing
|
51
|
+
|
52
|
+
# Font color.
|
53
|
+
attr_accessor :font_color
|
54
|
+
|
55
|
+
# Highlight color.
|
56
|
+
attr_accessor :highlight_color
|
57
|
+
|
58
|
+
# Font height.
|
59
|
+
attr_accessor :font_height
|
60
|
+
|
61
|
+
# True to normalize the text.
|
62
|
+
attr_accessor :normalise_height
|
63
|
+
|
64
|
+
# True if the text proof should be disabled.
|
65
|
+
attr_accessor :proof_disabled
|
66
|
+
|
67
|
+
# True if smart tag should be cleaned.
|
68
|
+
attr_accessor :smart_tag_clean
|
69
|
+
|
70
|
+
# Minimal font size for kerning.
|
71
|
+
attr_accessor :kerning_minimal_size
|
72
|
+
|
73
|
+
# True if numbers should ignore East-Asian specific vertical text layout.
|
74
|
+
attr_accessor :kumimoji
|
75
|
+
|
76
|
+
# Proving language ID.
|
77
|
+
attr_accessor :language_id
|
78
|
+
|
79
|
+
# Alternative proving language ID.
|
80
|
+
attr_accessor :alternative_language_id
|
81
|
+
|
82
|
+
# True if underline style has own FillFormat properties.
|
83
|
+
attr_accessor :is_hard_underline_fill
|
84
|
+
|
85
|
+
# True if underline style has own LineFormat properties.
|
86
|
+
attr_accessor :is_hard_underline_line
|
87
|
+
|
88
|
+
# Fill format.
|
89
|
+
attr_accessor :fill_format
|
90
|
+
|
91
|
+
# Effect format.
|
92
|
+
attr_accessor :effect_format
|
93
|
+
|
94
|
+
# Line format.
|
95
|
+
attr_accessor :line_format
|
96
|
+
|
97
|
+
# Underline fill format.
|
98
|
+
attr_accessor :underline_fill_format
|
99
|
+
|
100
|
+
# Underline line format.
|
101
|
+
attr_accessor :underline_line_format
|
102
|
+
|
103
|
+
class EnumAttributeValidator
|
104
|
+
attr_reader :datatype
|
105
|
+
attr_reader :allowable_values
|
106
|
+
|
107
|
+
def initialize(datatype, allowable_values)
|
108
|
+
@allowable_values = allowable_values.map do |value|
|
109
|
+
case datatype.to_s
|
110
|
+
when /Integer/i
|
111
|
+
value.to_i
|
112
|
+
when /Float/i
|
113
|
+
value.to_f
|
114
|
+
else
|
115
|
+
value
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def valid?(value)
|
121
|
+
!value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
126
|
+
def self.attribute_map
|
127
|
+
super.merge({
|
128
|
+
:'text' => :'Text',
|
129
|
+
:'font_bold' => :'FontBold',
|
130
|
+
:'font_italic' => :'FontItalic',
|
131
|
+
:'font_underline' => :'FontUnderline',
|
132
|
+
:'strikethrough_type' => :'StrikethroughType',
|
133
|
+
:'text_cap_type' => :'TextCapType',
|
134
|
+
:'escapement' => :'Escapement',
|
135
|
+
:'spacing' => :'Spacing',
|
136
|
+
:'font_color' => :'FontColor',
|
137
|
+
:'highlight_color' => :'HighlightColor',
|
138
|
+
:'font_height' => :'FontHeight',
|
139
|
+
:'normalise_height' => :'NormaliseHeight',
|
140
|
+
:'proof_disabled' => :'ProofDisabled',
|
141
|
+
:'smart_tag_clean' => :'SmartTagClean',
|
142
|
+
:'kerning_minimal_size' => :'KerningMinimalSize',
|
143
|
+
:'kumimoji' => :'Kumimoji',
|
144
|
+
:'language_id' => :'LanguageId',
|
145
|
+
:'alternative_language_id' => :'AlternativeLanguageId',
|
146
|
+
:'is_hard_underline_fill' => :'IsHardUnderlineFill',
|
147
|
+
:'is_hard_underline_line' => :'IsHardUnderlineLine',
|
148
|
+
:'fill_format' => :'FillFormat',
|
149
|
+
:'effect_format' => :'EffectFormat',
|
150
|
+
:'line_format' => :'LineFormat',
|
151
|
+
:'underline_fill_format' => :'UnderlineFillFormat',
|
152
|
+
:'underline_line_format' => :'UnderlineLineFormat',
|
153
|
+
})
|
154
|
+
end
|
155
|
+
|
156
|
+
# Attribute type mapping.
|
157
|
+
def self.swagger_types
|
158
|
+
super.merge({
|
159
|
+
:'text' => :'String',
|
160
|
+
:'font_bold' => :'String',
|
161
|
+
:'font_italic' => :'String',
|
162
|
+
:'font_underline' => :'String',
|
163
|
+
:'strikethrough_type' => :'String',
|
164
|
+
:'text_cap_type' => :'String',
|
165
|
+
:'escapement' => :'Float',
|
166
|
+
:'spacing' => :'Float',
|
167
|
+
:'font_color' => :'String',
|
168
|
+
:'highlight_color' => :'String',
|
169
|
+
:'font_height' => :'Float',
|
170
|
+
:'normalise_height' => :'String',
|
171
|
+
:'proof_disabled' => :'String',
|
172
|
+
:'smart_tag_clean' => :'BOOLEAN',
|
173
|
+
:'kerning_minimal_size' => :'Float',
|
174
|
+
:'kumimoji' => :'String',
|
175
|
+
:'language_id' => :'String',
|
176
|
+
:'alternative_language_id' => :'String',
|
177
|
+
:'is_hard_underline_fill' => :'String',
|
178
|
+
:'is_hard_underline_line' => :'String',
|
179
|
+
:'fill_format' => :'FillFormat',
|
180
|
+
:'effect_format' => :'EffectFormat',
|
181
|
+
:'line_format' => :'LineFormat',
|
182
|
+
:'underline_fill_format' => :'FillFormat',
|
183
|
+
:'underline_line_format' => :'LineFormat',
|
184
|
+
})
|
185
|
+
end
|
186
|
+
|
187
|
+
# Initializes the object
|
188
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
189
|
+
def initialize(attributes = {})
|
190
|
+
super
|
191
|
+
|
192
|
+
if attributes.has_key?(:'Text')
|
193
|
+
self.text = attributes[:'Text']
|
194
|
+
end
|
195
|
+
|
196
|
+
if attributes.has_key?(:'FontBold')
|
197
|
+
self.font_bold = attributes[:'FontBold']
|
198
|
+
end
|
199
|
+
|
200
|
+
if attributes.has_key?(:'FontItalic')
|
201
|
+
self.font_italic = attributes[:'FontItalic']
|
202
|
+
end
|
203
|
+
|
204
|
+
if attributes.has_key?(:'FontUnderline')
|
205
|
+
self.font_underline = attributes[:'FontUnderline']
|
206
|
+
end
|
207
|
+
|
208
|
+
if attributes.has_key?(:'StrikethroughType')
|
209
|
+
self.strikethrough_type = attributes[:'StrikethroughType']
|
210
|
+
end
|
211
|
+
|
212
|
+
if attributes.has_key?(:'TextCapType')
|
213
|
+
self.text_cap_type = attributes[:'TextCapType']
|
214
|
+
end
|
215
|
+
|
216
|
+
if attributes.has_key?(:'Escapement')
|
217
|
+
self.escapement = attributes[:'Escapement']
|
218
|
+
end
|
219
|
+
|
220
|
+
if attributes.has_key?(:'Spacing')
|
221
|
+
self.spacing = attributes[:'Spacing']
|
222
|
+
end
|
223
|
+
|
224
|
+
if attributes.has_key?(:'FontColor')
|
225
|
+
self.font_color = attributes[:'FontColor']
|
226
|
+
end
|
227
|
+
|
228
|
+
if attributes.has_key?(:'HighlightColor')
|
229
|
+
self.highlight_color = attributes[:'HighlightColor']
|
230
|
+
end
|
231
|
+
|
232
|
+
if attributes.has_key?(:'FontHeight')
|
233
|
+
self.font_height = attributes[:'FontHeight']
|
234
|
+
end
|
235
|
+
|
236
|
+
if attributes.has_key?(:'NormaliseHeight')
|
237
|
+
self.normalise_height = attributes[:'NormaliseHeight']
|
238
|
+
end
|
239
|
+
|
240
|
+
if attributes.has_key?(:'ProofDisabled')
|
241
|
+
self.proof_disabled = attributes[:'ProofDisabled']
|
242
|
+
end
|
243
|
+
|
244
|
+
if attributes.has_key?(:'SmartTagClean')
|
245
|
+
self.smart_tag_clean = attributes[:'SmartTagClean']
|
246
|
+
end
|
247
|
+
|
248
|
+
if attributes.has_key?(:'KerningMinimalSize')
|
249
|
+
self.kerning_minimal_size = attributes[:'KerningMinimalSize']
|
250
|
+
end
|
251
|
+
|
252
|
+
if attributes.has_key?(:'Kumimoji')
|
253
|
+
self.kumimoji = attributes[:'Kumimoji']
|
254
|
+
end
|
255
|
+
|
256
|
+
if attributes.has_key?(:'LanguageId')
|
257
|
+
self.language_id = attributes[:'LanguageId']
|
258
|
+
end
|
259
|
+
|
260
|
+
if attributes.has_key?(:'AlternativeLanguageId')
|
261
|
+
self.alternative_language_id = attributes[:'AlternativeLanguageId']
|
262
|
+
end
|
263
|
+
|
264
|
+
if attributes.has_key?(:'IsHardUnderlineFill')
|
265
|
+
self.is_hard_underline_fill = attributes[:'IsHardUnderlineFill']
|
266
|
+
end
|
267
|
+
|
268
|
+
if attributes.has_key?(:'IsHardUnderlineLine')
|
269
|
+
self.is_hard_underline_line = attributes[:'IsHardUnderlineLine']
|
270
|
+
end
|
271
|
+
|
272
|
+
if attributes.has_key?(:'FillFormat')
|
273
|
+
self.fill_format = attributes[:'FillFormat']
|
274
|
+
end
|
275
|
+
|
276
|
+
if attributes.has_key?(:'EffectFormat')
|
277
|
+
self.effect_format = attributes[:'EffectFormat']
|
278
|
+
end
|
279
|
+
|
280
|
+
if attributes.has_key?(:'LineFormat')
|
281
|
+
self.line_format = attributes[:'LineFormat']
|
282
|
+
end
|
283
|
+
|
284
|
+
if attributes.has_key?(:'UnderlineFillFormat')
|
285
|
+
self.underline_fill_format = attributes[:'UnderlineFillFormat']
|
286
|
+
end
|
287
|
+
|
288
|
+
if attributes.has_key?(:'UnderlineLineFormat')
|
289
|
+
self.underline_line_format = attributes[:'UnderlineLineFormat']
|
290
|
+
end
|
291
|
+
end
|
292
|
+
|
293
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
294
|
+
# @return Array for valid properties with the reasons
|
295
|
+
def list_invalid_properties
|
296
|
+
invalid_properties = super
|
297
|
+
invalid_properties
|
298
|
+
end
|
299
|
+
|
300
|
+
# Check to see if the all the properties in the model are valid
|
301
|
+
# @return true if the model is valid
|
302
|
+
def valid?
|
303
|
+
return false if !super
|
304
|
+
font_bold_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
305
|
+
return false unless font_bold_validator.valid?(@font_bold)
|
306
|
+
font_italic_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
307
|
+
return false unless font_italic_validator.valid?(@font_italic)
|
308
|
+
font_underline_validator = EnumAttributeValidator.new('String', ['None', 'Words', 'Single', 'Double', 'Heavy', 'Dotted', 'HeavyDotted', 'Dashed', 'HeavyDashed', 'LongDashed', 'HeavyLongDashed', 'DotDash', 'HeavyDotDash', 'DotDotDash', 'HeavyDotDotDash', 'Wavy', 'HeavyWavy', 'DoubleWavy', 'NotDefined'])
|
309
|
+
return false unless font_underline_validator.valid?(@font_underline)
|
310
|
+
strikethrough_type_validator = EnumAttributeValidator.new('String', ['None', 'Single', 'Double', 'NotDefined'])
|
311
|
+
return false unless strikethrough_type_validator.valid?(@strikethrough_type)
|
312
|
+
text_cap_type_validator = EnumAttributeValidator.new('String', ['None', 'Small', 'All', 'NotDefined'])
|
313
|
+
return false unless text_cap_type_validator.valid?(@text_cap_type)
|
314
|
+
normalise_height_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
315
|
+
return false unless normalise_height_validator.valid?(@normalise_height)
|
316
|
+
proof_disabled_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
317
|
+
return false unless proof_disabled_validator.valid?(@proof_disabled)
|
318
|
+
kumimoji_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
319
|
+
return false unless kumimoji_validator.valid?(@kumimoji)
|
320
|
+
is_hard_underline_fill_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
321
|
+
return false unless is_hard_underline_fill_validator.valid?(@is_hard_underline_fill)
|
322
|
+
is_hard_underline_line_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
323
|
+
return false unless is_hard_underline_line_validator.valid?(@is_hard_underline_line)
|
324
|
+
true
|
325
|
+
end
|
326
|
+
|
327
|
+
# Custom attribute writer method checking allowed values (enum).
|
328
|
+
# @param [Object] font_bold Object to be assigned
|
329
|
+
def font_bold=(font_bold)
|
330
|
+
validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
331
|
+
unless validator.valid?(font_bold)
|
332
|
+
fail ArgumentError, 'invalid value for "font_bold", must be one of #{validator.allowable_values}.'
|
333
|
+
end
|
334
|
+
@font_bold = font_bold
|
335
|
+
end
|
336
|
+
|
337
|
+
# Custom attribute writer method checking allowed values (enum).
|
338
|
+
# @param [Object] font_italic Object to be assigned
|
339
|
+
def font_italic=(font_italic)
|
340
|
+
validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
341
|
+
unless validator.valid?(font_italic)
|
342
|
+
fail ArgumentError, 'invalid value for "font_italic", must be one of #{validator.allowable_values}.'
|
343
|
+
end
|
344
|
+
@font_italic = font_italic
|
345
|
+
end
|
346
|
+
|
347
|
+
# Custom attribute writer method checking allowed values (enum).
|
348
|
+
# @param [Object] font_underline Object to be assigned
|
349
|
+
def font_underline=(font_underline)
|
350
|
+
validator = EnumAttributeValidator.new('String', ['None', 'Words', 'Single', 'Double', 'Heavy', 'Dotted', 'HeavyDotted', 'Dashed', 'HeavyDashed', 'LongDashed', 'HeavyLongDashed', 'DotDash', 'HeavyDotDash', 'DotDotDash', 'HeavyDotDotDash', 'Wavy', 'HeavyWavy', 'DoubleWavy', 'NotDefined'])
|
351
|
+
unless validator.valid?(font_underline)
|
352
|
+
fail ArgumentError, 'invalid value for "font_underline", must be one of #{validator.allowable_values}.'
|
353
|
+
end
|
354
|
+
@font_underline = font_underline
|
355
|
+
end
|
356
|
+
|
357
|
+
# Custom attribute writer method checking allowed values (enum).
|
358
|
+
# @param [Object] strikethrough_type Object to be assigned
|
359
|
+
def strikethrough_type=(strikethrough_type)
|
360
|
+
validator = EnumAttributeValidator.new('String', ['None', 'Single', 'Double', 'NotDefined'])
|
361
|
+
unless validator.valid?(strikethrough_type)
|
362
|
+
fail ArgumentError, 'invalid value for "strikethrough_type", must be one of #{validator.allowable_values}.'
|
363
|
+
end
|
364
|
+
@strikethrough_type = strikethrough_type
|
365
|
+
end
|
366
|
+
|
367
|
+
# Custom attribute writer method checking allowed values (enum).
|
368
|
+
# @param [Object] text_cap_type Object to be assigned
|
369
|
+
def text_cap_type=(text_cap_type)
|
370
|
+
validator = EnumAttributeValidator.new('String', ['None', 'Small', 'All', 'NotDefined'])
|
371
|
+
unless validator.valid?(text_cap_type)
|
372
|
+
fail ArgumentError, 'invalid value for "text_cap_type", must be one of #{validator.allowable_values}.'
|
373
|
+
end
|
374
|
+
@text_cap_type = text_cap_type
|
375
|
+
end
|
376
|
+
|
377
|
+
# Custom attribute writer method checking allowed values (enum).
|
378
|
+
# @param [Object] normalise_height Object to be assigned
|
379
|
+
def normalise_height=(normalise_height)
|
380
|
+
validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
381
|
+
unless validator.valid?(normalise_height)
|
382
|
+
fail ArgumentError, 'invalid value for "normalise_height", must be one of #{validator.allowable_values}.'
|
383
|
+
end
|
384
|
+
@normalise_height = normalise_height
|
385
|
+
end
|
386
|
+
|
387
|
+
# Custom attribute writer method checking allowed values (enum).
|
388
|
+
# @param [Object] proof_disabled Object to be assigned
|
389
|
+
def proof_disabled=(proof_disabled)
|
390
|
+
validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
391
|
+
unless validator.valid?(proof_disabled)
|
392
|
+
fail ArgumentError, 'invalid value for "proof_disabled", must be one of #{validator.allowable_values}.'
|
393
|
+
end
|
394
|
+
@proof_disabled = proof_disabled
|
395
|
+
end
|
396
|
+
|
397
|
+
# Custom attribute writer method checking allowed values (enum).
|
398
|
+
# @param [Object] kumimoji Object to be assigned
|
399
|
+
def kumimoji=(kumimoji)
|
400
|
+
validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
401
|
+
unless validator.valid?(kumimoji)
|
402
|
+
fail ArgumentError, 'invalid value for "kumimoji", must be one of #{validator.allowable_values}.'
|
403
|
+
end
|
404
|
+
@kumimoji = kumimoji
|
405
|
+
end
|
406
|
+
|
407
|
+
# Custom attribute writer method checking allowed values (enum).
|
408
|
+
# @param [Object] is_hard_underline_fill Object to be assigned
|
409
|
+
def is_hard_underline_fill=(is_hard_underline_fill)
|
410
|
+
validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
411
|
+
unless validator.valid?(is_hard_underline_fill)
|
412
|
+
fail ArgumentError, 'invalid value for "is_hard_underline_fill", must be one of #{validator.allowable_values}.'
|
413
|
+
end
|
414
|
+
@is_hard_underline_fill = is_hard_underline_fill
|
415
|
+
end
|
416
|
+
|
417
|
+
# Custom attribute writer method checking allowed values (enum).
|
418
|
+
# @param [Object] is_hard_underline_line Object to be assigned
|
419
|
+
def is_hard_underline_line=(is_hard_underline_line)
|
420
|
+
validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
|
421
|
+
unless validator.valid?(is_hard_underline_line)
|
422
|
+
fail ArgumentError, 'invalid value for "is_hard_underline_line", must be one of #{validator.allowable_values}.'
|
423
|
+
end
|
424
|
+
@is_hard_underline_line = is_hard_underline_line
|
425
|
+
end
|
426
|
+
|
427
|
+
# Checks equality by comparing each attribute.
|
428
|
+
# @param [Object] Object to be compared
|
429
|
+
def ==(o)
|
430
|
+
return true if self.equal?(o)
|
431
|
+
self.class == o.class &&
|
432
|
+
self_uri == o.self_uri &&
|
433
|
+
alternate_links == o.alternate_links &&
|
434
|
+
text == o.text &&
|
435
|
+
font_bold == o.font_bold &&
|
436
|
+
font_italic == o.font_italic &&
|
437
|
+
font_underline == o.font_underline &&
|
438
|
+
strikethrough_type == o.strikethrough_type &&
|
439
|
+
text_cap_type == o.text_cap_type &&
|
440
|
+
escapement == o.escapement &&
|
441
|
+
spacing == o.spacing &&
|
442
|
+
font_color == o.font_color &&
|
443
|
+
highlight_color == o.highlight_color &&
|
444
|
+
font_height == o.font_height &&
|
445
|
+
normalise_height == o.normalise_height &&
|
446
|
+
proof_disabled == o.proof_disabled &&
|
447
|
+
smart_tag_clean == o.smart_tag_clean &&
|
448
|
+
kerning_minimal_size == o.kerning_minimal_size &&
|
449
|
+
kumimoji == o.kumimoji &&
|
450
|
+
language_id == o.language_id &&
|
451
|
+
alternative_language_id == o.alternative_language_id &&
|
452
|
+
is_hard_underline_fill == o.is_hard_underline_fill &&
|
453
|
+
is_hard_underline_line == o.is_hard_underline_line &&
|
454
|
+
fill_format == o.fill_format &&
|
455
|
+
effect_format == o.effect_format &&
|
456
|
+
line_format == o.line_format &&
|
457
|
+
underline_fill_format == o.underline_fill_format &&
|
458
|
+
underline_line_format == o.underline_line_format
|
459
|
+
end
|
460
|
+
|
461
|
+
# @see the `==` method
|
462
|
+
# @param [Object] Object to be compared
|
463
|
+
def eql?(o)
|
464
|
+
self == o
|
465
|
+
end
|
466
|
+
|
467
|
+
# Calculates hash code according to all attributes.
|
468
|
+
# @return [Fixnum] Hash code
|
469
|
+
def hash
|
470
|
+
[self_uri, alternate_links, text, font_bold, font_italic, font_underline, strikethrough_type, text_cap_type, escapement, spacing, font_color, highlight_color, font_height, normalise_height, proof_disabled, smart_tag_clean, kerning_minimal_size, kumimoji, language_id, alternative_language_id, is_hard_underline_fill, is_hard_underline_line, fill_format, effect_format, line_format, underline_fill_format, underline_line_format].hash
|
471
|
+
end
|
472
|
+
|
473
|
+
# Builds the object from hash
|
474
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
475
|
+
# @return [Object] Returns the model itself
|
476
|
+
def build_from_hash(attributes)
|
477
|
+
return nil unless attributes.is_a?(Hash)
|
478
|
+
self.class.swagger_types.each_pair do |key, type|
|
479
|
+
mapKey = self.class.attribute_map[key]
|
480
|
+
if !mapKey.nil?
|
481
|
+
val = attributes[mapKey]
|
482
|
+
if val.nil?
|
483
|
+
mapKeyString = mapKey.to_s
|
484
|
+
mapKeyString[0] = mapKeyString[0].downcase
|
485
|
+
mapKey = mapKeyString.to_sym
|
486
|
+
val = attributes[mapKey]
|
487
|
+
end
|
488
|
+
if !val.nil?
|
489
|
+
if type =~ /\AArray<(.*)>/i
|
490
|
+
# check to ensure the input is an array given that the the attribute
|
491
|
+
# is documented as an array but the input is not
|
492
|
+
if val.is_a?(Array)
|
493
|
+
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
494
|
+
end
|
495
|
+
else
|
496
|
+
self.send("#{key}=", _deserialize(type, val))
|
497
|
+
end
|
498
|
+
end
|
499
|
+
end
|
500
|
+
end
|
501
|
+
|
502
|
+
self
|
503
|
+
end
|
504
|
+
|
505
|
+
# Deserializes the data based on type
|
506
|
+
# @param string type Data type
|
507
|
+
# @param string value Value to be deserialized
|
508
|
+
# @return [Object] Deserialized data
|
509
|
+
def _deserialize(type, value)
|
510
|
+
case type.to_sym
|
511
|
+
when :DateTime
|
512
|
+
DateTime.parse(value)
|
513
|
+
when :Date
|
514
|
+
Date.parse(value)
|
515
|
+
when :String
|
516
|
+
value.to_s
|
517
|
+
when :Integer
|
518
|
+
value.to_i
|
519
|
+
when :Float
|
520
|
+
value.to_f
|
521
|
+
when :BOOLEAN
|
522
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
523
|
+
true
|
524
|
+
else
|
525
|
+
false
|
526
|
+
end
|
527
|
+
when :Object
|
528
|
+
# generic object (usually a Hash), return directly
|
529
|
+
value
|
530
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
531
|
+
inner_type = Regexp.last_match[:inner_type]
|
532
|
+
value.map { |v| _deserialize(inner_type, v) }
|
533
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
534
|
+
k_type = Regexp.last_match[:k_type]
|
535
|
+
v_type = Regexp.last_match[:v_type]
|
536
|
+
{}.tap do |hash|
|
537
|
+
value.each do |k, v|
|
538
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
539
|
+
end
|
540
|
+
end
|
541
|
+
else # model
|
542
|
+
temp_model = AsposeSlidesCloud.const_get(type).new
|
543
|
+
temp_model.build_from_hash(value)
|
544
|
+
end
|
545
|
+
end
|
546
|
+
|
547
|
+
# Returns the string representation of the object
|
548
|
+
# @return [String] String presentation of the object
|
549
|
+
def to_s
|
550
|
+
to_hash.to_s
|
551
|
+
end
|
552
|
+
|
553
|
+
# to_body is an alias to to_hash (backward compatibility)
|
554
|
+
# @return [Hash] Returns the object in the form of hash
|
555
|
+
def to_body
|
556
|
+
to_hash
|
557
|
+
end
|
558
|
+
|
559
|
+
# Returns the object in the form of hash
|
560
|
+
# @return [Hash] Returns the object in the form of hash
|
561
|
+
def to_hash
|
562
|
+
hash = {}
|
563
|
+
self.class.attribute_map.each_pair do |attr, param|
|
564
|
+
value = self.send(attr)
|
565
|
+
next if value.nil?
|
566
|
+
hash[param] = _to_hash(value)
|
567
|
+
end
|
568
|
+
hash
|
569
|
+
end
|
570
|
+
|
571
|
+
# Outputs non-array value in the form of hash
|
572
|
+
# For object, use to_hash. Otherwise, just return the value
|
573
|
+
# @param [Object] value Any valid value
|
574
|
+
# @return [Hash] Returns the value in the form of hash
|
575
|
+
def _to_hash(value)
|
576
|
+
if value.is_a?(Array)
|
577
|
+
value.compact.map { |v| _to_hash(v) }
|
578
|
+
elsif value.is_a?(Hash)
|
579
|
+
{}.tap do |hash|
|
580
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
581
|
+
end
|
582
|
+
elsif value.respond_to? :to_hash
|
583
|
+
value.to_hash
|
584
|
+
else
|
585
|
+
value
|
586
|
+
end
|
587
|
+
end
|
588
|
+
end
|
589
|
+
end
|