aspose_slides_cloud 21.4.0 → 21.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +89 -61
  3. data/TestData/TemplatingCVDataWithBase64.xml +22 -22
  4. data/lib/aspose_slides_cloud.rb +212 -213
  5. data/lib/aspose_slides_cloud/api/slides_api.rb +15206 -17689
  6. data/lib/aspose_slides_cloud/api_client.rb +439 -439
  7. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +244 -244
  8. data/lib/aspose_slides_cloud/models/add_master_slide.rb +259 -259
  9. data/lib/aspose_slides_cloud/models/add_shape.rb +239 -239
  10. data/lib/aspose_slides_cloud/models/add_slide.rb +269 -269
  11. data/lib/aspose_slides_cloud/models/api_info.rb +217 -217
  12. data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +285 -285
  13. data/lib/aspose_slides_cloud/models/audio_frame.rb +359 -359
  14. data/lib/aspose_slides_cloud/models/axes.rb +237 -237
  15. data/lib/aspose_slides_cloud/models/axis.rb +699 -699
  16. data/lib/aspose_slides_cloud/models/base64_input_file.rb +230 -230
  17. data/lib/aspose_slides_cloud/models/blur_effect.rb +227 -227
  18. data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +299 -299
  19. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +212 -212
  20. data/lib/aspose_slides_cloud/models/bubble_series.rb +248 -248
  21. data/lib/aspose_slides_cloud/models/chart.rb +365 -365
  22. data/lib/aspose_slides_cloud/models/chart_category.rb +271 -271
  23. data/lib/aspose_slides_cloud/models/chart_title.rb +222 -222
  24. data/lib/aspose_slides_cloud/models/chart_wall.rb +281 -281
  25. data/lib/aspose_slides_cloud/models/color_scheme.rb +317 -317
  26. data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +217 -217
  27. data/lib/aspose_slides_cloud/models/connector.rb +275 -275
  28. data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +209 -209
  29. data/lib/aspose_slides_cloud/models/data_point.rb +197 -197
  30. data/lib/aspose_slides_cloud/models/disc_usage.rb +227 -227
  31. data/lib/aspose_slides_cloud/models/document.rb +257 -257
  32. data/lib/aspose_slides_cloud/models/document_properties.rb +209 -209
  33. data/lib/aspose_slides_cloud/models/document_property.rb +232 -232
  34. data/lib/aspose_slides_cloud/models/document_replace_result.rb +218 -218
  35. data/lib/aspose_slides_cloud/models/effect.rb +424 -424
  36. data/lib/aspose_slides_cloud/models/effect_format.rb +277 -277
  37. data/lib/aspose_slides_cloud/models/entity_exists.rb +212 -212
  38. data/lib/aspose_slides_cloud/models/error.rb +237 -237
  39. data/lib/aspose_slides_cloud/models/error_details.rb +222 -222
  40. data/lib/aspose_slides_cloud/models/export_format.rb +60 -60
  41. data/lib/aspose_slides_cloud/models/export_options.rb +216 -216
  42. data/lib/aspose_slides_cloud/models/file_version.rb +225 -225
  43. data/lib/aspose_slides_cloud/models/file_versions.rb +209 -209
  44. data/lib/aspose_slides_cloud/models/files_list.rb +209 -209
  45. data/lib/aspose_slides_cloud/models/files_upload_result.rb +221 -221
  46. data/lib/aspose_slides_cloud/models/fill_format.rb +240 -240
  47. data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +246 -246
  48. data/lib/aspose_slides_cloud/models/font_scheme.rb +227 -227
  49. data/lib/aspose_slides_cloud/models/font_set.rb +227 -227
  50. data/lib/aspose_slides_cloud/models/format_scheme.rb +245 -245
  51. data/lib/aspose_slides_cloud/models/geometry_shape.rb +260 -260
  52. data/lib/aspose_slides_cloud/models/glow_effect.rb +222 -222
  53. data/lib/aspose_slides_cloud/models/gradient_fill.rb +342 -342
  54. data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +222 -222
  55. data/lib/aspose_slides_cloud/models/graphical_object.rb +234 -234
  56. data/lib/aspose_slides_cloud/models/group_shape.rb +234 -234
  57. data/lib/aspose_slides_cloud/models/header_footer.rb +247 -247
  58. data/lib/aspose_slides_cloud/models/html_export_options.rb +421 -421
  59. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +197 -197
  60. data/lib/aspose_slides_cloud/models/image.rb +237 -237
  61. data/lib/aspose_slides_cloud/models/image_export_format.rb +43 -43
  62. data/lib/aspose_slides_cloud/models/image_export_options.rb +299 -299
  63. data/lib/aspose_slides_cloud/models/images.rb +209 -209
  64. data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +252 -252
  65. data/lib/aspose_slides_cloud/models/input.rb +227 -227
  66. data/lib/aspose_slides_cloud/models/input_file.rb +250 -250
  67. data/lib/aspose_slides_cloud/models/interactive_sequence.rb +224 -224
  68. data/lib/aspose_slides_cloud/models/layout_slide.rb +278 -278
  69. data/lib/aspose_slides_cloud/models/layout_slides.rb +209 -209
  70. data/lib/aspose_slides_cloud/models/legend.rb +321 -321
  71. data/lib/aspose_slides_cloud/models/line_format.rb +411 -411
  72. data/lib/aspose_slides_cloud/models/master_slide.rb +231 -231
  73. data/lib/aspose_slides_cloud/models/master_slides.rb +209 -209
  74. data/lib/aspose_slides_cloud/models/merge.rb +231 -231
  75. data/lib/aspose_slides_cloud/models/merging_source.rb +219 -219
  76. data/lib/aspose_slides_cloud/models/no_fill.rb +219 -219
  77. data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +217 -217
  78. data/lib/aspose_slides_cloud/models/notes_slide.rb +217 -217
  79. data/lib/aspose_slides_cloud/models/notes_slide_export_format.rb +43 -43
  80. data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +267 -267
  81. data/lib/aspose_slides_cloud/models/object_exist.rb +227 -227
  82. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +259 -259
  83. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +210 -210
  84. data/lib/aspose_slides_cloud/models/one_value_series.rb +248 -248
  85. data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +209 -209
  86. data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +252 -252
  87. data/lib/aspose_slides_cloud/models/output_file.rb +240 -240
  88. data/lib/aspose_slides_cloud/models/paragraph.rb +517 -517
  89. data/lib/aspose_slides_cloud/models/paragraphs.rb +209 -209
  90. data/lib/aspose_slides_cloud/models/path_input_file.rb +240 -240
  91. data/lib/aspose_slides_cloud/models/path_output_file.rb +239 -239
  92. data/lib/aspose_slides_cloud/models/pattern_fill.rb +266 -266
  93. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +547 -547
  94. data/lib/aspose_slides_cloud/models/picture_fill.rb +351 -351
  95. data/lib/aspose_slides_cloud/models/picture_frame.rb +245 -245
  96. data/lib/aspose_slides_cloud/models/pipeline.rb +219 -219
  97. data/lib/aspose_slides_cloud/models/placeholder.rb +325 -325
  98. data/lib/aspose_slides_cloud/models/placeholders.rb +209 -209
  99. data/lib/aspose_slides_cloud/models/plot_area.rb +311 -311
  100. data/lib/aspose_slides_cloud/models/portion.rb +589 -589
  101. data/lib/aspose_slides_cloud/models/portions.rb +209 -209
  102. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +247 -247
  103. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +273 -273
  104. data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +221 -221
  105. data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +286 -286
  106. data/lib/aspose_slides_cloud/models/protection_properties.rb +267 -267
  107. data/lib/aspose_slides_cloud/models/reflection_effect.rb +441 -441
  108. data/lib/aspose_slides_cloud/models/remove_shape.rb +229 -229
  109. data/lib/aspose_slides_cloud/models/remove_slide.rb +234 -234
  110. data/lib/aspose_slides_cloud/models/reorder_slide.rb +249 -249
  111. data/lib/aspose_slides_cloud/models/replace_text.rb +269 -269
  112. data/lib/aspose_slides_cloud/models/request_input_file.rb +235 -235
  113. data/lib/aspose_slides_cloud/models/reset_slide.rb +234 -234
  114. data/lib/aspose_slides_cloud/models/resource_base.rb +219 -219
  115. data/lib/aspose_slides_cloud/models/resource_uri.rb +237 -237
  116. data/lib/aspose_slides_cloud/models/response_output_file.rb +219 -219
  117. data/lib/aspose_slides_cloud/models/save.rb +266 -266
  118. data/lib/aspose_slides_cloud/models/save_shape.rb +276 -276
  119. data/lib/aspose_slides_cloud/models/save_slide.rb +301 -301
  120. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +225 -225
  121. data/lib/aspose_slides_cloud/models/scatter_series.rb +248 -248
  122. data/lib/aspose_slides_cloud/models/section.rb +234 -234
  123. data/lib/aspose_slides_cloud/models/sections.rb +209 -209
  124. data/lib/aspose_slides_cloud/models/series.rb +422 -422
  125. data/lib/aspose_slides_cloud/models/series_marker.rb +281 -281
  126. data/lib/aspose_slides_cloud/models/shape.rb +255 -255
  127. data/lib/aspose_slides_cloud/models/shape_base.rb +375 -375
  128. data/lib/aspose_slides_cloud/models/shape_export_format.rb +44 -44
  129. data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +286 -286
  130. data/lib/aspose_slides_cloud/models/shape_thumbnail_bounds.rb +41 -41
  131. data/lib/aspose_slides_cloud/models/shapes.rb +209 -209
  132. data/lib/aspose_slides_cloud/models/shapes_alignment_type.rb +46 -46
  133. data/lib/aspose_slides_cloud/models/slide.rb +322 -322
  134. data/lib/aspose_slides_cloud/models/slide_animation.rb +221 -221
  135. data/lib/aspose_slides_cloud/models/slide_background.rb +266 -266
  136. data/lib/aspose_slides_cloud/models/slide_comment.rb +239 -239
  137. data/lib/aspose_slides_cloud/models/slide_comments.rb +209 -209
  138. data/lib/aspose_slides_cloud/models/slide_export_format.rb +59 -59
  139. data/lib/aspose_slides_cloud/models/slide_properties.rb +315 -315
  140. data/lib/aspose_slides_cloud/models/slide_replace_result.rb +223 -223
  141. data/lib/aspose_slides_cloud/models/slides.rb +209 -209
  142. data/lib/aspose_slides_cloud/models/smart_art.rb +342 -342
  143. data/lib/aspose_slides_cloud/models/smart_art_node.rb +293 -293
  144. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +235 -235
  145. data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +212 -212
  146. data/lib/aspose_slides_cloud/models/solid_fill.rb +229 -229
  147. data/lib/aspose_slides_cloud/models/split_document_result.rb +209 -209
  148. data/lib/aspose_slides_cloud/models/storage_exist.rb +212 -212
  149. data/lib/aspose_slides_cloud/models/storage_file.rb +257 -257
  150. data/lib/aspose_slides_cloud/models/svg_export_options.rb +379 -379
  151. data/lib/aspose_slides_cloud/models/swf_export_options.rb +529 -529
  152. data/lib/aspose_slides_cloud/models/table.rb +350 -350
  153. data/lib/aspose_slides_cloud/models/table_cell.rb +403 -403
  154. data/lib/aspose_slides_cloud/models/table_column.rb +212 -212
  155. data/lib/aspose_slides_cloud/models/table_row.rb +239 -239
  156. data/lib/aspose_slides_cloud/models/task.rb +240 -240
  157. data/lib/aspose_slides_cloud/models/text_item.rb +217 -217
  158. data/lib/aspose_slides_cloud/models/text_items.rb +209 -209
  159. data/lib/aspose_slides_cloud/models/theme.rb +237 -237
  160. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +423 -423
  161. data/lib/aspose_slides_cloud/models/update_background.rb +241 -241
  162. data/lib/aspose_slides_cloud/models/update_shape.rb +239 -239
  163. data/lib/aspose_slides_cloud/models/video_frame.rb +329 -329
  164. data/lib/aspose_slides_cloud/models/view_properties.rb +357 -357
  165. data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +206 -206
  166. data/lib/aspose_slides_cloud/models/waterfall_series.rb +247 -247
  167. data/lib/aspose_slides_cloud/models/xps_export_options.rb +243 -243
  168. data/lib/aspose_slides_cloud/type_registry.rb +323 -323
  169. data/lib/aspose_slides_cloud/version.rb +25 -25
  170. data/spec/api/slides_api_spec.rb +40213 -39435
  171. data/spec/extra/extra_spec.rb +202 -202
  172. data/spec/spec_utils.rb +182 -182
  173. data/testConfig.json +7 -7
  174. data/testRules.json +513 -511
  175. metadata +2 -3
  176. data/lib/aspose_slides_cloud/api/slides_api_requests.rb +0 -4742
@@ -1,589 +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 < 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
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