alfresco_api 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (522) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +351 -0
  4. data/Rakefile +8 -0
  5. data/alfresco_api.gemspec +45 -0
  6. data/docs/ActivitiesApi.md +74 -0
  7. data/docs/Activity.md +14 -0
  8. data/docs/ActivityEntry.md +8 -0
  9. data/docs/ActivityPaging.md +8 -0
  10. data/docs/ActivityPagingList.md +9 -0
  11. data/docs/Association.md +9 -0
  12. data/docs/AssociationBody.md +9 -0
  13. data/docs/AssociationEntry.md +8 -0
  14. data/docs/AssociationInfo.md +8 -0
  15. data/docs/AuditApi.md +495 -0
  16. data/docs/AuditApp.md +10 -0
  17. data/docs/AuditAppEntry.md +8 -0
  18. data/docs/AuditAppPaging.md +8 -0
  19. data/docs/AuditAppPagingList.md +9 -0
  20. data/docs/AuditBodyUpdate.md +8 -0
  21. data/docs/AuditEntry.md +12 -0
  22. data/docs/AuditEntryEntry.md +8 -0
  23. data/docs/AuditEntryPaging.md +8 -0
  24. data/docs/AuditEntryPagingList.md +9 -0
  25. data/docs/ChildAssociation.md +9 -0
  26. data/docs/ChildAssociationBody.md +9 -0
  27. data/docs/ChildAssociationEntry.md +8 -0
  28. data/docs/ChildAssociationInfo.md +9 -0
  29. data/docs/ClientBody.md +8 -0
  30. data/docs/Comment.md +16 -0
  31. data/docs/CommentBody.md +8 -0
  32. data/docs/CommentEntry.md +8 -0
  33. data/docs/CommentPaging.md +8 -0
  34. data/docs/CommentPagingList.md +9 -0
  35. data/docs/CommentsApi.md +251 -0
  36. data/docs/Company.md +15 -0
  37. data/docs/ContentInfo.md +11 -0
  38. data/docs/DeletedNode.md +27 -0
  39. data/docs/DeletedNodeEntry.md +8 -0
  40. data/docs/DeletedNodesPaging.md +8 -0
  41. data/docs/DeletedNodesPagingList.md +9 -0
  42. data/docs/Download.md +13 -0
  43. data/docs/DownloadBodyCreate.md +8 -0
  44. data/docs/DownloadEntry.md +8 -0
  45. data/docs/DownloadsApi.md +177 -0
  46. data/docs/Error.md +8 -0
  47. data/docs/ErrorError.md +13 -0
  48. data/docs/Favorite.md +10 -0
  49. data/docs/FavoriteBodyCreate.md +8 -0
  50. data/docs/FavoriteEntry.md +8 -0
  51. data/docs/FavoritePaging.md +8 -0
  52. data/docs/FavoritePagingList.md +9 -0
  53. data/docs/FavoriteSite.md +8 -0
  54. data/docs/FavoriteSiteBodyCreate.md +8 -0
  55. data/docs/FavoriteSiteEntry.md +8 -0
  56. data/docs/FavoritesApi.md +496 -0
  57. data/docs/Group.md +12 -0
  58. data/docs/GroupBodyCreate.md +10 -0
  59. data/docs/GroupBodyUpdate.md +8 -0
  60. data/docs/GroupEntry.md +8 -0
  61. data/docs/GroupMember.md +10 -0
  62. data/docs/GroupMemberEntry.md +8 -0
  63. data/docs/GroupMemberPaging.md +8 -0
  64. data/docs/GroupMemberPagingList.md +9 -0
  65. data/docs/GroupMembershipBodyCreate.md +9 -0
  66. data/docs/GroupPaging.md +8 -0
  67. data/docs/GroupPagingList.md +9 -0
  68. data/docs/GroupsApi.md +564 -0
  69. data/docs/NetworkQuota.md +10 -0
  70. data/docs/NetworksApi.md +189 -0
  71. data/docs/Node.md +25 -0
  72. data/docs/NodeAssociation.md +26 -0
  73. data/docs/NodeAssociationEntry.md +8 -0
  74. data/docs/NodeAssociationPaging.md +8 -0
  75. data/docs/NodeAssociationPagingList.md +10 -0
  76. data/docs/NodeBodyCopy.md +9 -0
  77. data/docs/NodeBodyCreate.md +15 -0
  78. data/docs/NodeBodyCreateAssociation.md +8 -0
  79. data/docs/NodeBodyLock.md +10 -0
  80. data/docs/NodeBodyMove.md +9 -0
  81. data/docs/NodeBodyUpdate.md +12 -0
  82. data/docs/NodeChildAssociation.md +26 -0
  83. data/docs/NodeChildAssociationEntry.md +8 -0
  84. data/docs/NodeChildAssociationPaging.md +8 -0
  85. data/docs/NodeChildAssociationPagingList.md +10 -0
  86. data/docs/NodeEntry.md +8 -0
  87. data/docs/NodePaging.md +8 -0
  88. data/docs/NodePagingList.md +10 -0
  89. data/docs/NodesApi.md +1206 -0
  90. data/docs/Pagination.md +12 -0
  91. data/docs/PasswordResetBody.md +10 -0
  92. data/docs/PathElement.md +11 -0
  93. data/docs/PathInfo.md +10 -0
  94. data/docs/PeopleApi.md +530 -0
  95. data/docs/PermissionElement.md +10 -0
  96. data/docs/PermissionsBodyUpdate.md +9 -0
  97. data/docs/PermissionsInfo.md +11 -0
  98. data/docs/Person.md +27 -0
  99. data/docs/PersonBodyCreate.md +26 -0
  100. data/docs/PersonBodyUpdate.md +26 -0
  101. data/docs/PersonEntry.md +8 -0
  102. data/docs/PersonNetwork.md +14 -0
  103. data/docs/PersonNetworkEntry.md +8 -0
  104. data/docs/PersonNetworkPaging.md +8 -0
  105. data/docs/PersonNetworkPagingList.md +9 -0
  106. data/docs/PersonPaging.md +8 -0
  107. data/docs/PersonPagingList.md +9 -0
  108. data/docs/Preference.md +9 -0
  109. data/docs/PreferenceEntry.md +8 -0
  110. data/docs/PreferencePaging.md +8 -0
  111. data/docs/PreferencePagingList.md +9 -0
  112. data/docs/PreferencesApi.md +131 -0
  113. data/docs/QueriesApi.md +206 -0
  114. data/docs/Rating.md +11 -0
  115. data/docs/RatingAggregate.md +9 -0
  116. data/docs/RatingBody.md +9 -0
  117. data/docs/RatingEntry.md +8 -0
  118. data/docs/RatingPaging.md +8 -0
  119. data/docs/RatingPagingList.md +9 -0
  120. data/docs/RatingsApi.md +248 -0
  121. data/docs/Rendition.md +10 -0
  122. data/docs/RenditionBodyCreate.md +8 -0
  123. data/docs/RenditionEntry.md +8 -0
  124. data/docs/RenditionPaging.md +8 -0
  125. data/docs/RenditionPagingList.md +9 -0
  126. data/docs/RenditionsApi.md +243 -0
  127. data/docs/RevertBody.md +9 -0
  128. data/docs/SharedLink.md +19 -0
  129. data/docs/SharedLinkBodyCreate.md +9 -0
  130. data/docs/SharedLinkBodyEmail.md +11 -0
  131. data/docs/SharedLinkEntry.md +8 -0
  132. data/docs/SharedLinkPaging.md +8 -0
  133. data/docs/SharedLinkPagingList.md +9 -0
  134. data/docs/SharedlinksApi.md +530 -0
  135. data/docs/Site.md +14 -0
  136. data/docs/SiteBodyCreate.md +11 -0
  137. data/docs/SiteBodyUpdate.md +10 -0
  138. data/docs/SiteContainer.md +9 -0
  139. data/docs/SiteContainerEntry.md +8 -0
  140. data/docs/SiteContainerPaging.md +8 -0
  141. data/docs/SiteContainerPagingList.md +9 -0
  142. data/docs/SiteEntry.md +8 -0
  143. data/docs/SiteMember.md +10 -0
  144. data/docs/SiteMemberEntry.md +8 -0
  145. data/docs/SiteMemberPaging.md +8 -0
  146. data/docs/SiteMemberPagingList.md +9 -0
  147. data/docs/SiteMembershipBodyCreate.md +9 -0
  148. data/docs/SiteMembershipBodyUpdate.md +8 -0
  149. data/docs/SiteMembershipRequest.md +11 -0
  150. data/docs/SiteMembershipRequestBodyCreate.md +10 -0
  151. data/docs/SiteMembershipRequestBodyUpdate.md +8 -0
  152. data/docs/SiteMembershipRequestEntry.md +8 -0
  153. data/docs/SiteMembershipRequestPaging.md +8 -0
  154. data/docs/SiteMembershipRequestPagingList.md +9 -0
  155. data/docs/SitePaging.md +8 -0
  156. data/docs/SitePagingList.md +9 -0
  157. data/docs/SiteRole.md +11 -0
  158. data/docs/SiteRoleEntry.md +8 -0
  159. data/docs/SiteRolePaging.md +8 -0
  160. data/docs/SiteRolePagingList.md +9 -0
  161. data/docs/SitesApi.md +1225 -0
  162. data/docs/Tag.md +9 -0
  163. data/docs/TagBody.md +8 -0
  164. data/docs/TagEntry.md +8 -0
  165. data/docs/TagPaging.md +8 -0
  166. data/docs/TagPagingList.md +9 -0
  167. data/docs/TagsApi.md +365 -0
  168. data/docs/TrashcanApi.md +474 -0
  169. data/docs/UserInfo.md +9 -0
  170. data/docs/Version.md +18 -0
  171. data/docs/VersionEntry.md +8 -0
  172. data/docs/VersionPaging.md +8 -0
  173. data/docs/VersionPagingList.md +9 -0
  174. data/docs/VersionsApi.md +311 -0
  175. data/git_push.sh +55 -0
  176. data/lib/alfresco_api.rb +208 -0
  177. data/lib/alfresco_api/api/activities_api.rb +101 -0
  178. data/lib/alfresco_api/api/audit_api.rb +558 -0
  179. data/lib/alfresco_api/api/comments_api.rb +289 -0
  180. data/lib/alfresco_api/api/downloads_api.rb +193 -0
  181. data/lib/alfresco_api/api/favorites_api.rb +555 -0
  182. data/lib/alfresco_api/api/groups_api.rb +627 -0
  183. data/lib/alfresco_api/api/networks_api.rb +217 -0
  184. data/lib/alfresco_api/api/nodes_api.rb +1314 -0
  185. data/lib/alfresco_api/api/people_api.rb +572 -0
  186. data/lib/alfresco_api/api/preferences_api.rb +159 -0
  187. data/lib/alfresco_api/api/queries_api.rb +260 -0
  188. data/lib/alfresco_api/api/ratings_api.rb +283 -0
  189. data/lib/alfresco_api/api/renditions_api.rb +271 -0
  190. data/lib/alfresco_api/api/sharedlinks_api.rb +570 -0
  191. data/lib/alfresco_api/api/sites_api.rb +1342 -0
  192. data/lib/alfresco_api/api/tags_api.rb +407 -0
  193. data/lib/alfresco_api/api/trashcan_api.rb +507 -0
  194. data/lib/alfresco_api/api/versions_api.rb +355 -0
  195. data/lib/alfresco_api/api_client.rb +389 -0
  196. data/lib/alfresco_api/api_error.rb +38 -0
  197. data/lib/alfresco_api/configuration.rb +209 -0
  198. data/lib/alfresco_api/models/activity.rb +271 -0
  199. data/lib/alfresco_api/models/activity_entry.rb +193 -0
  200. data/lib/alfresco_api/models/activity_paging.rb +188 -0
  201. data/lib/alfresco_api/models/activity_paging_list.rb +209 -0
  202. data/lib/alfresco_api/models/association.rb +207 -0
  203. data/lib/alfresco_api/models/association_body.rb +207 -0
  204. data/lib/alfresco_api/models/association_entry.rb +193 -0
  205. data/lib/alfresco_api/models/association_info.rb +193 -0
  206. data/lib/alfresco_api/models/audit_app.rb +213 -0
  207. data/lib/alfresco_api/models/audit_app_entry.rb +188 -0
  208. data/lib/alfresco_api/models/audit_app_paging.rb +188 -0
  209. data/lib/alfresco_api/models/audit_app_paging_list.rb +199 -0
  210. data/lib/alfresco_api/models/audit_body_update.rb +188 -0
  211. data/lib/alfresco_api/models/audit_entry.rb +246 -0
  212. data/lib/alfresco_api/models/audit_entry_entry.rb +188 -0
  213. data/lib/alfresco_api/models/audit_entry_paging.rb +188 -0
  214. data/lib/alfresco_api/models/audit_entry_paging_list.rb +199 -0
  215. data/lib/alfresco_api/models/child_association.rb +207 -0
  216. data/lib/alfresco_api/models/child_association_body.rb +207 -0
  217. data/lib/alfresco_api/models/child_association_entry.rb +193 -0
  218. data/lib/alfresco_api/models/child_association_info.rb +207 -0
  219. data/lib/alfresco_api/models/client_body.rb +194 -0
  220. data/lib/alfresco_api/models/comment.rb +305 -0
  221. data/lib/alfresco_api/models/comment_body.rb +193 -0
  222. data/lib/alfresco_api/models/comment_entry.rb +193 -0
  223. data/lib/alfresco_api/models/comment_paging.rb +188 -0
  224. data/lib/alfresco_api/models/comment_paging_list.rb +209 -0
  225. data/lib/alfresco_api/models/company.rb +251 -0
  226. data/lib/alfresco_api/models/content_info.rb +230 -0
  227. data/lib/alfresco_api/models/deleted_node.rb +440 -0
  228. data/lib/alfresco_api/models/deleted_node_entry.rb +188 -0
  229. data/lib/alfresco_api/models/deleted_nodes_paging.rb +188 -0
  230. data/lib/alfresco_api/models/deleted_nodes_paging_list.rb +199 -0
  231. data/lib/alfresco_api/models/download.rb +274 -0
  232. data/lib/alfresco_api/models/download_body_create.rb +195 -0
  233. data/lib/alfresco_api/models/download_entry.rb +193 -0
  234. data/lib/alfresco_api/models/error.rb +188 -0
  235. data/lib/alfresco_api/models/error_error.rb +253 -0
  236. data/lib/alfresco_api/models/favorite.rb +218 -0
  237. data/lib/alfresco_api/models/favorite_body_create.rb +193 -0
  238. data/lib/alfresco_api/models/favorite_entry.rb +193 -0
  239. data/lib/alfresco_api/models/favorite_paging.rb +188 -0
  240. data/lib/alfresco_api/models/favorite_paging_list.rb +209 -0
  241. data/lib/alfresco_api/models/favorite_site.rb +193 -0
  242. data/lib/alfresco_api/models/favorite_site_body_create.rb +193 -0
  243. data/lib/alfresco_api/models/favorite_site_entry.rb +193 -0
  244. data/lib/alfresco_api/models/group.rb +245 -0
  245. data/lib/alfresco_api/models/group_body_create.rb +218 -0
  246. data/lib/alfresco_api/models/group_body_update.rb +193 -0
  247. data/lib/alfresco_api/models/group_entry.rb +193 -0
  248. data/lib/alfresco_api/models/group_member.rb +254 -0
  249. data/lib/alfresco_api/models/group_member_entry.rb +193 -0
  250. data/lib/alfresco_api/models/group_member_paging.rb +188 -0
  251. data/lib/alfresco_api/models/group_member_paging_list.rb +199 -0
  252. data/lib/alfresco_api/models/group_membership_body_create.rb +240 -0
  253. data/lib/alfresco_api/models/group_paging.rb +188 -0
  254. data/lib/alfresco_api/models/group_paging_list.rb +199 -0
  255. data/lib/alfresco_api/models/network_quota.rb +221 -0
  256. data/lib/alfresco_api/models/node.rb +412 -0
  257. data/lib/alfresco_api/models/node_association.rb +421 -0
  258. data/lib/alfresco_api/models/node_association_entry.rb +193 -0
  259. data/lib/alfresco_api/models/node_association_paging.rb +188 -0
  260. data/lib/alfresco_api/models/node_association_paging_list.rb +208 -0
  261. data/lib/alfresco_api/models/node_body_copy.rb +219 -0
  262. data/lib/alfresco_api/models/node_body_create.rb +289 -0
  263. data/lib/alfresco_api/models/node_body_create_association.rb +188 -0
  264. data/lib/alfresco_api/models/node_body_lock.rb +271 -0
  265. data/lib/alfresco_api/models/node_body_move.rb +219 -0
  266. data/lib/alfresco_api/models/node_body_update.rb +245 -0
  267. data/lib/alfresco_api/models/node_child_association.rb +421 -0
  268. data/lib/alfresco_api/models/node_child_association_entry.rb +193 -0
  269. data/lib/alfresco_api/models/node_child_association_paging.rb +188 -0
  270. data/lib/alfresco_api/models/node_child_association_paging_list.rb +208 -0
  271. data/lib/alfresco_api/models/node_entry.rb +193 -0
  272. data/lib/alfresco_api/models/node_paging.rb +188 -0
  273. data/lib/alfresco_api/models/node_paging_list.rb +208 -0
  274. data/lib/alfresco_api/models/pagination.rb +249 -0
  275. data/lib/alfresco_api/models/password_reset_body.rb +224 -0
  276. data/lib/alfresco_api/models/path_element.rb +217 -0
  277. data/lib/alfresco_api/models/path_info.rb +208 -0
  278. data/lib/alfresco_api/models/permission_element.rb +241 -0
  279. data/lib/alfresco_api/models/permissions_body_update.rb +199 -0
  280. data/lib/alfresco_api/models/permissions_info.rb +221 -0
  281. data/lib/alfresco_api/models/person.rb +387 -0
  282. data/lib/alfresco_api/models/person_body_create.rb +378 -0
  283. data/lib/alfresco_api/models/person_body_update.rb +354 -0
  284. data/lib/alfresco_api/models/person_entry.rb +193 -0
  285. data/lib/alfresco_api/models/person_network.rb +289 -0
  286. data/lib/alfresco_api/models/person_network_entry.rb +193 -0
  287. data/lib/alfresco_api/models/person_network_paging.rb +188 -0
  288. data/lib/alfresco_api/models/person_network_paging_list.rb +209 -0
  289. data/lib/alfresco_api/models/person_paging.rb +188 -0
  290. data/lib/alfresco_api/models/person_paging_list.rb +199 -0
  291. data/lib/alfresco_api/models/preference.rb +204 -0
  292. data/lib/alfresco_api/models/preference_entry.rb +193 -0
  293. data/lib/alfresco_api/models/preference_paging.rb +188 -0
  294. data/lib/alfresco_api/models/preference_paging_list.rb +209 -0
  295. data/lib/alfresco_api/models/rating.rb +221 -0
  296. data/lib/alfresco_api/models/rating_aggregate.rb +202 -0
  297. data/lib/alfresco_api/models/rating_body.rb +244 -0
  298. data/lib/alfresco_api/models/rating_entry.rb +193 -0
  299. data/lib/alfresco_api/models/rating_paging.rb +188 -0
  300. data/lib/alfresco_api/models/rating_paging_list.rb +209 -0
  301. data/lib/alfresco_api/models/rendition.rb +239 -0
  302. data/lib/alfresco_api/models/rendition_body_create.rb +193 -0
  303. data/lib/alfresco_api/models/rendition_entry.rb +193 -0
  304. data/lib/alfresco_api/models/rendition_paging.rb +188 -0
  305. data/lib/alfresco_api/models/rendition_paging_list.rb +199 -0
  306. data/lib/alfresco_api/models/revert_body.rb +197 -0
  307. data/lib/alfresco_api/models/shared_link.rb +310 -0
  308. data/lib/alfresco_api/models/shared_link_body_create.rb +202 -0
  309. data/lib/alfresco_api/models/shared_link_body_email.rb +217 -0
  310. data/lib/alfresco_api/models/shared_link_entry.rb +193 -0
  311. data/lib/alfresco_api/models/shared_link_paging.rb +188 -0
  312. data/lib/alfresco_api/models/shared_link_paging_list.rb +209 -0
  313. data/lib/alfresco_api/models/site.rb +307 -0
  314. data/lib/alfresco_api/models/site_body_create.rb +260 -0
  315. data/lib/alfresco_api/models/site_body_update.rb +239 -0
  316. data/lib/alfresco_api/models/site_container.rb +207 -0
  317. data/lib/alfresco_api/models/site_container_entry.rb +193 -0
  318. data/lib/alfresco_api/models/site_container_paging.rb +188 -0
  319. data/lib/alfresco_api/models/site_container_paging_list.rb +209 -0
  320. data/lib/alfresco_api/models/site_entry.rb +193 -0
  321. data/lib/alfresco_api/models/site_member.rb +254 -0
  322. data/lib/alfresco_api/models/site_member_entry.rb +193 -0
  323. data/lib/alfresco_api/models/site_member_paging.rb +188 -0
  324. data/lib/alfresco_api/models/site_member_paging_list.rb +209 -0
  325. data/lib/alfresco_api/models/site_membership_body_create.rb +240 -0
  326. data/lib/alfresco_api/models/site_membership_body_update.rb +226 -0
  327. data/lib/alfresco_api/models/site_membership_request.rb +230 -0
  328. data/lib/alfresco_api/models/site_membership_request_body_create.rb +211 -0
  329. data/lib/alfresco_api/models/site_membership_request_body_update.rb +188 -0
  330. data/lib/alfresco_api/models/site_membership_request_entry.rb +193 -0
  331. data/lib/alfresco_api/models/site_membership_request_paging.rb +188 -0
  332. data/lib/alfresco_api/models/site_membership_request_paging_list.rb +209 -0
  333. data/lib/alfresco_api/models/site_paging.rb +188 -0
  334. data/lib/alfresco_api/models/site_paging_list.rb +209 -0
  335. data/lib/alfresco_api/models/site_role.rb +268 -0
  336. data/lib/alfresco_api/models/site_role_entry.rb +193 -0
  337. data/lib/alfresco_api/models/site_role_paging.rb +188 -0
  338. data/lib/alfresco_api/models/site_role_paging_list.rb +209 -0
  339. data/lib/alfresco_api/models/tag.rb +207 -0
  340. data/lib/alfresco_api/models/tag_body.rb +193 -0
  341. data/lib/alfresco_api/models/tag_entry.rb +193 -0
  342. data/lib/alfresco_api/models/tag_paging.rb +188 -0
  343. data/lib/alfresco_api/models/tag_paging_list.rb +209 -0
  344. data/lib/alfresco_api/models/user_info.rb +207 -0
  345. data/lib/alfresco_api/models/version.rb +337 -0
  346. data/lib/alfresco_api/models/version_entry.rb +188 -0
  347. data/lib/alfresco_api/models/version_paging.rb +188 -0
  348. data/lib/alfresco_api/models/version_paging_list.rb +199 -0
  349. data/lib/alfresco_api/version.rb +15 -0
  350. data/spec/api/activities_api_spec.rb +52 -0
  351. data/spec/api/audit_api_spec.rb +152 -0
  352. data/spec/api/comments_api_spec.rb +92 -0
  353. data/spec/api/downloads_api_spec.rb +73 -0
  354. data/spec/api/favorites_api_spec.rb +151 -0
  355. data/spec/api/groups_api_spec.rb +170 -0
  356. data/spec/api/networks_api_spec.rb +77 -0
  357. data/spec/api/nodes_api_spec.rb +327 -0
  358. data/spec/api/people_api_spec.rb +157 -0
  359. data/spec/api/preferences_api_spec.rb +64 -0
  360. data/spec/api/queries_api_spec.rb +86 -0
  361. data/spec/api/ratings_api_spec.rb +91 -0
  362. data/spec/api/renditions_api_spec.rb +90 -0
  363. data/spec/api/sharedlinks_api_spec.rb +157 -0
  364. data/spec/api/sites_api_spec.rb +323 -0
  365. data/spec/api/tags_api_spec.rb +118 -0
  366. data/spec/api/trashcan_api_spec.rb +143 -0
  367. data/spec/api/versions_api_spec.rb +107 -0
  368. data/spec/api_client_spec.rb +226 -0
  369. data/spec/configuration_spec.rb +42 -0
  370. data/spec/models/activity_entry_spec.rb +42 -0
  371. data/spec/models/activity_paging_list_spec.rb +48 -0
  372. data/spec/models/activity_paging_spec.rb +42 -0
  373. data/spec/models/activity_spec.rb +78 -0
  374. data/spec/models/association_body_spec.rb +48 -0
  375. data/spec/models/association_entry_spec.rb +42 -0
  376. data/spec/models/association_info_spec.rb +42 -0
  377. data/spec/models/association_spec.rb +48 -0
  378. data/spec/models/audit_app_entry_spec.rb +42 -0
  379. data/spec/models/audit_app_paging_list_spec.rb +48 -0
  380. data/spec/models/audit_app_paging_spec.rb +42 -0
  381. data/spec/models/audit_app_spec.rb +54 -0
  382. data/spec/models/audit_body_update_spec.rb +42 -0
  383. data/spec/models/audit_entry_entry_spec.rb +42 -0
  384. data/spec/models/audit_entry_paging_list_spec.rb +48 -0
  385. data/spec/models/audit_entry_paging_spec.rb +42 -0
  386. data/spec/models/audit_entry_spec.rb +66 -0
  387. data/spec/models/child_association_body_spec.rb +48 -0
  388. data/spec/models/child_association_entry_spec.rb +42 -0
  389. data/spec/models/child_association_info_spec.rb +48 -0
  390. data/spec/models/child_association_spec.rb +48 -0
  391. data/spec/models/client_body_spec.rb +42 -0
  392. data/spec/models/comment_body_spec.rb +42 -0
  393. data/spec/models/comment_entry_spec.rb +42 -0
  394. data/spec/models/comment_paging_list_spec.rb +48 -0
  395. data/spec/models/comment_paging_spec.rb +42 -0
  396. data/spec/models/comment_spec.rb +90 -0
  397. data/spec/models/company_spec.rb +84 -0
  398. data/spec/models/content_info_spec.rb +60 -0
  399. data/spec/models/deleted_node_entry_spec.rb +42 -0
  400. data/spec/models/deleted_node_spec.rb +156 -0
  401. data/spec/models/deleted_nodes_paging_list_spec.rb +48 -0
  402. data/spec/models/deleted_nodes_paging_spec.rb +42 -0
  403. data/spec/models/download_body_create_spec.rb +42 -0
  404. data/spec/models/download_entry_spec.rb +42 -0
  405. data/spec/models/download_spec.rb +76 -0
  406. data/spec/models/error_error_spec.rb +72 -0
  407. data/spec/models/error_spec.rb +42 -0
  408. data/spec/models/favorite_body_create_spec.rb +42 -0
  409. data/spec/models/favorite_entry_spec.rb +42 -0
  410. data/spec/models/favorite_paging_list_spec.rb +48 -0
  411. data/spec/models/favorite_paging_spec.rb +42 -0
  412. data/spec/models/favorite_site_body_create_spec.rb +42 -0
  413. data/spec/models/favorite_site_entry_spec.rb +42 -0
  414. data/spec/models/favorite_site_spec.rb +42 -0
  415. data/spec/models/favorite_spec.rb +54 -0
  416. data/spec/models/group_body_create_spec.rb +54 -0
  417. data/spec/models/group_body_update_spec.rb +42 -0
  418. data/spec/models/group_entry_spec.rb +42 -0
  419. data/spec/models/group_member_entry_spec.rb +42 -0
  420. data/spec/models/group_member_paging_list_spec.rb +48 -0
  421. data/spec/models/group_member_paging_spec.rb +42 -0
  422. data/spec/models/group_member_spec.rb +58 -0
  423. data/spec/models/group_membership_body_create_spec.rb +52 -0
  424. data/spec/models/group_paging_list_spec.rb +48 -0
  425. data/spec/models/group_paging_spec.rb +42 -0
  426. data/spec/models/group_spec.rb +66 -0
  427. data/spec/models/network_quota_spec.rb +54 -0
  428. data/spec/models/node_association_entry_spec.rb +42 -0
  429. data/spec/models/node_association_paging_list_spec.rb +54 -0
  430. data/spec/models/node_association_paging_spec.rb +42 -0
  431. data/spec/models/node_association_spec.rb +150 -0
  432. data/spec/models/node_body_copy_spec.rb +48 -0
  433. data/spec/models/node_body_create_association_spec.rb +42 -0
  434. data/spec/models/node_body_create_spec.rb +84 -0
  435. data/spec/models/node_body_lock_spec.rb +62 -0
  436. data/spec/models/node_body_move_spec.rb +48 -0
  437. data/spec/models/node_body_update_spec.rb +66 -0
  438. data/spec/models/node_child_association_entry_spec.rb +42 -0
  439. data/spec/models/node_child_association_paging_list_spec.rb +54 -0
  440. data/spec/models/node_child_association_paging_spec.rb +42 -0
  441. data/spec/models/node_child_association_spec.rb +150 -0
  442. data/spec/models/node_entry_spec.rb +42 -0
  443. data/spec/models/node_paging_list_spec.rb +54 -0
  444. data/spec/models/node_paging_spec.rb +42 -0
  445. data/spec/models/node_spec.rb +144 -0
  446. data/spec/models/pagination_spec.rb +66 -0
  447. data/spec/models/password_reset_body_spec.rb +54 -0
  448. data/spec/models/path_element_spec.rb +60 -0
  449. data/spec/models/path_info_spec.rb +54 -0
  450. data/spec/models/permission_element_spec.rb +58 -0
  451. data/spec/models/permissions_body_update_spec.rb +48 -0
  452. data/spec/models/permissions_info_spec.rb +60 -0
  453. data/spec/models/person_body_create_spec.rb +150 -0
  454. data/spec/models/person_body_update_spec.rb +150 -0
  455. data/spec/models/person_entry_spec.rb +42 -0
  456. data/spec/models/person_network_entry_spec.rb +42 -0
  457. data/spec/models/person_network_paging_list_spec.rb +48 -0
  458. data/spec/models/person_network_paging_spec.rb +42 -0
  459. data/spec/models/person_network_spec.rb +82 -0
  460. data/spec/models/person_paging_list_spec.rb +48 -0
  461. data/spec/models/person_paging_spec.rb +42 -0
  462. data/spec/models/person_spec.rb +156 -0
  463. data/spec/models/preference_entry_spec.rb +42 -0
  464. data/spec/models/preference_paging_list_spec.rb +48 -0
  465. data/spec/models/preference_paging_spec.rb +42 -0
  466. data/spec/models/preference_spec.rb +48 -0
  467. data/spec/models/rating_aggregate_spec.rb +48 -0
  468. data/spec/models/rating_body_spec.rb +52 -0
  469. data/spec/models/rating_entry_spec.rb +42 -0
  470. data/spec/models/rating_paging_list_spec.rb +48 -0
  471. data/spec/models/rating_paging_spec.rb +42 -0
  472. data/spec/models/rating_spec.rb +60 -0
  473. data/spec/models/rendition_body_create_spec.rb +42 -0
  474. data/spec/models/rendition_entry_spec.rb +42 -0
  475. data/spec/models/rendition_paging_list_spec.rb +48 -0
  476. data/spec/models/rendition_paging_spec.rb +42 -0
  477. data/spec/models/rendition_spec.rb +58 -0
  478. data/spec/models/revert_body_spec.rb +48 -0
  479. data/spec/models/shared_link_body_create_spec.rb +48 -0
  480. data/spec/models/shared_link_body_email_spec.rb +60 -0
  481. data/spec/models/shared_link_entry_spec.rb +42 -0
  482. data/spec/models/shared_link_paging_list_spec.rb +48 -0
  483. data/spec/models/shared_link_paging_spec.rb +42 -0
  484. data/spec/models/shared_link_spec.rb +108 -0
  485. data/spec/models/site_body_create_spec.rb +64 -0
  486. data/spec/models/site_body_update_spec.rb +58 -0
  487. data/spec/models/site_container_entry_spec.rb +42 -0
  488. data/spec/models/site_container_paging_list_spec.rb +48 -0
  489. data/spec/models/site_container_paging_spec.rb +42 -0
  490. data/spec/models/site_container_spec.rb +48 -0
  491. data/spec/models/site_entry_spec.rb +42 -0
  492. data/spec/models/site_member_entry_spec.rb +42 -0
  493. data/spec/models/site_member_paging_list_spec.rb +48 -0
  494. data/spec/models/site_member_paging_spec.rb +42 -0
  495. data/spec/models/site_member_spec.rb +58 -0
  496. data/spec/models/site_membership_body_create_spec.rb +52 -0
  497. data/spec/models/site_membership_body_update_spec.rb +46 -0
  498. data/spec/models/site_membership_request_body_create_spec.rb +54 -0
  499. data/spec/models/site_membership_request_body_update_spec.rb +42 -0
  500. data/spec/models/site_membership_request_entry_spec.rb +42 -0
  501. data/spec/models/site_membership_request_paging_list_spec.rb +48 -0
  502. data/spec/models/site_membership_request_paging_spec.rb +42 -0
  503. data/spec/models/site_membership_request_spec.rb +60 -0
  504. data/spec/models/site_paging_list_spec.rb +48 -0
  505. data/spec/models/site_paging_spec.rb +42 -0
  506. data/spec/models/site_role_entry_spec.rb +42 -0
  507. data/spec/models/site_role_paging_list_spec.rb +48 -0
  508. data/spec/models/site_role_paging_spec.rb +42 -0
  509. data/spec/models/site_role_spec.rb +64 -0
  510. data/spec/models/site_spec.rb +86 -0
  511. data/spec/models/tag_body_spec.rb +42 -0
  512. data/spec/models/tag_entry_spec.rb +42 -0
  513. data/spec/models/tag_paging_list_spec.rb +48 -0
  514. data/spec/models/tag_paging_spec.rb +42 -0
  515. data/spec/models/tag_spec.rb +48 -0
  516. data/spec/models/user_info_spec.rb +48 -0
  517. data/spec/models/version_entry_spec.rb +42 -0
  518. data/spec/models/version_paging_list_spec.rb +48 -0
  519. data/spec/models/version_paging_spec.rb +42 -0
  520. data/spec/models/version_spec.rb +102 -0
  521. data/spec/spec_helper.rb +111 -0
  522. metadata +918 -0
@@ -0,0 +1,38 @@
1
+ =begin
2
+ #Alfresco Content Services REST API
3
+
4
+ #**Core API** Provides access to the core features of Alfresco Content Services.
5
+
6
+ OpenAPI spec version: 1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ module AlfrescoAPI
14
+ class ApiError < StandardError
15
+ attr_reader :code, :response_headers, :response_body
16
+
17
+ # Usage examples:
18
+ # ApiError.new
19
+ # ApiError.new("message")
20
+ # ApiError.new(:code => 500, :response_headers => {}, :response_body => "")
21
+ # ApiError.new(:code => 404, :message => "Not Found")
22
+ def initialize(arg = nil)
23
+ if arg.is_a? Hash
24
+ if arg.key?(:message) || arg.key?('message')
25
+ super(arg[:message] || arg['message'])
26
+ else
27
+ super arg
28
+ end
29
+
30
+ arg.each do |k, v|
31
+ instance_variable_set "@#{k}", v
32
+ end
33
+ else
34
+ super arg
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,209 @@
1
+ =begin
2
+ #Alfresco Content Services REST API
3
+
4
+ #**Core API** Provides access to the core features of Alfresco Content Services.
5
+
6
+ OpenAPI spec version: 1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module AlfrescoAPI
16
+ class Configuration
17
+ # Defines url scheme
18
+ attr_accessor :scheme
19
+
20
+ # Defines url host
21
+ attr_accessor :host
22
+
23
+ # Defines url base path
24
+ attr_accessor :base_path
25
+
26
+ # Defines API keys used with API Key authentications.
27
+ #
28
+ # @return [Hash] key: parameter name, value: parameter value (API key)
29
+ #
30
+ # @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string)
31
+ # config.api_key['api_key'] = 'xxx'
32
+ attr_accessor :api_key
33
+
34
+ # Defines API key prefixes used with API Key authentications.
35
+ #
36
+ # @return [Hash] key: parameter name, value: API key prefix
37
+ #
38
+ # @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers)
39
+ # config.api_key_prefix['api_key'] = 'Token'
40
+ attr_accessor :api_key_prefix
41
+
42
+ # Defines the username used with HTTP basic authentication.
43
+ #
44
+ # @return [String]
45
+ attr_accessor :username
46
+
47
+ # Defines the password used with HTTP basic authentication.
48
+ #
49
+ # @return [String]
50
+ attr_accessor :password
51
+
52
+ # Defines the access token (Bearer) used with OAuth2.
53
+ attr_accessor :access_token
54
+
55
+ # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
56
+ # details will be logged with `logger.debug` (see the `logger` attribute).
57
+ # Default to false.
58
+ #
59
+ # @return [true, false]
60
+ attr_accessor :debugging
61
+
62
+ # Defines the logger used for debugging.
63
+ # Default to `Rails.logger` (when in Rails) or logging to STDOUT.
64
+ #
65
+ # @return [#debug]
66
+ attr_accessor :logger
67
+
68
+ # Defines the temporary folder to store downloaded files
69
+ # (for API endpoints that have file response).
70
+ # Default to use `Tempfile`.
71
+ #
72
+ # @return [String]
73
+ attr_accessor :temp_folder_path
74
+
75
+ # The time limit for HTTP request in seconds.
76
+ # Default to 0 (never times out).
77
+ attr_accessor :timeout
78
+
79
+ # Set this to false to skip client side validation in the operation.
80
+ # Default to true.
81
+ # @return [true, false]
82
+ attr_accessor :client_side_validation
83
+
84
+ ### TLS/SSL setting
85
+ # Set this to false to skip verifying SSL certificate when calling API from https server.
86
+ # Default to true.
87
+ #
88
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
89
+ #
90
+ # @return [true, false]
91
+ attr_accessor :verify_ssl
92
+
93
+ ### TLS/SSL setting
94
+ # Set this to false to skip verifying SSL host name
95
+ # Default to true.
96
+ #
97
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
98
+ #
99
+ # @return [true, false]
100
+ attr_accessor :verify_ssl_host
101
+
102
+ ### TLS/SSL setting
103
+ # Set this to customize the certificate file to verify the peer.
104
+ #
105
+ # @return [String] the path to the certificate file
106
+ #
107
+ # @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code:
108
+ # https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145
109
+ attr_accessor :ssl_ca_cert
110
+
111
+ ### TLS/SSL setting
112
+ # Client certificate file (for client certificate)
113
+ attr_accessor :cert_file
114
+
115
+ ### TLS/SSL setting
116
+ # Client private key file (for client certificate)
117
+ attr_accessor :key_file
118
+
119
+ # Set this to customize parameters encoding of array parameter with multi collectionFormat.
120
+ # Default to nil.
121
+ #
122
+ # @see The params_encoding option of Ethon. Related source code:
123
+ # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
124
+ attr_accessor :params_encoding
125
+
126
+ attr_accessor :inject_format
127
+
128
+ attr_accessor :force_ending_format
129
+
130
+ def initialize
131
+ @scheme = 'https'
132
+ @host = ''
133
+ @base_path = '/alfresco/api/-default-/public/alfresco/versions/1'
134
+ @api_key = {}
135
+ @api_key_prefix = {}
136
+ @timeout = 0
137
+ @client_side_validation = true
138
+ @verify_ssl = true
139
+ @verify_ssl_host = true
140
+ @params_encoding = nil
141
+ @cert_file = nil
142
+ @key_file = nil
143
+ @debugging = false
144
+ @inject_format = false
145
+ @force_ending_format = false
146
+ @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
147
+
148
+ yield(self) if block_given?
149
+ end
150
+
151
+ # The default Configuration object.
152
+ def self.default
153
+ @@default ||= Configuration.new
154
+ end
155
+
156
+ def configure
157
+ yield(self) if block_given?
158
+ end
159
+
160
+ def scheme=(scheme)
161
+ # remove :// from scheme
162
+ @scheme = scheme.sub(/:\/\//, '')
163
+ end
164
+
165
+ def host=(host)
166
+ # remove http(s):// and anything after a slash
167
+ @host = host.sub(/https?:\/\//, '').split('/').first
168
+ end
169
+
170
+ def base_path=(base_path)
171
+ # Add leading and trailing slashes to base_path
172
+ @base_path = "/#{base_path}".gsub(/\/+/, '/')
173
+ @base_path = "" if @base_path == "/"
174
+ end
175
+
176
+ def base_url
177
+ url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
178
+ URI.encode(url)
179
+ end
180
+
181
+ # Gets API key (with prefix if set).
182
+ # @param [String] param_name the parameter name of API key auth
183
+ def api_key_with_prefix(param_name)
184
+ if @api_key_prefix[param_name]
185
+ "#{@api_key_prefix[param_name]} #{@api_key[param_name]}"
186
+ else
187
+ @api_key[param_name]
188
+ end
189
+ end
190
+
191
+ # Gets Basic Auth token string
192
+ def basic_auth_token
193
+ 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
194
+ end
195
+
196
+ # Returns Auth Settings hash for api client.
197
+ def auth_settings
198
+ {
199
+ 'basicAuth' =>
200
+ {
201
+ type: 'basic',
202
+ in: 'header',
203
+ key: 'Authorization',
204
+ value: basic_auth_token
205
+ },
206
+ }
207
+ end
208
+ end
209
+ end
@@ -0,0 +1,271 @@
1
+ =begin
2
+ #Alfresco Content Services REST API
3
+
4
+ #**Core API** Provides access to the core features of Alfresco Content Services.
5
+
6
+ OpenAPI spec version: 1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module AlfrescoAPI
16
+ # Activities describe any past activity in a site, for example creating an item of content, commenting on a node, liking an item of content.
17
+ class Activity
18
+ # The id of the person who performed the activity
19
+ attr_accessor :post_person_id
20
+
21
+ # The unique id of the activity
22
+ attr_accessor :id
23
+
24
+ # The unique id of the site on which the activity was performed
25
+ attr_accessor :site_id
26
+
27
+ # The date time at which the activity was performed
28
+ attr_accessor :posted_at
29
+
30
+ # The feed on which this activity was posted
31
+ attr_accessor :feed_person_id
32
+
33
+ # An object summarizing the activity
34
+ attr_accessor :activity_summary
35
+
36
+ # The type of the activity posted
37
+ attr_accessor :activity_type
38
+
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'post_person_id' => :'postPersonId',
44
+ :'id' => :'id',
45
+ :'site_id' => :'siteId',
46
+ :'posted_at' => :'postedAt',
47
+ :'feed_person_id' => :'feedPersonId',
48
+ :'activity_summary' => :'activitySummary',
49
+ :'activity_type' => :'activityType'
50
+ }
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.swagger_types
55
+ {
56
+ :'post_person_id' => :'String',
57
+ :'id' => :'Integer',
58
+ :'site_id' => :'String',
59
+ :'posted_at' => :'DateTime',
60
+ :'feed_person_id' => :'String',
61
+ :'activity_summary' => :'Hash<String, String>',
62
+ :'activity_type' => :'String'
63
+ }
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ return unless attributes.is_a?(Hash)
70
+
71
+ # convert string to symbol for hash key
72
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
73
+
74
+ if attributes.has_key?(:'postPersonId')
75
+ self.post_person_id = attributes[:'postPersonId']
76
+ end
77
+
78
+ if attributes.has_key?(:'id')
79
+ self.id = attributes[:'id']
80
+ end
81
+
82
+ if attributes.has_key?(:'siteId')
83
+ self.site_id = attributes[:'siteId']
84
+ end
85
+
86
+ if attributes.has_key?(:'postedAt')
87
+ self.posted_at = attributes[:'postedAt']
88
+ end
89
+
90
+ if attributes.has_key?(:'feedPersonId')
91
+ self.feed_person_id = attributes[:'feedPersonId']
92
+ end
93
+
94
+ if attributes.has_key?(:'activitySummary')
95
+ if (value = attributes[:'activitySummary']).is_a?(Array)
96
+ self.activity_summary = value
97
+ end
98
+ end
99
+
100
+ if attributes.has_key?(:'activityType')
101
+ self.activity_type = attributes[:'activityType']
102
+ end
103
+
104
+ end
105
+
106
+ # Show invalid properties with the reasons. Usually used together with valid?
107
+ # @return Array for valid properies with the reasons
108
+ def list_invalid_properties
109
+ invalid_properties = Array.new
110
+ if @post_person_id.nil?
111
+ invalid_properties.push("invalid value for 'post_person_id', post_person_id cannot be nil.")
112
+ end
113
+
114
+ if @id.nil?
115
+ invalid_properties.push("invalid value for 'id', id cannot be nil.")
116
+ end
117
+
118
+ if @feed_person_id.nil?
119
+ invalid_properties.push("invalid value for 'feed_person_id', feed_person_id cannot be nil.")
120
+ end
121
+
122
+ if @activity_type.nil?
123
+ invalid_properties.push("invalid value for 'activity_type', activity_type cannot be nil.")
124
+ end
125
+
126
+ return invalid_properties
127
+ end
128
+
129
+ # Check to see if the all the properties in the model are valid
130
+ # @return true if the model is valid
131
+ def valid?
132
+ return false if @post_person_id.nil?
133
+ return false if @id.nil?
134
+ return false if @feed_person_id.nil?
135
+ return false if @activity_type.nil?
136
+ return true
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ post_person_id == o.post_person_id &&
145
+ id == o.id &&
146
+ site_id == o.site_id &&
147
+ posted_at == o.posted_at &&
148
+ feed_person_id == o.feed_person_id &&
149
+ activity_summary == o.activity_summary &&
150
+ activity_type == o.activity_type
151
+ end
152
+
153
+ # @see the `==` method
154
+ # @param [Object] Object to be compared
155
+ def eql?(o)
156
+ self == o
157
+ end
158
+
159
+ # Calculates hash code according to all attributes.
160
+ # @return [Fixnum] Hash code
161
+ def hash
162
+ [post_person_id, id, site_id, posted_at, feed_person_id, activity_summary, activity_type].hash
163
+ end
164
+
165
+ # Builds the object from hash
166
+ # @param [Hash] attributes Model attributes in the form of hash
167
+ # @return [Object] Returns the model itself
168
+ def build_from_hash(attributes)
169
+ return nil unless attributes.is_a?(Hash)
170
+ self.class.swagger_types.each_pair do |key, type|
171
+ if type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
175
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
176
+ end
177
+ elsif !attributes[self.class.attribute_map[key]].nil?
178
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
179
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
180
+ end
181
+
182
+ self
183
+ end
184
+
185
+ # Deserializes the data based on type
186
+ # @param string type Data type
187
+ # @param string value Value to be deserialized
188
+ # @return [Object] Deserialized data
189
+ def _deserialize(type, value)
190
+ case type.to_sym
191
+ when :DateTime
192
+ DateTime.parse(value)
193
+ when :Date
194
+ Date.parse(value)
195
+ when :String
196
+ value.to_s
197
+ when :Integer
198
+ value.to_i
199
+ when :Float
200
+ value.to_f
201
+ when :BOOLEAN
202
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
203
+ true
204
+ else
205
+ false
206
+ end
207
+ when :Object
208
+ # generic object (usually a Hash), return directly
209
+ value
210
+ when /\AArray<(?<inner_type>.+)>\z/
211
+ inner_type = Regexp.last_match[:inner_type]
212
+ value.map { |v| _deserialize(inner_type, v) }
213
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
214
+ k_type = Regexp.last_match[:k_type]
215
+ v_type = Regexp.last_match[:v_type]
216
+ {}.tap do |hash|
217
+ value.each do |k, v|
218
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
219
+ end
220
+ end
221
+ else # model
222
+ temp_model = AlfrescoAPI.const_get(type).new
223
+ temp_model.build_from_hash(value)
224
+ end
225
+ end
226
+
227
+ # Returns the string representation of the object
228
+ # @return [String] String presentation of the object
229
+ def to_s
230
+ to_hash.to_s
231
+ end
232
+
233
+ # to_body is an alias to to_hash (backward compatibility)
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_body
236
+ to_hash
237
+ end
238
+
239
+ # Returns the object in the form of hash
240
+ # @return [Hash] Returns the object in the form of hash
241
+ def to_hash
242
+ hash = {}
243
+ self.class.attribute_map.each_pair do |attr, param|
244
+ value = self.send(attr)
245
+ next if value.nil?
246
+ hash[param] = _to_hash(value)
247
+ end
248
+ hash
249
+ end
250
+
251
+ # Outputs non-array value in the form of hash
252
+ # For object, use to_hash. Otherwise, just return the value
253
+ # @param [Object] value Any valid value
254
+ # @return [Hash] Returns the value in the form of hash
255
+ def _to_hash(value)
256
+ if value.is_a?(Array)
257
+ value.compact.map{ |v| _to_hash(v) }
258
+ elsif value.is_a?(Hash)
259
+ {}.tap do |hash|
260
+ value.each { |k, v| hash[k] = _to_hash(v) }
261
+ end
262
+ elsif value.respond_to? :to_hash
263
+ value.to_hash
264
+ else
265
+ value
266
+ end
267
+ end
268
+
269
+ end
270
+
271
+ end