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