aspose_slides_cloud 1.0.3 → 19.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/Gemfile +7 -0
  4. data/LICENSE +2 -3
  5. data/README.md +7 -39
  6. data/Rakefile +8 -0
  7. data/TestData/TemplateCV.pptx +0 -0
  8. data/TestData/TemplatingCVDataWithBase64.xml +23 -0
  9. data/TestData/placeholders.pptx +0 -0
  10. data/TestData/test-unprotected.ppt +0 -0
  11. data/TestData/test.ppt +0 -0
  12. data/aspose_slides_cloud.gemspec +42 -14
  13. data/lib/aspose_slides_cloud.rb +183 -78
  14. data/lib/aspose_slides_cloud/api/slides_api.rb +6906 -2256
  15. data/lib/aspose_slides_cloud/api/slides_api_requests.rb +3067 -0
  16. data/lib/aspose_slides_cloud/api_client.rb +273 -183
  17. data/lib/aspose_slides_cloud/api_error.rb +29 -5
  18. data/lib/aspose_slides_cloud/configuration.rb +93 -81
  19. data/lib/aspose_slides_cloud/models/add_layout_slide.rb +261 -0
  20. data/lib/aspose_slides_cloud/models/add_master_slide.rb +276 -0
  21. data/lib/aspose_slides_cloud/models/add_shape.rb +256 -0
  22. data/lib/aspose_slides_cloud/models/add_slide.rb +286 -0
  23. data/lib/aspose_slides_cloud/models/api_info.rb +205 -0
  24. data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +257 -22
  25. data/lib/aspose_slides_cloud/models/audio_frame.rb +573 -0
  26. data/lib/aspose_slides_cloud/models/axes.rb +225 -0
  27. data/lib/aspose_slides_cloud/models/axis.rb +847 -0
  28. data/lib/aspose_slides_cloud/models/base64_input_file.rb +256 -0
  29. data/lib/aspose_slides_cloud/models/blur_effect.rb +215 -0
  30. data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +230 -0
  31. data/lib/aspose_slides_cloud/models/bubble_series.rb +463 -0
  32. data/lib/aspose_slides_cloud/models/chart.rb +543 -0
  33. data/lib/aspose_slides_cloud/models/chart_title.rb +210 -0
  34. data/lib/aspose_slides_cloud/models/chart_wall.rb +279 -0
  35. data/lib/aspose_slides_cloud/models/color_scheme.rb +258 -84
  36. data/lib/aspose_slides_cloud/models/connector.rb +487 -0
  37. data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +171 -13
  38. data/lib/aspose_slides_cloud/models/disc_usage.rb +215 -0
  39. data/lib/aspose_slides_cloud/models/document.rb +222 -46
  40. data/lib/aspose_slides_cloud/models/document_properties.rb +188 -36
  41. data/lib/aspose_slides_cloud/models/document_property.rb +209 -48
  42. data/lib/aspose_slides_cloud/models/document_replace_result.rb +272 -0
  43. data/lib/aspose_slides_cloud/models/effect.rb +412 -0
  44. data/lib/aspose_slides_cloud/models/effect_format.rb +265 -0
  45. data/lib/aspose_slides_cloud/models/error.rb +225 -0
  46. data/lib/aspose_slides_cloud/models/error_details.rb +210 -0
  47. data/lib/aspose_slides_cloud/models/export_format.rb +59 -0
  48. data/lib/aspose_slides_cloud/models/export_options.rb +194 -0
  49. data/lib/aspose_slides_cloud/models/file_version.rb +270 -0
  50. data/lib/aspose_slides_cloud/models/file_versions.rb +197 -0
  51. data/lib/aspose_slides_cloud/models/files_list.rb +197 -0
  52. data/lib/aspose_slides_cloud/models/files_upload_result.rb +209 -0
  53. data/lib/aspose_slides_cloud/models/fill_format.rb +204 -13
  54. data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +234 -0
  55. data/lib/aspose_slides_cloud/models/font_scheme.rb +204 -48
  56. data/lib/aspose_slides_cloud/models/font_set.rb +184 -22
  57. data/lib/aspose_slides_cloud/models/format_scheme.rb +210 -52
  58. data/lib/aspose_slides_cloud/models/geometry_shape.rb +439 -0
  59. data/lib/aspose_slides_cloud/models/glow_effect.rb +210 -0
  60. data/lib/aspose_slides_cloud/models/gradient_fill.rb +359 -0
  61. data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +210 -0
  62. data/lib/aspose_slides_cloud/models/graphical_object.rb +422 -0
  63. data/lib/aspose_slides_cloud/models/group_shape.rb +422 -0
  64. data/lib/aspose_slides_cloud/models/html_export_options.rb +392 -25
  65. data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +195 -0
  66. data/lib/aspose_slides_cloud/models/image.rb +216 -42
  67. data/lib/aspose_slides_cloud/models/image_export_format.rb +43 -0
  68. data/lib/aspose_slides_cloud/models/image_export_options.rb +298 -0
  69. data/lib/aspose_slides_cloud/models/images.rb +188 -36
  70. data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +240 -0
  71. data/lib/aspose_slides_cloud/models/input.rb +215 -0
  72. data/lib/aspose_slides_cloud/models/input_file.rb +238 -0
  73. data/lib/aspose_slides_cloud/models/interactive_sequence.rb +212 -0
  74. data/lib/aspose_slides_cloud/models/layout_slide.rb +288 -0
  75. data/lib/aspose_slides_cloud/models/layout_slides.rb +219 -0
  76. data/lib/aspose_slides_cloud/models/legend.rb +339 -0
  77. data/lib/aspose_slides_cloud/models/line_format.rb +349 -54
  78. data/lib/aspose_slides_cloud/models/master_slide.rb +241 -0
  79. data/lib/aspose_slides_cloud/models/master_slides.rb +219 -0
  80. data/lib/aspose_slides_cloud/models/merge.rb +248 -0
  81. data/lib/aspose_slides_cloud/models/merging_source.rb +207 -0
  82. data/lib/aspose_slides_cloud/models/no_fill.rb +236 -0
  83. data/lib/aspose_slides_cloud/models/notes_slide.rb +227 -0
  84. data/lib/aspose_slides_cloud/models/notes_slide_export_format.rb +43 -0
  85. data/lib/aspose_slides_cloud/models/object_exist.rb +215 -0
  86. data/lib/aspose_slides_cloud/models/ole_object_frame.rb +447 -0
  87. data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +200 -0
  88. data/lib/aspose_slides_cloud/models/one_value_series.rb +463 -0
  89. data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +171 -13
  90. data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +240 -0
  91. data/lib/aspose_slides_cloud/models/output_file.rb +228 -0
  92. data/lib/aspose_slides_cloud/models/paragraph.rb +494 -34
  93. data/lib/aspose_slides_cloud/models/paragraphs.rb +187 -35
  94. data/lib/aspose_slides_cloud/models/path_input_file.rb +266 -0
  95. data/lib/aspose_slides_cloud/models/path_output_file.rb +256 -0
  96. data/lib/aspose_slides_cloud/models/pattern_fill.rb +283 -0
  97. data/lib/aspose_slides_cloud/models/pdf_export_options.rb +467 -49
  98. data/lib/aspose_slides_cloud/models/picture_fill.rb +368 -0
  99. data/lib/aspose_slides_cloud/models/picture_frame.rb +459 -0
  100. data/lib/aspose_slides_cloud/models/pipeline.rb +207 -0
  101. data/lib/aspose_slides_cloud/models/placeholder.rb +294 -56
  102. data/lib/aspose_slides_cloud/models/placeholders.rb +188 -36
  103. data/lib/aspose_slides_cloud/models/plot_area.rb +324 -0
  104. data/lib/aspose_slides_cloud/models/portion.rb +564 -46
  105. data/lib/aspose_slides_cloud/models/portions.rb +219 -0
  106. data/lib/aspose_slides_cloud/models/pptx_export_options.rb +246 -0
  107. data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +188 -18
  108. data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +185 -15
  109. data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +274 -0
  110. data/lib/aspose_slides_cloud/models/reflection_effect.rb +429 -0
  111. data/lib/aspose_slides_cloud/models/remove_shape.rb +246 -0
  112. data/lib/aspose_slides_cloud/models/remove_slide.rb +251 -0
  113. data/lib/aspose_slides_cloud/models/reorder_slide.rb +266 -0
  114. data/lib/aspose_slides_cloud/models/replace_text.rb +286 -0
  115. data/lib/aspose_slides_cloud/models/request_input_file.rb +261 -0
  116. data/lib/aspose_slides_cloud/models/reset_slide.rb +251 -0
  117. data/lib/aspose_slides_cloud/models/resource_base.rb +207 -0
  118. data/lib/aspose_slides_cloud/models/resource_uri.rb +190 -26
  119. data/lib/aspose_slides_cloud/models/resource_uri_element.rb +171 -13
  120. data/lib/aspose_slides_cloud/models/response_output_file.rb +236 -0
  121. data/lib/aspose_slides_cloud/models/save.rb +283 -0
  122. data/lib/aspose_slides_cloud/models/save_shape.rb +293 -0
  123. data/lib/aspose_slides_cloud/models/save_slide.rb +318 -0
  124. data/lib/aspose_slides_cloud/models/scale_type.rb +41 -0
  125. data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +215 -0
  126. data/lib/aspose_slides_cloud/models/scatter_series.rb +463 -0
  127. data/lib/aspose_slides_cloud/models/series.rb +424 -0
  128. data/lib/aspose_slides_cloud/models/series_marker.rb +279 -0
  129. data/lib/aspose_slides_cloud/models/shape.rb +398 -100
  130. data/lib/aspose_slides_cloud/models/shape_base.rb +406 -0
  131. data/lib/aspose_slides_cloud/models/shape_export_format.rb +44 -0
  132. data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +274 -0
  133. data/lib/aspose_slides_cloud/models/shape_thumbnail_bounds.rb +41 -0
  134. data/lib/aspose_slides_cloud/models/shapes.rb +219 -0
  135. data/lib/aspose_slides_cloud/models/size_type.rb +55 -0
  136. data/lib/aspose_slides_cloud/models/slide.rb +277 -66
  137. data/lib/aspose_slides_cloud/models/slide_animation.rb +231 -0
  138. data/lib/aspose_slides_cloud/models/slide_background.rb +245 -42
  139. data/lib/aspose_slides_cloud/models/slide_comment.rb +198 -24
  140. data/lib/aspose_slides_cloud/models/slide_comments.rb +188 -36
  141. data/lib/aspose_slides_cloud/models/slide_export_format.rb +58 -0
  142. data/lib/aspose_slides_cloud/models/slide_replace_result.rb +347 -0
  143. data/lib/aspose_slides_cloud/models/slides.rb +188 -36
  144. data/lib/aspose_slides_cloud/models/smart_art.rb +530 -0
  145. data/lib/aspose_slides_cloud/models/smart_art_node.rb +281 -0
  146. data/lib/aspose_slides_cloud/models/smart_art_shape.rb +422 -0
  147. data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +200 -0
  148. data/lib/aspose_slides_cloud/models/solid_fill.rb +246 -0
  149. data/lib/aspose_slides_cloud/models/split_document_result.rb +188 -36
  150. data/lib/aspose_slides_cloud/models/storage_exist.rb +200 -0
  151. data/lib/aspose_slides_cloud/models/storage_file.rb +245 -0
  152. data/lib/aspose_slides_cloud/models/svg_export_options.rb +378 -0
  153. data/lib/aspose_slides_cloud/models/swf_export_options.rb +528 -0
  154. data/lib/aspose_slides_cloud/models/table.rb +578 -0
  155. data/lib/aspose_slides_cloud/models/table_cell.rb +431 -0
  156. data/lib/aspose_slides_cloud/models/table_column.rb +200 -0
  157. data/lib/aspose_slides_cloud/models/table_row.rb +227 -0
  158. data/lib/aspose_slides_cloud/models/task.rb +228 -0
  159. data/lib/aspose_slides_cloud/models/text_item.rb +178 -18
  160. data/lib/aspose_slides_cloud/models/text_items.rb +188 -36
  161. data/lib/aspose_slides_cloud/models/theme.rb +210 -52
  162. data/lib/aspose_slides_cloud/models/tiff_export_options.rb +385 -40
  163. data/lib/aspose_slides_cloud/models/update_background.rb +258 -0
  164. data/lib/aspose_slides_cloud/models/update_shape.rb +256 -0
  165. data/lib/aspose_slides_cloud/models/video_frame.rb +543 -0
  166. data/lib/aspose_slides_cloud/models/xps_export_options.rb +242 -0
  167. data/lib/aspose_slides_cloud/version.rb +23 -1
  168. data/spec/api/slides_api_spec.rb +24188 -0
  169. data/spec/extra/extra_spec.rb +84 -0
  170. data/spec/spec_helper.rb +122 -0
  171. data/spec/spec_utils.rb +154 -0
  172. data/testConfig.json +7 -0
  173. data/testRules.json +333 -0
  174. metadata +273 -61
  175. data/lib/aspose_slides_cloud/models/base_object.rb +0 -86
  176. data/lib/aspose_slides_cloud/models/base_response.rb +0 -53
  177. data/lib/aspose_slides_cloud/models/color.rb +0 -29
  178. data/lib/aspose_slides_cloud/models/color_scheme_response.rb +0 -61
  179. data/lib/aspose_slides_cloud/models/common_response.rb +0 -53
  180. data/lib/aspose_slides_cloud/models/document_properties_response.rb +0 -61
  181. data/lib/aspose_slides_cloud/models/document_property_response.rb +0 -61
  182. data/lib/aspose_slides_cloud/models/document_response.rb +0 -61
  183. data/lib/aspose_slides_cloud/models/font_scheme_response.rb +0 -61
  184. data/lib/aspose_slides_cloud/models/format_scheme_response.rb +0 -61
  185. data/lib/aspose_slides_cloud/models/images_response.rb +0 -61
  186. data/lib/aspose_slides_cloud/models/new_shape_response.rb +0 -61
  187. data/lib/aspose_slides_cloud/models/paragraph_portion_response.rb +0 -61
  188. data/lib/aspose_slides_cloud/models/placeholder_response.rb +0 -61
  189. data/lib/aspose_slides_cloud/models/placeholders_response.rb +0 -61
  190. data/lib/aspose_slides_cloud/models/presentation_string_replace_response.rb +0 -69
  191. data/lib/aspose_slides_cloud/models/shape_list.rb +0 -67
  192. data/lib/aspose_slides_cloud/models/shape_paragraph_response.rb +0 -61
  193. data/lib/aspose_slides_cloud/models/shape_paragraphs_response.rb +0 -61
  194. data/lib/aspose_slides_cloud/models/shape_response.rb +0 -61
  195. data/lib/aspose_slides_cloud/models/slide_background_response.rb +0 -61
  196. data/lib/aspose_slides_cloud/models/slide_comments_response.rb +0 -61
  197. data/lib/aspose_slides_cloud/models/slide_list_response.rb +0 -61
  198. data/lib/aspose_slides_cloud/models/slide_response.rb +0 -61
  199. data/lib/aspose_slides_cloud/models/slide_string_replace_response.rb +0 -69
  200. data/lib/aspose_slides_cloud/models/split_document_response.rb +0 -61
  201. data/lib/aspose_slides_cloud/models/text_items_response.rb +0 -61
  202. data/lib/aspose_slides_cloud/models/theme_response.rb +0 -61
  203. data/test/slides_tests.rb +0 -580
@@ -1,62 +1,97 @@
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
+
1
25
  module AsposeSlidesCloud
2
- #
3
- class ColorScheme < BaseObject
4
- attr_accessor :accent1, :accent2, :accent3, :accent4, :accent5, :accent6, :dark1, :dark2, :followed_hyperlink, :hyperlink, :light1, :light2, :self_uri, :alternate_links, :links
5
- # attribute mapping from ruby-style variable name to JSON key
26
+ # Slide's color scheme DTO
27
+ class ColorScheme
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
+ # First accent color.
35
+ attr_accessor :accent1
36
+
37
+ # Second accent color.
38
+ attr_accessor :accent2
39
+
40
+ # Third accent color.
41
+ attr_accessor :accent3
42
+
43
+ # Fourth accent color.
44
+ attr_accessor :accent4
45
+
46
+ # Fifth accent color.
47
+ attr_accessor :accent5
48
+
49
+ # Sixth accent color.
50
+ attr_accessor :accent6
51
+
52
+ # First dark color.
53
+ attr_accessor :dark1
54
+
55
+ # Second dark color.
56
+ attr_accessor :dark2
57
+
58
+ # Visited hyperlink color.
59
+ attr_accessor :followed_hyperlink
60
+
61
+ # Hyperlink color/
62
+ attr_accessor :hyperlink
63
+
64
+ # First light color.
65
+ attr_accessor :light1
66
+
67
+ # Second light color.
68
+ attr_accessor :light2
69
+
70
+ # Attribute mapping from ruby-style variable name to JSON key.
6
71
  def self.attribute_map
7
72
  {
8
-
9
- #
73
+ :'self_uri' => :'SelfUri',
74
+ :'alternate_links' => :'AlternateLinks',
10
75
  :'accent1' => :'Accent1',
11
-
12
- #
13
76
  :'accent2' => :'Accent2',
14
-
15
- #
16
77
  :'accent3' => :'Accent3',
17
-
18
- #
19
78
  :'accent4' => :'Accent4',
20
-
21
- #
22
79
  :'accent5' => :'Accent5',
23
-
24
- #
25
80
  :'accent6' => :'Accent6',
26
-
27
- #
28
81
  :'dark1' => :'Dark1',
29
-
30
- #
31
82
  :'dark2' => :'Dark2',
32
-
33
- #
34
83
  :'followed_hyperlink' => :'FollowedHyperlink',
35
-
36
- #
37
84
  :'hyperlink' => :'Hyperlink',
38
-
39
- #
40
85
  :'light1' => :'Light1',
41
-
42
- #
43
- :'light2' => :'Light2',
44
-
45
- #
46
- :'self_uri' => :'SelfUri',
47
-
48
- #
49
- :'alternate_links' => :'AlternateLinks',
50
-
51
- #
52
- :'links' => :'Links'
53
-
86
+ :'light2' => :'Light2'
54
87
  }
55
88
  end
56
89
 
57
- # attribute type
90
+ # Attribute type mapping.
58
91
  def self.swagger_types
59
92
  {
93
+ :'self_uri' => :'ResourceUri',
94
+ :'alternate_links' => :'Array<ResourceUri>',
60
95
  :'accent1' => :'String',
61
96
  :'accent2' => :'String',
62
97
  :'accent3' => :'String',
@@ -68,86 +103,225 @@ module AsposeSlidesCloud
68
103
  :'followed_hyperlink' => :'String',
69
104
  :'hyperlink' => :'String',
70
105
  :'light1' => :'String',
71
- :'light2' => :'String',
72
- :'self_uri' => :'ResourceUri',
73
- :'alternate_links' => :'Array<ResourceUri>',
74
- :'links' => :'Array<ResourceUri>'
75
-
106
+ :'light2' => :'String'
76
107
  }
77
108
  end
78
109
 
110
+ # Initializes the object
111
+ # @param [Hash] attributes Model attributes in the form of hash
79
112
  def initialize(attributes = {})
80
- return if !attributes.is_a?(Hash) || attributes.empty?
113
+ return unless attributes.is_a?(Hash)
81
114
 
82
115
  # convert string to symbol for hash key
83
- attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
116
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
84
117
 
85
-
86
- if attributes[:'Accent1']
118
+ if attributes.has_key?(:'SelfUri')
119
+ self.self_uri = attributes[:'SelfUri']
120
+ end
121
+
122
+ if attributes.has_key?(:'AlternateLinks')
123
+ if (value = attributes[:'AlternateLinks']).is_a?(Array)
124
+ self.alternate_links = value
125
+ end
126
+ end
127
+
128
+ if attributes.has_key?(:'Accent1')
87
129
  self.accent1 = attributes[:'Accent1']
88
130
  end
89
-
90
- if attributes[:'Accent2']
131
+
132
+ if attributes.has_key?(:'Accent2')
91
133
  self.accent2 = attributes[:'Accent2']
92
134
  end
93
-
94
- if attributes[:'Accent3']
135
+
136
+ if attributes.has_key?(:'Accent3')
95
137
  self.accent3 = attributes[:'Accent3']
96
138
  end
97
-
98
- if attributes[:'Accent4']
139
+
140
+ if attributes.has_key?(:'Accent4')
99
141
  self.accent4 = attributes[:'Accent4']
100
142
  end
101
-
102
- if attributes[:'Accent5']
143
+
144
+ if attributes.has_key?(:'Accent5')
103
145
  self.accent5 = attributes[:'Accent5']
104
146
  end
105
-
106
- if attributes[:'Accent6']
147
+
148
+ if attributes.has_key?(:'Accent6')
107
149
  self.accent6 = attributes[:'Accent6']
108
150
  end
109
-
110
- if attributes[:'Dark1']
151
+
152
+ if attributes.has_key?(:'Dark1')
111
153
  self.dark1 = attributes[:'Dark1']
112
154
  end
113
-
114
- if attributes[:'Dark2']
155
+
156
+ if attributes.has_key?(:'Dark2')
115
157
  self.dark2 = attributes[:'Dark2']
116
158
  end
117
-
118
- if attributes[:'FollowedHyperlink']
159
+
160
+ if attributes.has_key?(:'FollowedHyperlink')
119
161
  self.followed_hyperlink = attributes[:'FollowedHyperlink']
120
162
  end
121
-
122
- if attributes[:'Hyperlink']
163
+
164
+ if attributes.has_key?(:'Hyperlink')
123
165
  self.hyperlink = attributes[:'Hyperlink']
124
166
  end
125
-
126
- if attributes[:'Light1']
167
+
168
+ if attributes.has_key?(:'Light1')
127
169
  self.light1 = attributes[:'Light1']
128
170
  end
129
-
130
- if attributes[:'Light2']
171
+
172
+ if attributes.has_key?(:'Light2')
131
173
  self.light2 = attributes[:'Light2']
132
174
  end
133
-
134
- if attributes[:'SelfUri']
135
- self.self_uri = attributes[:'SelfUri']
175
+ end
176
+
177
+ # Show invalid properties with the reasons. Usually used together with valid?
178
+ # @return Array for valid properties with the reasons
179
+ def list_invalid_properties
180
+ invalid_properties = Array.new
181
+ invalid_properties
182
+ end
183
+
184
+ # Check to see if the all the properties in the model are valid
185
+ # @return true if the model is valid
186
+ def valid?
187
+ true
188
+ end
189
+
190
+ # Checks equality by comparing each attribute.
191
+ # @param [Object] Object to be compared
192
+ def ==(o)
193
+ return true if self.equal?(o)
194
+ self.class == o.class &&
195
+ self_uri == o.self_uri &&
196
+ alternate_links == o.alternate_links &&
197
+ accent1 == o.accent1 &&
198
+ accent2 == o.accent2 &&
199
+ accent3 == o.accent3 &&
200
+ accent4 == o.accent4 &&
201
+ accent5 == o.accent5 &&
202
+ accent6 == o.accent6 &&
203
+ dark1 == o.dark1 &&
204
+ dark2 == o.dark2 &&
205
+ followed_hyperlink == o.followed_hyperlink &&
206
+ hyperlink == o.hyperlink &&
207
+ light1 == o.light1 &&
208
+ light2 == o.light2
209
+ end
210
+
211
+ # @see the `==` method
212
+ # @param [Object] Object to be compared
213
+ def eql?(o)
214
+ self == o
215
+ end
216
+
217
+ # Calculates hash code according to all attributes.
218
+ # @return [Fixnum] Hash code
219
+ def hash
220
+ [self_uri, alternate_links, accent1, accent2, accent3, accent4, accent5, accent6, dark1, dark2, followed_hyperlink, hyperlink, light1, light2].hash
221
+ end
222
+
223
+ # Builds the object from hash
224
+ # @param [Hash] attributes Model attributes in the form of hash
225
+ # @return [Object] Returns the model itself
226
+ def build_from_hash(attributes)
227
+ return nil unless attributes.is_a?(Hash)
228
+ self.class.swagger_types.each_pair do |key, type|
229
+ if type =~ /\AArray<(.*)>/i
230
+ # check to ensure the input is an array given that the the attribute
231
+ # is documented as an array but the input is not
232
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
233
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
234
+ end
235
+ elsif !attributes[self.class.attribute_map[key]].nil?
236
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
237
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
136
238
  end
137
-
138
- if attributes[:'AlternateLinks']
139
- if (value = attributes[:'AlternateLinks']).is_a?(Array)
140
- self.alternate_links = value
239
+
240
+ self
241
+ end
242
+
243
+ # Deserializes the data based on type
244
+ # @param string type Data type
245
+ # @param string value Value to be deserialized
246
+ # @return [Object] Deserialized data
247
+ def _deserialize(type, value)
248
+ case type.to_sym
249
+ when :DateTime
250
+ DateTime.parse(value)
251
+ when :Date
252
+ Date.parse(value)
253
+ when :String
254
+ value.to_s
255
+ when :Integer
256
+ value.to_i
257
+ when :Float
258
+ value.to_f
259
+ when :BOOLEAN
260
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
261
+ true
262
+ else
263
+ false
141
264
  end
142
- end
143
-
144
- if attributes[:'Links']
145
- if (value = attributes[:'Links']).is_a?(Array)
146
- self.links = value
265
+ when :Object
266
+ # generic object (usually a Hash), return directly
267
+ value
268
+ when /\AArray<(?<inner_type>.+)>\z/
269
+ inner_type = Regexp.last_match[:inner_type]
270
+ value.map { |v| _deserialize(inner_type, v) }
271
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
272
+ k_type = Regexp.last_match[:k_type]
273
+ v_type = Regexp.last_match[:v_type]
274
+ {}.tap do |hash|
275
+ value.each do |k, v|
276
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
277
+ end
147
278
  end
279
+ else # model
280
+ temp_model = AsposeSlidesCloud.const_get(type).new
281
+ temp_model.build_from_hash(value)
282
+ end
283
+ end
284
+
285
+ # Returns the string representation of the object
286
+ # @return [String] String presentation of the object
287
+ def to_s
288
+ to_hash.to_s
289
+ end
290
+
291
+ # to_body is an alias to to_hash (backward compatibility)
292
+ # @return [Hash] Returns the object in the form of hash
293
+ def to_body
294
+ to_hash
295
+ end
296
+
297
+ # Returns the object in the form of hash
298
+ # @return [Hash] Returns the object in the form of hash
299
+ def to_hash
300
+ hash = {}
301
+ self.class.attribute_map.each_pair do |attr, param|
302
+ value = self.send(attr)
303
+ next if value.nil?
304
+ hash[param] = _to_hash(value)
148
305
  end
149
-
306
+ hash
150
307
  end
151
308
 
309
+ # Outputs non-array value in the form of hash
310
+ # For object, use to_hash. Otherwise, just return the value
311
+ # @param [Object] value Any valid value
312
+ # @return [Hash] Returns the value in the form of hash
313
+ def _to_hash(value)
314
+ if value.is_a?(Array)
315
+ value.compact.map { |v| _to_hash(v) }
316
+ elsif value.is_a?(Hash)
317
+ {}.tap do |hash|
318
+ value.each { |k, v| hash[k] = _to_hash(v) }
319
+ end
320
+ elsif value.respond_to? :to_hash
321
+ value.to_hash
322
+ else
323
+ value
324
+ end
325
+ end
152
326
  end
153
327
  end
@@ -0,0 +1,487 @@
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 Connector resource.
27
+ class Connector
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
+ # Gets or sets the name.
35
+ attr_accessor :name
36
+
37
+ # Gets or sets the width.
38
+ attr_accessor :width
39
+
40
+ # Gets or sets the height.
41
+ attr_accessor :height
42
+
43
+ # Gets or sets the alternative text.
44
+ attr_accessor :alternative_text
45
+
46
+ # The title of alternative text associated with the shape.
47
+ attr_accessor :alternative_text_title
48
+
49
+ # Gets or sets a value indicating whether this ShapeBase is hidden.
50
+ attr_accessor :hidden
51
+
52
+ # Gets or sets the X
53
+ attr_accessor :x
54
+
55
+ # Gets or sets the Y.
56
+ attr_accessor :y
57
+
58
+ # Gets z-order position of shape
59
+ attr_accessor :z_order_position
60
+
61
+ # Gets or sets the link to shapes.
62
+ attr_accessor :shapes
63
+
64
+ # Gets or sets the fill format.
65
+ attr_accessor :fill_format
66
+
67
+ # Gets or sets the effect format.
68
+ attr_accessor :effect_format
69
+
70
+ # Gets or sets the line format.
71
+ attr_accessor :line_format
72
+
73
+ # Shape type.
74
+ attr_accessor :type
75
+
76
+ # Shape type.
77
+ attr_accessor :shape_type
78
+
79
+ # Geometry shape type.
80
+ attr_accessor :geometry_shape_type
81
+
82
+ # Start shape link.
83
+ attr_accessor :start_shape_connected_to
84
+
85
+ # Start shape index.
86
+ attr_accessor :start_shape_connected_to_index
87
+
88
+ # End shape link.
89
+ attr_accessor :end_shape_connected_to
90
+
91
+ # End shape index.
92
+ attr_accessor :end_shape_connected_to_index
93
+
94
+ class EnumAttributeValidator
95
+ attr_reader :datatype
96
+ attr_reader :allowable_values
97
+
98
+ def initialize(datatype, allowable_values)
99
+ @allowable_values = allowable_values.map do |value|
100
+ case datatype.to_s
101
+ when /Integer/i
102
+ value.to_i
103
+ when /Float/i
104
+ value.to_f
105
+ else
106
+ value
107
+ end
108
+ end
109
+ end
110
+
111
+ def valid?(value)
112
+ !value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
113
+ end
114
+ end
115
+
116
+ # Attribute mapping from ruby-style variable name to JSON key.
117
+ def self.attribute_map
118
+ {
119
+ :'self_uri' => :'SelfUri',
120
+ :'alternate_links' => :'AlternateLinks',
121
+ :'name' => :'Name',
122
+ :'width' => :'Width',
123
+ :'height' => :'Height',
124
+ :'alternative_text' => :'AlternativeText',
125
+ :'alternative_text_title' => :'AlternativeTextTitle',
126
+ :'hidden' => :'Hidden',
127
+ :'x' => :'X',
128
+ :'y' => :'Y',
129
+ :'z_order_position' => :'ZOrderPosition',
130
+ :'shapes' => :'Shapes',
131
+ :'fill_format' => :'FillFormat',
132
+ :'effect_format' => :'EffectFormat',
133
+ :'line_format' => :'LineFormat',
134
+ :'type' => :'Type',
135
+ :'shape_type' => :'ShapeType',
136
+ :'geometry_shape_type' => :'GeometryShapeType',
137
+ :'start_shape_connected_to' => :'StartShapeConnectedTo',
138
+ :'start_shape_connected_to_index' => :'StartShapeConnectedToIndex',
139
+ :'end_shape_connected_to' => :'EndShapeConnectedTo',
140
+ :'end_shape_connected_to_index' => :'EndShapeConnectedToIndex'
141
+ }
142
+ end
143
+
144
+ # Attribute type mapping.
145
+ def self.swagger_types
146
+ {
147
+ :'self_uri' => :'ResourceUri',
148
+ :'alternate_links' => :'Array<ResourceUri>',
149
+ :'name' => :'String',
150
+ :'width' => :'Float',
151
+ :'height' => :'Float',
152
+ :'alternative_text' => :'String',
153
+ :'alternative_text_title' => :'String',
154
+ :'hidden' => :'BOOLEAN',
155
+ :'x' => :'Float',
156
+ :'y' => :'Float',
157
+ :'z_order_position' => :'Integer',
158
+ :'shapes' => :'ResourceUriElement',
159
+ :'fill_format' => :'FillFormat',
160
+ :'effect_format' => :'EffectFormat',
161
+ :'line_format' => :'LineFormat',
162
+ :'type' => :'String',
163
+ :'shape_type' => :'String',
164
+ :'geometry_shape_type' => :'String',
165
+ :'start_shape_connected_to' => :'ResourceUri',
166
+ :'start_shape_connected_to_index' => :'Integer',
167
+ :'end_shape_connected_to' => :'ResourceUri',
168
+ :'end_shape_connected_to_index' => :'Integer'
169
+ }
170
+ end
171
+
172
+ # Initializes the object
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ def initialize(attributes = {})
175
+ return unless attributes.is_a?(Hash)
176
+
177
+ # convert string to symbol for hash key
178
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
179
+
180
+ if attributes.has_key?(:'SelfUri')
181
+ self.self_uri = attributes[:'SelfUri']
182
+ end
183
+
184
+ if attributes.has_key?(:'AlternateLinks')
185
+ if (value = attributes[:'AlternateLinks']).is_a?(Array)
186
+ self.alternate_links = value
187
+ end
188
+ end
189
+
190
+ if attributes.has_key?(:'Name')
191
+ self.name = attributes[:'Name']
192
+ end
193
+
194
+ if attributes.has_key?(:'Width')
195
+ self.width = attributes[:'Width']
196
+ end
197
+
198
+ if attributes.has_key?(:'Height')
199
+ self.height = attributes[:'Height']
200
+ end
201
+
202
+ if attributes.has_key?(:'AlternativeText')
203
+ self.alternative_text = attributes[:'AlternativeText']
204
+ end
205
+
206
+ if attributes.has_key?(:'AlternativeTextTitle')
207
+ self.alternative_text_title = attributes[:'AlternativeTextTitle']
208
+ end
209
+
210
+ if attributes.has_key?(:'Hidden')
211
+ self.hidden = attributes[:'Hidden']
212
+ end
213
+
214
+ if attributes.has_key?(:'X')
215
+ self.x = attributes[:'X']
216
+ end
217
+
218
+ if attributes.has_key?(:'Y')
219
+ self.y = attributes[:'Y']
220
+ end
221
+
222
+ if attributes.has_key?(:'ZOrderPosition')
223
+ self.z_order_position = attributes[:'ZOrderPosition']
224
+ end
225
+
226
+ if attributes.has_key?(:'Shapes')
227
+ self.shapes = attributes[:'Shapes']
228
+ end
229
+
230
+ if attributes.has_key?(:'FillFormat')
231
+ self.fill_format = attributes[:'FillFormat']
232
+ end
233
+
234
+ if attributes.has_key?(:'EffectFormat')
235
+ self.effect_format = attributes[:'EffectFormat']
236
+ end
237
+
238
+ if attributes.has_key?(:'LineFormat')
239
+ self.line_format = attributes[:'LineFormat']
240
+ end
241
+
242
+ if attributes.has_key?(:'Type')
243
+ self.type = attributes[:'Type']
244
+ else
245
+ self.type = "Connector"
246
+ end
247
+
248
+ if attributes.has_key?(:'ShapeType')
249
+ self.shape_type = attributes[:'ShapeType']
250
+ end
251
+
252
+ if attributes.has_key?(:'GeometryShapeType')
253
+ self.geometry_shape_type = attributes[:'GeometryShapeType']
254
+ end
255
+
256
+ if attributes.has_key?(:'StartShapeConnectedTo')
257
+ self.start_shape_connected_to = attributes[:'StartShapeConnectedTo']
258
+ end
259
+
260
+ if attributes.has_key?(:'StartShapeConnectedToIndex')
261
+ self.start_shape_connected_to_index = attributes[:'StartShapeConnectedToIndex']
262
+ end
263
+
264
+ if attributes.has_key?(:'EndShapeConnectedTo')
265
+ self.end_shape_connected_to = attributes[:'EndShapeConnectedTo']
266
+ end
267
+
268
+ if attributes.has_key?(:'EndShapeConnectedToIndex')
269
+ self.end_shape_connected_to_index = attributes[:'EndShapeConnectedToIndex']
270
+ end
271
+ end
272
+
273
+ # Show invalid properties with the reasons. Usually used together with valid?
274
+ # @return Array for valid properties with the reasons
275
+ def list_invalid_properties
276
+ invalid_properties = Array.new
277
+ if @z_order_position.nil?
278
+ invalid_properties.push('invalid value for "z_order_position", z_order_position cannot be nil.')
279
+ end
280
+
281
+ if @type.nil?
282
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
283
+ end
284
+
285
+ if @shape_type.nil?
286
+ invalid_properties.push('invalid value for "shape_type", shape_type cannot be nil.')
287
+ end
288
+
289
+ if @geometry_shape_type.nil?
290
+ invalid_properties.push('invalid value for "geometry_shape_type", geometry_shape_type cannot be nil.')
291
+ end
292
+
293
+ invalid_properties
294
+ end
295
+
296
+ # Check to see if the all the properties in the model are valid
297
+ # @return true if the model is valid
298
+ def valid?
299
+ return false if @z_order_position.nil?
300
+ return false if @type.nil?
301
+ type_validator = EnumAttributeValidator.new('String', ['Shape', 'Chart', 'Table', 'PictureFrame', 'VideoFrame', 'AudioFrame', 'SmartArt', 'OleObjectFrame', 'GroupShape', 'GraphicalObject', 'Connector', 'SmartArtShape'])
302
+ return false unless type_validator.valid?(@type)
303
+ return false if @shape_type.nil?
304
+ shape_type_validator = EnumAttributeValidator.new('String', ['Custom', 'Line', 'LineInverse', 'Triangle', 'RightTriangle', 'Rectangle', 'Diamond', 'Parallelogram', 'Trapezoid', 'NonIsoscelesTrapezoid', 'Pentagon', 'Hexagon', 'Heptagon', 'Octagon', 'Decagon', 'Dodecagon', 'FourPointedStar', 'FivePointedStar', 'SixPointedStar', 'SevenPointedStar', 'EightPointedStar', 'TenPointedStar', 'TwelvePointedStar', 'SixteenPointedStar', 'TwentyFourPointedStar', 'ThirtyTwoPointedStar', 'RoundCornerRectangle', 'OneRoundCornerRectangle', 'TwoSamesideRoundCornerRectangle', 'TwoDiagonalRoundCornerRectangle', 'OneSnipOneRoundCornerRectangle', 'OneSnipCornerRectangle', 'TwoSamesideSnipCornerRectangle', 'TwoDiagonalSnipCornerRectangle', 'Plaque', 'Ellipse', 'Teardrop', 'HomePlate', 'Chevron', 'PieWedge', 'Pie', 'BlockArc', 'Donut', 'NoSmoking', 'RightArrow', 'LeftArrow', 'UpArrow', 'DownArrow', 'StripedRightArrow', 'NotchedRightArrow', 'BentUpArrow', 'LeftRightArrow', 'UpDownArrow', 'LeftUpArrow', 'LeftRightUpArrow', 'QuadArrow', 'CalloutLeftArrow', 'CalloutRightArrow', 'CalloutUpArrow', 'CalloutDownArrow', 'CalloutLeftRightArrow', 'CalloutUpDownArrow', 'CalloutQuadArrow', 'BentArrow', 'UTurnArrow', 'CircularArrow', 'LeftCircularArrow', 'LeftRightCircularArrow', 'CurvedRightArrow', 'CurvedLeftArrow', 'CurvedUpArrow', 'CurvedDownArrow', 'SwooshArrow', 'Cube', 'Can', 'LightningBolt', 'Heart', 'Sun', 'Moon', 'SmileyFace', 'IrregularSeal1', 'IrregularSeal2', 'FoldedCorner', 'Bevel', 'Frame', 'HalfFrame', 'Corner', 'DiagonalStripe', 'Chord', 'CurvedArc', 'LeftBracket', 'RightBracket', 'LeftBrace', 'RightBrace', 'BracketPair', 'BracePair', 'StraightConnector1', 'BentConnector2', 'BentConnector3', 'BentConnector4', 'BentConnector5', 'CurvedConnector2', 'CurvedConnector3', 'CurvedConnector4', 'CurvedConnector5', 'Callout1', 'Callout2', 'Callout3', 'Callout1WithAccent', 'Callout2WithAccent', 'Callout3WithAccent', 'Callout1WithBorder', 'Callout2WithBorder', 'Callout3WithBorder', 'Callout1WithBorderAndAccent', 'Callout2WithBorderAndAccent', 'Callout3WithBorderAndAccent', 'CalloutWedgeRectangle', 'CalloutWedgeRoundRectangle', 'CalloutWedgeEllipse', 'CalloutCloud', 'Cloud', 'Ribbon', 'Ribbon2', 'EllipseRibbon', 'EllipseRibbon2', 'LeftRightRibbon', 'VerticalScroll', 'HorizontalScroll', 'Wave', 'DoubleWave', 'Plus', 'ProcessFlow', 'DecisionFlow', 'InputOutputFlow', 'PredefinedProcessFlow', 'InternalStorageFlow', 'DocumentFlow', 'MultiDocumentFlow', 'TerminatorFlow', 'PreparationFlow', 'ManualInputFlow', 'ManualOperationFlow', 'ConnectorFlow', 'PunchedCardFlow', 'PunchedTapeFlow', 'SummingJunctionFlow', 'OrFlow', 'CollateFlow', 'SortFlow', 'ExtractFlow', 'MergeFlow', 'OfflineStorageFlow', 'OnlineStorageFlow', 'MagneticTapeFlow', 'MagneticDiskFlow', 'MagneticDrumFlow', 'DisplayFlow', 'DelayFlow', 'AlternateProcessFlow', 'OffPageConnectorFlow', 'BlankButton', 'HomeButton', 'HelpButton', 'InformationButton', 'ForwardOrNextButton', 'BackOrPreviousButton', 'EndButton', 'BeginningButton', 'ReturnButton', 'DocumentButton', 'SoundButton', 'MovieButton', 'Gear6', 'Gear9', 'Funnel', 'PlusMath', 'MinusMath', 'MultiplyMath', 'DivideMath', 'EqualMath', 'NotEqualMath', 'CornerTabs', 'SquareTabs', 'PlaqueTabs', 'ChartX', 'ChartStar', 'ChartPlus', 'Chart', 'Table', 'PictureFrame', 'VideoFrame', 'AudioFrame', 'Diagram', 'OleObjectFrame', 'GroupShape', 'GraphicalObject', 'NotDefined'])
305
+ return false unless shape_type_validator.valid?(@shape_type)
306
+ return false if @geometry_shape_type.nil?
307
+ geometry_shape_type_validator = EnumAttributeValidator.new('String', ['Custom', 'Line', 'LineInverse', 'Triangle', 'RightTriangle', 'Rectangle', 'Diamond', 'Parallelogram', 'Trapezoid', 'NonIsoscelesTrapezoid', 'Pentagon', 'Hexagon', 'Heptagon', 'Octagon', 'Decagon', 'Dodecagon', 'FourPointedStar', 'FivePointedStar', 'SixPointedStar', 'SevenPointedStar', 'EightPointedStar', 'TenPointedStar', 'TwelvePointedStar', 'SixteenPointedStar', 'TwentyFourPointedStar', 'ThirtyTwoPointedStar', 'RoundCornerRectangle', 'OneRoundCornerRectangle', 'TwoSamesideRoundCornerRectangle', 'TwoDiagonalRoundCornerRectangle', 'OneSnipOneRoundCornerRectangle', 'OneSnipCornerRectangle', 'TwoSamesideSnipCornerRectangle', 'TwoDiagonalSnipCornerRectangle', 'Plaque', 'Ellipse', 'Teardrop', 'HomePlate', 'Chevron', 'PieWedge', 'Pie', 'BlockArc', 'Donut', 'NoSmoking', 'RightArrow', 'LeftArrow', 'UpArrow', 'DownArrow', 'StripedRightArrow', 'NotchedRightArrow', 'BentUpArrow', 'LeftRightArrow', 'UpDownArrow', 'LeftUpArrow', 'LeftRightUpArrow', 'QuadArrow', 'CalloutLeftArrow', 'CalloutRightArrow', 'CalloutUpArrow', 'CalloutDownArrow', 'CalloutLeftRightArrow', 'CalloutUpDownArrow', 'CalloutQuadArrow', 'BentArrow', 'UTurnArrow', 'CircularArrow', 'LeftCircularArrow', 'LeftRightCircularArrow', 'CurvedRightArrow', 'CurvedLeftArrow', 'CurvedUpArrow', 'CurvedDownArrow', 'SwooshArrow', 'Cube', 'Can', 'LightningBolt', 'Heart', 'Sun', 'Moon', 'SmileyFace', 'IrregularSeal1', 'IrregularSeal2', 'FoldedCorner', 'Bevel', 'Frame', 'HalfFrame', 'Corner', 'DiagonalStripe', 'Chord', 'CurvedArc', 'LeftBracket', 'RightBracket', 'LeftBrace', 'RightBrace', 'BracketPair', 'BracePair', 'StraightConnector1', 'BentConnector2', 'BentConnector3', 'BentConnector4', 'BentConnector5', 'CurvedConnector2', 'CurvedConnector3', 'CurvedConnector4', 'CurvedConnector5', 'Callout1', 'Callout2', 'Callout3', 'Callout1WithAccent', 'Callout2WithAccent', 'Callout3WithAccent', 'Callout1WithBorder', 'Callout2WithBorder', 'Callout3WithBorder', 'Callout1WithBorderAndAccent', 'Callout2WithBorderAndAccent', 'Callout3WithBorderAndAccent', 'CalloutWedgeRectangle', 'CalloutWedgeRoundRectangle', 'CalloutWedgeEllipse', 'CalloutCloud', 'Cloud', 'Ribbon', 'Ribbon2', 'EllipseRibbon', 'EllipseRibbon2', 'LeftRightRibbon', 'VerticalScroll', 'HorizontalScroll', 'Wave', 'DoubleWave', 'Plus', 'ProcessFlow', 'DecisionFlow', 'InputOutputFlow', 'PredefinedProcessFlow', 'InternalStorageFlow', 'DocumentFlow', 'MultiDocumentFlow', 'TerminatorFlow', 'PreparationFlow', 'ManualInputFlow', 'ManualOperationFlow', 'ConnectorFlow', 'PunchedCardFlow', 'PunchedTapeFlow', 'SummingJunctionFlow', 'OrFlow', 'CollateFlow', 'SortFlow', 'ExtractFlow', 'MergeFlow', 'OfflineStorageFlow', 'OnlineStorageFlow', 'MagneticTapeFlow', 'MagneticDiskFlow', 'MagneticDrumFlow', 'DisplayFlow', 'DelayFlow', 'AlternateProcessFlow', 'OffPageConnectorFlow', 'BlankButton', 'HomeButton', 'HelpButton', 'InformationButton', 'ForwardOrNextButton', 'BackOrPreviousButton', 'EndButton', 'BeginningButton', 'ReturnButton', 'DocumentButton', 'SoundButton', 'MovieButton', 'Gear6', 'Gear9', 'Funnel', 'PlusMath', 'MinusMath', 'MultiplyMath', 'DivideMath', 'EqualMath', 'NotEqualMath', 'CornerTabs', 'SquareTabs', 'PlaqueTabs', 'ChartX', 'ChartStar', 'ChartPlus', 'NotDefined'])
308
+ return false unless geometry_shape_type_validator.valid?(@geometry_shape_type)
309
+ true
310
+ end
311
+
312
+ # Custom attribute writer method checking allowed values (enum).
313
+ # @param [Object] type Object to be assigned
314
+ def type=(type)
315
+ validator = EnumAttributeValidator.new('String', ['Shape', 'Chart', 'Table', 'PictureFrame', 'VideoFrame', 'AudioFrame', 'SmartArt', 'OleObjectFrame', 'GroupShape', 'GraphicalObject', 'Connector', 'SmartArtShape'])
316
+ unless validator.valid?(type)
317
+ fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
318
+ end
319
+ @type = type
320
+ end
321
+
322
+ # Custom attribute writer method checking allowed values (enum).
323
+ # @param [Object] shape_type Object to be assigned
324
+ def shape_type=(shape_type)
325
+ validator = EnumAttributeValidator.new('String', ['Custom', 'Line', 'LineInverse', 'Triangle', 'RightTriangle', 'Rectangle', 'Diamond', 'Parallelogram', 'Trapezoid', 'NonIsoscelesTrapezoid', 'Pentagon', 'Hexagon', 'Heptagon', 'Octagon', 'Decagon', 'Dodecagon', 'FourPointedStar', 'FivePointedStar', 'SixPointedStar', 'SevenPointedStar', 'EightPointedStar', 'TenPointedStar', 'TwelvePointedStar', 'SixteenPointedStar', 'TwentyFourPointedStar', 'ThirtyTwoPointedStar', 'RoundCornerRectangle', 'OneRoundCornerRectangle', 'TwoSamesideRoundCornerRectangle', 'TwoDiagonalRoundCornerRectangle', 'OneSnipOneRoundCornerRectangle', 'OneSnipCornerRectangle', 'TwoSamesideSnipCornerRectangle', 'TwoDiagonalSnipCornerRectangle', 'Plaque', 'Ellipse', 'Teardrop', 'HomePlate', 'Chevron', 'PieWedge', 'Pie', 'BlockArc', 'Donut', 'NoSmoking', 'RightArrow', 'LeftArrow', 'UpArrow', 'DownArrow', 'StripedRightArrow', 'NotchedRightArrow', 'BentUpArrow', 'LeftRightArrow', 'UpDownArrow', 'LeftUpArrow', 'LeftRightUpArrow', 'QuadArrow', 'CalloutLeftArrow', 'CalloutRightArrow', 'CalloutUpArrow', 'CalloutDownArrow', 'CalloutLeftRightArrow', 'CalloutUpDownArrow', 'CalloutQuadArrow', 'BentArrow', 'UTurnArrow', 'CircularArrow', 'LeftCircularArrow', 'LeftRightCircularArrow', 'CurvedRightArrow', 'CurvedLeftArrow', 'CurvedUpArrow', 'CurvedDownArrow', 'SwooshArrow', 'Cube', 'Can', 'LightningBolt', 'Heart', 'Sun', 'Moon', 'SmileyFace', 'IrregularSeal1', 'IrregularSeal2', 'FoldedCorner', 'Bevel', 'Frame', 'HalfFrame', 'Corner', 'DiagonalStripe', 'Chord', 'CurvedArc', 'LeftBracket', 'RightBracket', 'LeftBrace', 'RightBrace', 'BracketPair', 'BracePair', 'StraightConnector1', 'BentConnector2', 'BentConnector3', 'BentConnector4', 'BentConnector5', 'CurvedConnector2', 'CurvedConnector3', 'CurvedConnector4', 'CurvedConnector5', 'Callout1', 'Callout2', 'Callout3', 'Callout1WithAccent', 'Callout2WithAccent', 'Callout3WithAccent', 'Callout1WithBorder', 'Callout2WithBorder', 'Callout3WithBorder', 'Callout1WithBorderAndAccent', 'Callout2WithBorderAndAccent', 'Callout3WithBorderAndAccent', 'CalloutWedgeRectangle', 'CalloutWedgeRoundRectangle', 'CalloutWedgeEllipse', 'CalloutCloud', 'Cloud', 'Ribbon', 'Ribbon2', 'EllipseRibbon', 'EllipseRibbon2', 'LeftRightRibbon', 'VerticalScroll', 'HorizontalScroll', 'Wave', 'DoubleWave', 'Plus', 'ProcessFlow', 'DecisionFlow', 'InputOutputFlow', 'PredefinedProcessFlow', 'InternalStorageFlow', 'DocumentFlow', 'MultiDocumentFlow', 'TerminatorFlow', 'PreparationFlow', 'ManualInputFlow', 'ManualOperationFlow', 'ConnectorFlow', 'PunchedCardFlow', 'PunchedTapeFlow', 'SummingJunctionFlow', 'OrFlow', 'CollateFlow', 'SortFlow', 'ExtractFlow', 'MergeFlow', 'OfflineStorageFlow', 'OnlineStorageFlow', 'MagneticTapeFlow', 'MagneticDiskFlow', 'MagneticDrumFlow', 'DisplayFlow', 'DelayFlow', 'AlternateProcessFlow', 'OffPageConnectorFlow', 'BlankButton', 'HomeButton', 'HelpButton', 'InformationButton', 'ForwardOrNextButton', 'BackOrPreviousButton', 'EndButton', 'BeginningButton', 'ReturnButton', 'DocumentButton', 'SoundButton', 'MovieButton', 'Gear6', 'Gear9', 'Funnel', 'PlusMath', 'MinusMath', 'MultiplyMath', 'DivideMath', 'EqualMath', 'NotEqualMath', 'CornerTabs', 'SquareTabs', 'PlaqueTabs', 'ChartX', 'ChartStar', 'ChartPlus', 'Chart', 'Table', 'PictureFrame', 'VideoFrame', 'AudioFrame', 'Diagram', 'OleObjectFrame', 'GroupShape', 'GraphicalObject', 'NotDefined'])
326
+ unless validator.valid?(shape_type)
327
+ fail ArgumentError, 'invalid value for "shape_type", must be one of #{validator.allowable_values}.'
328
+ end
329
+ @shape_type = shape_type
330
+ end
331
+
332
+ # Custom attribute writer method checking allowed values (enum).
333
+ # @param [Object] geometry_shape_type Object to be assigned
334
+ def geometry_shape_type=(geometry_shape_type)
335
+ validator = EnumAttributeValidator.new('String', ['Custom', 'Line', 'LineInverse', 'Triangle', 'RightTriangle', 'Rectangle', 'Diamond', 'Parallelogram', 'Trapezoid', 'NonIsoscelesTrapezoid', 'Pentagon', 'Hexagon', 'Heptagon', 'Octagon', 'Decagon', 'Dodecagon', 'FourPointedStar', 'FivePointedStar', 'SixPointedStar', 'SevenPointedStar', 'EightPointedStar', 'TenPointedStar', 'TwelvePointedStar', 'SixteenPointedStar', 'TwentyFourPointedStar', 'ThirtyTwoPointedStar', 'RoundCornerRectangle', 'OneRoundCornerRectangle', 'TwoSamesideRoundCornerRectangle', 'TwoDiagonalRoundCornerRectangle', 'OneSnipOneRoundCornerRectangle', 'OneSnipCornerRectangle', 'TwoSamesideSnipCornerRectangle', 'TwoDiagonalSnipCornerRectangle', 'Plaque', 'Ellipse', 'Teardrop', 'HomePlate', 'Chevron', 'PieWedge', 'Pie', 'BlockArc', 'Donut', 'NoSmoking', 'RightArrow', 'LeftArrow', 'UpArrow', 'DownArrow', 'StripedRightArrow', 'NotchedRightArrow', 'BentUpArrow', 'LeftRightArrow', 'UpDownArrow', 'LeftUpArrow', 'LeftRightUpArrow', 'QuadArrow', 'CalloutLeftArrow', 'CalloutRightArrow', 'CalloutUpArrow', 'CalloutDownArrow', 'CalloutLeftRightArrow', 'CalloutUpDownArrow', 'CalloutQuadArrow', 'BentArrow', 'UTurnArrow', 'CircularArrow', 'LeftCircularArrow', 'LeftRightCircularArrow', 'CurvedRightArrow', 'CurvedLeftArrow', 'CurvedUpArrow', 'CurvedDownArrow', 'SwooshArrow', 'Cube', 'Can', 'LightningBolt', 'Heart', 'Sun', 'Moon', 'SmileyFace', 'IrregularSeal1', 'IrregularSeal2', 'FoldedCorner', 'Bevel', 'Frame', 'HalfFrame', 'Corner', 'DiagonalStripe', 'Chord', 'CurvedArc', 'LeftBracket', 'RightBracket', 'LeftBrace', 'RightBrace', 'BracketPair', 'BracePair', 'StraightConnector1', 'BentConnector2', 'BentConnector3', 'BentConnector4', 'BentConnector5', 'CurvedConnector2', 'CurvedConnector3', 'CurvedConnector4', 'CurvedConnector5', 'Callout1', 'Callout2', 'Callout3', 'Callout1WithAccent', 'Callout2WithAccent', 'Callout3WithAccent', 'Callout1WithBorder', 'Callout2WithBorder', 'Callout3WithBorder', 'Callout1WithBorderAndAccent', 'Callout2WithBorderAndAccent', 'Callout3WithBorderAndAccent', 'CalloutWedgeRectangle', 'CalloutWedgeRoundRectangle', 'CalloutWedgeEllipse', 'CalloutCloud', 'Cloud', 'Ribbon', 'Ribbon2', 'EllipseRibbon', 'EllipseRibbon2', 'LeftRightRibbon', 'VerticalScroll', 'HorizontalScroll', 'Wave', 'DoubleWave', 'Plus', 'ProcessFlow', 'DecisionFlow', 'InputOutputFlow', 'PredefinedProcessFlow', 'InternalStorageFlow', 'DocumentFlow', 'MultiDocumentFlow', 'TerminatorFlow', 'PreparationFlow', 'ManualInputFlow', 'ManualOperationFlow', 'ConnectorFlow', 'PunchedCardFlow', 'PunchedTapeFlow', 'SummingJunctionFlow', 'OrFlow', 'CollateFlow', 'SortFlow', 'ExtractFlow', 'MergeFlow', 'OfflineStorageFlow', 'OnlineStorageFlow', 'MagneticTapeFlow', 'MagneticDiskFlow', 'MagneticDrumFlow', 'DisplayFlow', 'DelayFlow', 'AlternateProcessFlow', 'OffPageConnectorFlow', 'BlankButton', 'HomeButton', 'HelpButton', 'InformationButton', 'ForwardOrNextButton', 'BackOrPreviousButton', 'EndButton', 'BeginningButton', 'ReturnButton', 'DocumentButton', 'SoundButton', 'MovieButton', 'Gear6', 'Gear9', 'Funnel', 'PlusMath', 'MinusMath', 'MultiplyMath', 'DivideMath', 'EqualMath', 'NotEqualMath', 'CornerTabs', 'SquareTabs', 'PlaqueTabs', 'ChartX', 'ChartStar', 'ChartPlus', 'NotDefined'])
336
+ unless validator.valid?(geometry_shape_type)
337
+ fail ArgumentError, 'invalid value for "geometry_shape_type", must be one of #{validator.allowable_values}.'
338
+ end
339
+ @geometry_shape_type = geometry_shape_type
340
+ end
341
+
342
+ # Checks equality by comparing each attribute.
343
+ # @param [Object] Object to be compared
344
+ def ==(o)
345
+ return true if self.equal?(o)
346
+ self.class == o.class &&
347
+ self_uri == o.self_uri &&
348
+ alternate_links == o.alternate_links &&
349
+ name == o.name &&
350
+ width == o.width &&
351
+ height == o.height &&
352
+ alternative_text == o.alternative_text &&
353
+ alternative_text_title == o.alternative_text_title &&
354
+ hidden == o.hidden &&
355
+ x == o.x &&
356
+ y == o.y &&
357
+ z_order_position == o.z_order_position &&
358
+ shapes == o.shapes &&
359
+ fill_format == o.fill_format &&
360
+ effect_format == o.effect_format &&
361
+ line_format == o.line_format &&
362
+ type == o.type &&
363
+ shape_type == o.shape_type &&
364
+ geometry_shape_type == o.geometry_shape_type &&
365
+ start_shape_connected_to == o.start_shape_connected_to &&
366
+ start_shape_connected_to_index == o.start_shape_connected_to_index &&
367
+ end_shape_connected_to == o.end_shape_connected_to &&
368
+ end_shape_connected_to_index == o.end_shape_connected_to_index
369
+ end
370
+
371
+ # @see the `==` method
372
+ # @param [Object] Object to be compared
373
+ def eql?(o)
374
+ self == o
375
+ end
376
+
377
+ # Calculates hash code according to all attributes.
378
+ # @return [Fixnum] Hash code
379
+ def hash
380
+ [self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, shapes, fill_format, effect_format, line_format, type, shape_type, geometry_shape_type, start_shape_connected_to, start_shape_connected_to_index, end_shape_connected_to, end_shape_connected_to_index].hash
381
+ end
382
+
383
+ # Builds the object from hash
384
+ # @param [Hash] attributes Model attributes in the form of hash
385
+ # @return [Object] Returns the model itself
386
+ def build_from_hash(attributes)
387
+ return nil unless attributes.is_a?(Hash)
388
+ self.class.swagger_types.each_pair do |key, type|
389
+ if type =~ /\AArray<(.*)>/i
390
+ # check to ensure the input is an array given that the the attribute
391
+ # is documented as an array but the input is not
392
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
393
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
394
+ end
395
+ elsif !attributes[self.class.attribute_map[key]].nil?
396
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
397
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
398
+ end
399
+
400
+ self
401
+ end
402
+
403
+ # Deserializes the data based on type
404
+ # @param string type Data type
405
+ # @param string value Value to be deserialized
406
+ # @return [Object] Deserialized data
407
+ def _deserialize(type, value)
408
+ case type.to_sym
409
+ when :DateTime
410
+ DateTime.parse(value)
411
+ when :Date
412
+ Date.parse(value)
413
+ when :String
414
+ value.to_s
415
+ when :Integer
416
+ value.to_i
417
+ when :Float
418
+ value.to_f
419
+ when :BOOLEAN
420
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
421
+ true
422
+ else
423
+ false
424
+ end
425
+ when :Object
426
+ # generic object (usually a Hash), return directly
427
+ value
428
+ when /\AArray<(?<inner_type>.+)>\z/
429
+ inner_type = Regexp.last_match[:inner_type]
430
+ value.map { |v| _deserialize(inner_type, v) }
431
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
432
+ k_type = Regexp.last_match[:k_type]
433
+ v_type = Regexp.last_match[:v_type]
434
+ {}.tap do |hash|
435
+ value.each do |k, v|
436
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
437
+ end
438
+ end
439
+ else # model
440
+ temp_model = AsposeSlidesCloud.const_get(type).new
441
+ temp_model.build_from_hash(value)
442
+ end
443
+ end
444
+
445
+ # Returns the string representation of the object
446
+ # @return [String] String presentation of the object
447
+ def to_s
448
+ to_hash.to_s
449
+ end
450
+
451
+ # to_body is an alias to to_hash (backward compatibility)
452
+ # @return [Hash] Returns the object in the form of hash
453
+ def to_body
454
+ to_hash
455
+ end
456
+
457
+ # Returns the object in the form of hash
458
+ # @return [Hash] Returns the object in the form of hash
459
+ def to_hash
460
+ hash = {}
461
+ self.class.attribute_map.each_pair do |attr, param|
462
+ value = self.send(attr)
463
+ next if value.nil?
464
+ hash[param] = _to_hash(value)
465
+ end
466
+ hash
467
+ end
468
+
469
+ # Outputs non-array value in the form of hash
470
+ # For object, use to_hash. Otherwise, just return the value
471
+ # @param [Object] value Any valid value
472
+ # @return [Hash] Returns the value in the form of hash
473
+ def _to_hash(value)
474
+ if value.is_a?(Array)
475
+ value.compact.map { |v| _to_hash(v) }
476
+ elsif value.is_a?(Hash)
477
+ {}.tap do |hash|
478
+ value.each { |k, v| hash[k] = _to_hash(v) }
479
+ end
480
+ elsif value.respond_to? :to_hash
481
+ value.to_hash
482
+ else
483
+ value
484
+ end
485
+ end
486
+ end
487
+ end