ejabberd_http_client 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (520) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +13 -0
  3. data/Gemfile.lock +72 -0
  4. data/README.md +411 -0
  5. data/Rakefile +10 -0
  6. data/docs/AbortDeleteOldMamMessages200Response.md +18 -0
  7. data/docs/AbortDeleteOldMamMessagesRequest.md +18 -0
  8. data/docs/AccountsApi.md +640 -0
  9. data/docs/AcmeApi.md +197 -0
  10. data/docs/AddOAuthClientImplicitRequest.md +22 -0
  11. data/docs/AddOAuthClientPasswordRequest.md +22 -0
  12. data/docs/AddRosterItemRequest.md +30 -0
  13. data/docs/BackupRequest.md +18 -0
  14. data/docs/BanAccountRequest.md +22 -0
  15. data/docs/BookmarksToPepRequest.md +20 -0
  16. data/docs/ChangeNodeNameRequest.md +24 -0
  17. data/docs/ChangePasswordRequest.md +22 -0
  18. data/docs/ChangeRoomOptionRequest.md +24 -0
  19. data/docs/CheckAccountRequest.md +20 -0
  20. data/docs/CheckModuleRequest.md +18 -0
  21. data/docs/CheckPasswordHashRequest.md +24 -0
  22. data/docs/CheckPasswordRequest.md +22 -0
  23. data/docs/ClusterApi.md +256 -0
  24. data/docs/CompileRequest.md +18 -0
  25. data/docs/ConfigApi.md +192 -0
  26. data/docs/ConnectedUsersInfo200ResponseInner.md +36 -0
  27. data/docs/ConnectedUsersNumber200Response.md +18 -0
  28. data/docs/ConnectedUsersVHostRequest.md +18 -0
  29. data/docs/ConvertToScramRequest.md +18 -0
  30. data/docs/ConvertToYamlRequest.md +20 -0
  31. data/docs/CreateRoomRequest.md +22 -0
  32. data/docs/CreateRoomWithOptionsRequest.md +24 -0
  33. data/docs/CreateRoomWithOptionsRequestOptionsInner.md +20 -0
  34. data/docs/CreateRoomsFileRequest.md +18 -0
  35. data/docs/DeleteMnesiaRequest.md +18 -0
  36. data/docs/DeleteOldMAMMessagesBatchRequest.md +26 -0
  37. data/docs/DeleteOldMAMMessagesRequest.md +20 -0
  38. data/docs/DeleteOldMAMMessagesStatusRequest.md +18 -0
  39. data/docs/DeleteOldMessagesBatchRequest.md +24 -0
  40. data/docs/DeleteOldMessagesRequest.md +18 -0
  41. data/docs/DeleteOldPubsubItemsRequest.md +18 -0
  42. data/docs/DeleteOldUsersRequest.md +18 -0
  43. data/docs/DocumentationApi.md +255 -0
  44. data/docs/DumpConfigRequest.md +18 -0
  45. data/docs/DumpRequest.md +18 -0
  46. data/docs/DumpTableRequest.md +20 -0
  47. data/docs/ErlangApi.md +194 -0
  48. data/docs/Export2sqlRequest.md +20 -0
  49. data/docs/ExportPiefxisHostRequest.md +20 -0
  50. data/docs/ExportPiefxisRequest.md +18 -0
  51. data/docs/GenHtmlDocForCommandsRequest.md +22 -0
  52. data/docs/GenMarkdownDocForTagsRequest.md +18 -0
  53. data/docs/GetCookie200Response.md +18 -0
  54. data/docs/GetLast200Response.md +20 -0
  55. data/docs/GetLastRequest.md +20 -0
  56. data/docs/GetLoglevel200Response.md +18 -0
  57. data/docs/GetNumResources200Response.md +18 -0
  58. data/docs/GetOfflineCount200Response.md +18 -0
  59. data/docs/GetOfflineCountRequest.md +20 -0
  60. data/docs/GetOutgoingS2sNumber200Response.md +18 -0
  61. data/docs/GetPresence200Response.md +22 -0
  62. data/docs/GetRoomAffiliation200Response.md +18 -0
  63. data/docs/GetRoomAffiliationRequest.md +22 -0
  64. data/docs/GetRoomAffiliations200ResponseInner.md +24 -0
  65. data/docs/GetRoomAffiliationsRequest.md +20 -0
  66. data/docs/GetRoomHistory200ResponseInner.md +20 -0
  67. data/docs/GetRoomOccupants200ResponseInner.md +22 -0
  68. data/docs/GetRoomOccupantsNumber200Response.md +18 -0
  69. data/docs/GetRoomOptions200ResponseInner.md +20 -0
  70. data/docs/GetRoster200ResponseInner.md +26 -0
  71. data/docs/GetStats200Response.md +18 -0
  72. data/docs/GetStatsHostRequest.md +20 -0
  73. data/docs/GetStatsRequest.md +18 -0
  74. data/docs/GetStatusList200ResponseInner.md +26 -0
  75. data/docs/GetStatusListHostRequest.md +20 -0
  76. data/docs/GetStatusListRequest.md +18 -0
  77. data/docs/GetStatusNum200Response.md +18 -0
  78. data/docs/GetUserRoomsRequest.md +20 -0
  79. data/docs/GetUserSessionsInfo200ResponseInner.md +34 -0
  80. data/docs/GetUserSubscriptions200ResponseInner.md +22 -0
  81. data/docs/GetVcard200Response.md +18 -0
  82. data/docs/GetVcard2MultiRequest.md +24 -0
  83. data/docs/GetVcard2Request.md +24 -0
  84. data/docs/GetVcardRequest.md +22 -0
  85. data/docs/ImportDir200Response.md +18 -0
  86. data/docs/ImportDirRequest.md +18 -0
  87. data/docs/ImportFileRequest.md +18 -0
  88. data/docs/ImportPiefxisRequest.md +18 -0
  89. data/docs/ImportProsodyRequest.md +18 -0
  90. data/docs/IncomingS2sNumber200Response.md +18 -0
  91. data/docs/InstallFallbackRequest.md +18 -0
  92. data/docs/IssueOAuthToken200Response.md +22 -0
  93. data/docs/IssueOAuthTokenRequest.md +22 -0
  94. data/docs/JoinClusterRequest.md +18 -0
  95. data/docs/KickSessionRequest.md +24 -0
  96. data/docs/KickUser200Response.md +18 -0
  97. data/docs/LastApi.md +135 -0
  98. data/docs/LeaveClusterRequest.md +18 -0
  99. data/docs/ListCertificates200ResponseInner.md +22 -0
  100. data/docs/ListMucOnlineRoomsByRegex200ResponseInner.md +22 -0
  101. data/docs/ListMucOnlineRoomsByRegexRequest.md +20 -0
  102. data/docs/ListMucOnlineRoomsRequest.md +18 -0
  103. data/docs/ListOAuthTokens200ResponseInner.md +24 -0
  104. data/docs/LoadDatabaseRequest.md +18 -0
  105. data/docs/LogsApi.md +252 -0
  106. data/docs/MamApi.md +137 -0
  107. data/docs/MnesiaApi.md +1071 -0
  108. data/docs/ModulesApi.md +434 -0
  109. data/docs/MucApi.md +705 -0
  110. data/docs/MucRoomApi.md +959 -0
  111. data/docs/OauthApi.md +378 -0
  112. data/docs/OfflineApi.md +70 -0
  113. data/docs/PrivacySetRequest.md +22 -0
  114. data/docs/PrivateApi.md +199 -0
  115. data/docs/PrivateGetRequest.md +24 -0
  116. data/docs/PrivateSetRequest.md +22 -0
  117. data/docs/ProcessRosterItems200ResponseInner.md +20 -0
  118. data/docs/ProcessRosterItemsRequest.md +26 -0
  119. data/docs/PurgeApi.md +815 -0
  120. data/docs/PushAllToAllRequest.md +20 -0
  121. data/docs/PushRosterAllRequest.md +18 -0
  122. data/docs/PushRosterRequest.md +22 -0
  123. data/docs/RegisterMucNickRequest.md +22 -0
  124. data/docs/RegisterRequest.md +22 -0
  125. data/docs/RegisteredUsersRequest.md +18 -0
  126. data/docs/RemoveMamForUserWithPeerRequest.md +22 -0
  127. data/docs/RemoveOAuthClientRequest.md +18 -0
  128. data/docs/RequestCertificateRequest.md +18 -0
  129. data/docs/ResourceNum200Response.md +18 -0
  130. data/docs/ResourceNumRequest.md +22 -0
  131. data/docs/RestartModule200Response.md +18 -0
  132. data/docs/RestartModuleRequest.md +20 -0
  133. data/docs/RestoreRequest.md +18 -0
  134. data/docs/RevokeCertificateRequest.md +18 -0
  135. data/docs/RevokeOAuthTokenRequest.md +18 -0
  136. data/docs/RoomsEmptyDestroyRequest.md +18 -0
  137. data/docs/RoomsUnusedDestroyRequest.md +20 -0
  138. data/docs/RosterApi.md +392 -0
  139. data/docs/S2sApi.md +187 -0
  140. data/docs/SendDirectInvitationRequest.md +26 -0
  141. data/docs/SendMessageRequest.md +26 -0
  142. data/docs/SendStanzaC2SRequest.md +24 -0
  143. data/docs/SendStanzaRequest.md +22 -0
  144. data/docs/ServerApi.md +615 -0
  145. data/docs/SessionApi.md +1021 -0
  146. data/docs/SetLastRequest.md +24 -0
  147. data/docs/SetLoglevelRequest.md +18 -0
  148. data/docs/SetMasterRequest.md +18 -0
  149. data/docs/SetNicknameRequest.md +22 -0
  150. data/docs/SetPresenceRequest.md +30 -0
  151. data/docs/SetRoomAffiliationRequest.md +24 -0
  152. data/docs/SetVcard2MultiRequest.md +26 -0
  153. data/docs/SetVcard2Request.md +26 -0
  154. data/docs/SetVcardRequest.md +24 -0
  155. data/docs/SharedRosterGroupApi.md +462 -0
  156. data/docs/SqlApi.md +191 -0
  157. data/docs/SrgCreateRequest.md +26 -0
  158. data/docs/SrgDeleteRequest.md +20 -0
  159. data/docs/SrgGetInfo200ResponseInner.md +20 -0
  160. data/docs/SrgUserAddRequest.md +24 -0
  161. data/docs/StanzaApi.md +267 -0
  162. data/docs/StatisticsApi.md +447 -0
  163. data/docs/StopKindlyRequest.md +20 -0
  164. data/docs/SubscribeToRoomManyRequest.md +22 -0
  165. data/docs/SubscribeToRoomManyRequestUsersInner.md +20 -0
  166. data/docs/SubscribeToRoomRequest.md +24 -0
  167. data/docs/TableMnesiaInfoRequest.md +18 -0
  168. data/docs/UnbanIp200Response.md +18 -0
  169. data/docs/UnbanIpRequest.md +18 -0
  170. data/docs/UnregisterMucNickRequest.md +20 -0
  171. data/docs/UnregisterUserRequest.md +20 -0
  172. data/docs/UnsubscribeFromRoomRequest.md +20 -0
  173. data/docs/VcardApi.md +456 -0
  174. data/ejabberd_http_client.gemspec +37 -0
  175. data/git_push.sh +57 -0
  176. data/lib/ejabberd_http_client/api/accounts_api.rb +656 -0
  177. data/lib/ejabberd_http_client/api/acme_api.rb +201 -0
  178. data/lib/ejabberd_http_client/api/cluster_api.rb +267 -0
  179. data/lib/ejabberd_http_client/api/config_api.rb +207 -0
  180. data/lib/ejabberd_http_client/api/documentation_api.rb +273 -0
  181. data/lib/ejabberd_http_client/api/erlang_api.rb +203 -0
  182. data/lib/ejabberd_http_client/api/last_api.rb +150 -0
  183. data/lib/ejabberd_http_client/api/logs_api.rb +249 -0
  184. data/lib/ejabberd_http_client/api/mam_api.rb +146 -0
  185. data/lib/ejabberd_http_client/api/mnesia_api.rb +1119 -0
  186. data/lib/ejabberd_http_client/api/modules_api.rb +441 -0
  187. data/lib/ejabberd_http_client/api/muc_api.rb +726 -0
  188. data/lib/ejabberd_http_client/api/muc_room_api.rb +986 -0
  189. data/lib/ejabberd_http_client/api/oauth_api.rb +399 -0
  190. data/lib/ejabberd_http_client/api/offline_api.rb +88 -0
  191. data/lib/ejabberd_http_client/api/private_api.rb +212 -0
  192. data/lib/ejabberd_http_client/api/purge_api.rb +848 -0
  193. data/lib/ejabberd_http_client/api/roster_api.rb +400 -0
  194. data/lib/ejabberd_http_client/api/s2s_api.rb +187 -0
  195. data/lib/ejabberd_http_client/api/server_api.rb +582 -0
  196. data/lib/ejabberd_http_client/api/session_api.rb +1011 -0
  197. data/lib/ejabberd_http_client/api/shared_roster_group_api.rb +456 -0
  198. data/lib/ejabberd_http_client/api/sql_api.rb +205 -0
  199. data/lib/ejabberd_http_client/api/stanza_api.rb +270 -0
  200. data/lib/ejabberd_http_client/api/statistics_api.rb +435 -0
  201. data/lib/ejabberd_http_client/api/vcard_api.rb +468 -0
  202. data/lib/ejabberd_http_client/api_client.rb +391 -0
  203. data/lib/ejabberd_http_client/api_error.rb +58 -0
  204. data/lib/ejabberd_http_client/configuration.rb +290 -0
  205. data/lib/ejabberd_http_client/models/abort_delete_old_mam_messages200_response.rb +215 -0
  206. data/lib/ejabberd_http_client/models/abort_delete_old_mam_messages_request.rb +215 -0
  207. data/lib/ejabberd_http_client/models/add_o_auth_client_implicit_request.rb +235 -0
  208. data/lib/ejabberd_http_client/models/add_o_auth_client_password_request.rb +235 -0
  209. data/lib/ejabberd_http_client/models/add_roster_item_request.rb +275 -0
  210. data/lib/ejabberd_http_client/models/backup_request.rb +215 -0
  211. data/lib/ejabberd_http_client/models/ban_account_request.rb +235 -0
  212. data/lib/ejabberd_http_client/models/bookmarks_to_pep_request.rb +225 -0
  213. data/lib/ejabberd_http_client/models/change_node_name_request.rb +245 -0
  214. data/lib/ejabberd_http_client/models/change_password_request.rb +235 -0
  215. data/lib/ejabberd_http_client/models/change_room_option_request.rb +245 -0
  216. data/lib/ejabberd_http_client/models/check_account_request.rb +225 -0
  217. data/lib/ejabberd_http_client/models/check_module_request.rb +215 -0
  218. data/lib/ejabberd_http_client/models/check_password_hash_request.rb +245 -0
  219. data/lib/ejabberd_http_client/models/check_password_request.rb +235 -0
  220. data/lib/ejabberd_http_client/models/compile_request.rb +215 -0
  221. data/lib/ejabberd_http_client/models/connected_users_info200_response_inner.rb +305 -0
  222. data/lib/ejabberd_http_client/models/connected_users_number200_response.rb +215 -0
  223. data/lib/ejabberd_http_client/models/connected_users_v_host_request.rb +215 -0
  224. data/lib/ejabberd_http_client/models/convert_to_scram_request.rb +215 -0
  225. data/lib/ejabberd_http_client/models/convert_to_yaml_request.rb +225 -0
  226. data/lib/ejabberd_http_client/models/create_room_request.rb +235 -0
  227. data/lib/ejabberd_http_client/models/create_room_with_options_request.rb +246 -0
  228. data/lib/ejabberd_http_client/models/create_room_with_options_request_options_inner.rb +225 -0
  229. data/lib/ejabberd_http_client/models/create_rooms_file_request.rb +215 -0
  230. data/lib/ejabberd_http_client/models/delete_mnesia_request.rb +215 -0
  231. data/lib/ejabberd_http_client/models/delete_old_mam_messages_batch_request.rb +255 -0
  232. data/lib/ejabberd_http_client/models/delete_old_mam_messages_request.rb +225 -0
  233. data/lib/ejabberd_http_client/models/delete_old_mam_messages_status_request.rb +215 -0
  234. data/lib/ejabberd_http_client/models/delete_old_messages_batch_request.rb +245 -0
  235. data/lib/ejabberd_http_client/models/delete_old_messages_request.rb +215 -0
  236. data/lib/ejabberd_http_client/models/delete_old_pubsub_items_request.rb +215 -0
  237. data/lib/ejabberd_http_client/models/delete_old_users_request.rb +215 -0
  238. data/lib/ejabberd_http_client/models/dump_config_request.rb +215 -0
  239. data/lib/ejabberd_http_client/models/dump_request.rb +215 -0
  240. data/lib/ejabberd_http_client/models/dump_table_request.rb +225 -0
  241. data/lib/ejabberd_http_client/models/export2sql_request.rb +225 -0
  242. data/lib/ejabberd_http_client/models/export_piefxis_host_request.rb +225 -0
  243. data/lib/ejabberd_http_client/models/export_piefxis_request.rb +215 -0
  244. data/lib/ejabberd_http_client/models/gen_html_doc_for_commands_request.rb +235 -0
  245. data/lib/ejabberd_http_client/models/gen_markdown_doc_for_tags_request.rb +215 -0
  246. data/lib/ejabberd_http_client/models/get_cookie200_response.rb +215 -0
  247. data/lib/ejabberd_http_client/models/get_last200_response.rb +225 -0
  248. data/lib/ejabberd_http_client/models/get_last_request.rb +225 -0
  249. data/lib/ejabberd_http_client/models/get_loglevel200_response.rb +215 -0
  250. data/lib/ejabberd_http_client/models/get_num_resources200_response.rb +214 -0
  251. data/lib/ejabberd_http_client/models/get_offline_count200_response.rb +215 -0
  252. data/lib/ejabberd_http_client/models/get_offline_count_request.rb +223 -0
  253. data/lib/ejabberd_http_client/models/get_outgoing_s2s_number200_response.rb +214 -0
  254. data/lib/ejabberd_http_client/models/get_presence200_response.rb +235 -0
  255. data/lib/ejabberd_http_client/models/get_room_affiliation200_response.rb +215 -0
  256. data/lib/ejabberd_http_client/models/get_room_affiliation_request.rb +235 -0
  257. data/lib/ejabberd_http_client/models/get_room_affiliations200_response_inner.rb +241 -0
  258. data/lib/ejabberd_http_client/models/get_room_affiliations_request.rb +225 -0
  259. data/lib/ejabberd_http_client/models/get_room_history200_response_inner.rb +223 -0
  260. data/lib/ejabberd_http_client/models/get_room_occupants200_response_inner.rb +232 -0
  261. data/lib/ejabberd_http_client/models/get_room_occupants_number200_response.rb +214 -0
  262. data/lib/ejabberd_http_client/models/get_room_options200_response_inner.rb +223 -0
  263. data/lib/ejabberd_http_client/models/get_roster200_response_inner.rb +252 -0
  264. data/lib/ejabberd_http_client/models/get_stats200_response.rb +215 -0
  265. data/lib/ejabberd_http_client/models/get_stats_host_request.rb +225 -0
  266. data/lib/ejabberd_http_client/models/get_stats_request.rb +215 -0
  267. data/lib/ejabberd_http_client/models/get_status_list200_response_inner.rb +255 -0
  268. data/lib/ejabberd_http_client/models/get_status_list_host_request.rb +225 -0
  269. data/lib/ejabberd_http_client/models/get_status_list_request.rb +215 -0
  270. data/lib/ejabberd_http_client/models/get_status_num200_response.rb +215 -0
  271. data/lib/ejabberd_http_client/models/get_user_rooms_request.rb +225 -0
  272. data/lib/ejabberd_http_client/models/get_user_sessions_info200_response_inner.rb +295 -0
  273. data/lib/ejabberd_http_client/models/get_user_subscriptions200_response_inner.rb +234 -0
  274. data/lib/ejabberd_http_client/models/get_vcard200_response.rb +214 -0
  275. data/lib/ejabberd_http_client/models/get_vcard2_multi_request.rb +241 -0
  276. data/lib/ejabberd_http_client/models/get_vcard2_request.rb +245 -0
  277. data/lib/ejabberd_http_client/models/get_vcard_request.rb +235 -0
  278. data/lib/ejabberd_http_client/models/import_dir200_response.rb +214 -0
  279. data/lib/ejabberd_http_client/models/import_dir_request.rb +215 -0
  280. data/lib/ejabberd_http_client/models/import_file_request.rb +215 -0
  281. data/lib/ejabberd_http_client/models/import_piefxis_request.rb +215 -0
  282. data/lib/ejabberd_http_client/models/import_prosody_request.rb +215 -0
  283. data/lib/ejabberd_http_client/models/incoming_s2s_number200_response.rb +214 -0
  284. data/lib/ejabberd_http_client/models/install_fallback_request.rb +215 -0
  285. data/lib/ejabberd_http_client/models/issue_o_auth_token200_response.rb +232 -0
  286. data/lib/ejabberd_http_client/models/issue_o_auth_token_request.rb +235 -0
  287. data/lib/ejabberd_http_client/models/join_cluster_request.rb +215 -0
  288. data/lib/ejabberd_http_client/models/kick_session_request.rb +245 -0
  289. data/lib/ejabberd_http_client/models/kick_user200_response.rb +215 -0
  290. data/lib/ejabberd_http_client/models/leave_cluster_request.rb +215 -0
  291. data/lib/ejabberd_http_client/models/list_certificates200_response_inner.rb +235 -0
  292. data/lib/ejabberd_http_client/models/list_muc_online_rooms_by_regex200_response_inner.rb +232 -0
  293. data/lib/ejabberd_http_client/models/list_muc_online_rooms_by_regex_request.rb +225 -0
  294. data/lib/ejabberd_http_client/models/list_muc_online_rooms_request.rb +215 -0
  295. data/lib/ejabberd_http_client/models/list_o_auth_tokens200_response_inner.rb +241 -0
  296. data/lib/ejabberd_http_client/models/load_database_request.rb +215 -0
  297. data/lib/ejabberd_http_client/models/privacy_set_request.rb +232 -0
  298. data/lib/ejabberd_http_client/models/private_get_request.rb +241 -0
  299. data/lib/ejabberd_http_client/models/private_set_request.rb +232 -0
  300. data/lib/ejabberd_http_client/models/process_roster_items200_response_inner.rb +223 -0
  301. data/lib/ejabberd_http_client/models/process_roster_items_request.rb +250 -0
  302. data/lib/ejabberd_http_client/models/push_all_to_all_request.rb +223 -0
  303. data/lib/ejabberd_http_client/models/push_roster_all_request.rb +214 -0
  304. data/lib/ejabberd_http_client/models/push_roster_request.rb +232 -0
  305. data/lib/ejabberd_http_client/models/register_muc_nick_request.rb +235 -0
  306. data/lib/ejabberd_http_client/models/register_request.rb +232 -0
  307. data/lib/ejabberd_http_client/models/registered_users_request.rb +214 -0
  308. data/lib/ejabberd_http_client/models/remove_mam_for_user_with_peer_request.rb +232 -0
  309. data/lib/ejabberd_http_client/models/remove_o_auth_client_request.rb +215 -0
  310. data/lib/ejabberd_http_client/models/request_certificate_request.rb +215 -0
  311. data/lib/ejabberd_http_client/models/resource_num200_response.rb +214 -0
  312. data/lib/ejabberd_http_client/models/resource_num_request.rb +235 -0
  313. data/lib/ejabberd_http_client/models/restart_module200_response.rb +214 -0
  314. data/lib/ejabberd_http_client/models/restart_module_request.rb +225 -0
  315. data/lib/ejabberd_http_client/models/restore_request.rb +215 -0
  316. data/lib/ejabberd_http_client/models/revoke_certificate_request.rb +215 -0
  317. data/lib/ejabberd_http_client/models/revoke_o_auth_token_request.rb +215 -0
  318. data/lib/ejabberd_http_client/models/rooms_empty_destroy_request.rb +215 -0
  319. data/lib/ejabberd_http_client/models/rooms_unused_destroy_request.rb +225 -0
  320. data/lib/ejabberd_http_client/models/send_direct_invitation_request.rb +255 -0
  321. data/lib/ejabberd_http_client/models/send_message_request.rb +255 -0
  322. data/lib/ejabberd_http_client/models/send_stanza_c2_s_request.rb +245 -0
  323. data/lib/ejabberd_http_client/models/send_stanza_request.rb +235 -0
  324. data/lib/ejabberd_http_client/models/set_last_request.rb +245 -0
  325. data/lib/ejabberd_http_client/models/set_loglevel_request.rb +215 -0
  326. data/lib/ejabberd_http_client/models/set_master_request.rb +215 -0
  327. data/lib/ejabberd_http_client/models/set_nickname_request.rb +235 -0
  328. data/lib/ejabberd_http_client/models/set_presence_request.rb +275 -0
  329. data/lib/ejabberd_http_client/models/set_room_affiliation_request.rb +245 -0
  330. data/lib/ejabberd_http_client/models/set_vcard2_multi_request.rb +257 -0
  331. data/lib/ejabberd_http_client/models/set_vcard2_request.rb +255 -0
  332. data/lib/ejabberd_http_client/models/set_vcard_request.rb +245 -0
  333. data/lib/ejabberd_http_client/models/srg_create_request.rb +255 -0
  334. data/lib/ejabberd_http_client/models/srg_delete_request.rb +225 -0
  335. data/lib/ejabberd_http_client/models/srg_get_info200_response_inner.rb +225 -0
  336. data/lib/ejabberd_http_client/models/srg_user_add_request.rb +245 -0
  337. data/lib/ejabberd_http_client/models/stop_kindly_request.rb +225 -0
  338. data/lib/ejabberd_http_client/models/subscribe_to_room_many_request.rb +236 -0
  339. data/lib/ejabberd_http_client/models/subscribe_to_room_many_request_users_inner.rb +225 -0
  340. data/lib/ejabberd_http_client/models/subscribe_to_room_request.rb +245 -0
  341. data/lib/ejabberd_http_client/models/table_mnesia_info_request.rb +215 -0
  342. data/lib/ejabberd_http_client/models/unban_ip200_response.rb +215 -0
  343. data/lib/ejabberd_http_client/models/unban_ip_request.rb +215 -0
  344. data/lib/ejabberd_http_client/models/unregister_muc_nick_request.rb +225 -0
  345. data/lib/ejabberd_http_client/models/unregister_user_request.rb +225 -0
  346. data/lib/ejabberd_http_client/models/unsubscribe_from_room_request.rb +225 -0
  347. data/lib/ejabberd_http_client/version.rb +15 -0
  348. data/lib/ejabberd_http_client.rb +207 -0
  349. data/spec/api/accounts_api_spec.rb +145 -0
  350. data/spec/api/acme_api_spec.rb +67 -0
  351. data/spec/api/cluster_api_spec.rb +78 -0
  352. data/spec/api/config_api_spec.rb +67 -0
  353. data/spec/api/documentation_api_spec.rb +78 -0
  354. data/spec/api/erlang_api_spec.rb +67 -0
  355. data/spec/api/last_api_spec.rb +57 -0
  356. data/spec/api/logs_api_spec.rb +76 -0
  357. data/spec/api/mam_api_spec.rb +57 -0
  358. data/spec/api/mnesia_api_spec.rb +221 -0
  359. data/spec/api/modules_api_spec.rb +109 -0
  360. data/spec/api/muc_api_spec.rb +156 -0
  361. data/spec/api/muc_room_api_spec.rb +200 -0
  362. data/spec/api/oauth_api_spec.rb +100 -0
  363. data/spec/api/offline_api_spec.rb +46 -0
  364. data/spec/api/private_api_spec.rb +68 -0
  365. data/spec/api/purge_api_spec.rb +176 -0
  366. data/spec/api/roster_api_spec.rb +101 -0
  367. data/spec/api/s2s_api_spec.rb +65 -0
  368. data/spec/api/server_api_spec.rb +137 -0
  369. data/spec/api/session_api_spec.rb +208 -0
  370. data/spec/api/shared_roster_group_api_spec.rb +112 -0
  371. data/spec/api/sql_api_spec.rb +67 -0
  372. data/spec/api/stanza_api_spec.rb +79 -0
  373. data/spec/api/statistics_api_spec.rb +109 -0
  374. data/spec/api/vcard_api_spec.rb +112 -0
  375. data/spec/api_client_spec.rb +228 -0
  376. data/spec/configuration_spec.rb +42 -0
  377. data/spec/models/abort_delete_old_mam_messages200_response_spec.rb +34 -0
  378. data/spec/models/abort_delete_old_mam_messages_request_spec.rb +34 -0
  379. data/spec/models/add_o_auth_client_implicit_request_spec.rb +46 -0
  380. data/spec/models/add_o_auth_client_password_request_spec.rb +46 -0
  381. data/spec/models/add_roster_item_request_spec.rb +70 -0
  382. data/spec/models/backup_request_spec.rb +34 -0
  383. data/spec/models/ban_account_request_spec.rb +46 -0
  384. data/spec/models/bookmarks_to_pep_request_spec.rb +40 -0
  385. data/spec/models/change_node_name_request_spec.rb +52 -0
  386. data/spec/models/change_password_request_spec.rb +46 -0
  387. data/spec/models/change_room_option_request_spec.rb +52 -0
  388. data/spec/models/check_account_request_spec.rb +40 -0
  389. data/spec/models/check_module_request_spec.rb +34 -0
  390. data/spec/models/check_password_hash_request_spec.rb +52 -0
  391. data/spec/models/check_password_request_spec.rb +46 -0
  392. data/spec/models/compile_request_spec.rb +34 -0
  393. data/spec/models/connected_users_info200_response_inner_spec.rb +88 -0
  394. data/spec/models/connected_users_number200_response_spec.rb +34 -0
  395. data/spec/models/connected_users_v_host_request_spec.rb +34 -0
  396. data/spec/models/convert_to_scram_request_spec.rb +34 -0
  397. data/spec/models/convert_to_yaml_request_spec.rb +40 -0
  398. data/spec/models/create_room_request_spec.rb +46 -0
  399. data/spec/models/create_room_with_options_request_options_inner_spec.rb +40 -0
  400. data/spec/models/create_room_with_options_request_spec.rb +52 -0
  401. data/spec/models/create_rooms_file_request_spec.rb +34 -0
  402. data/spec/models/delete_mnesia_request_spec.rb +34 -0
  403. data/spec/models/delete_old_mam_messages_batch_request_spec.rb +58 -0
  404. data/spec/models/delete_old_mam_messages_request_spec.rb +40 -0
  405. data/spec/models/delete_old_mam_messages_status_request_spec.rb +34 -0
  406. data/spec/models/delete_old_messages_batch_request_spec.rb +52 -0
  407. data/spec/models/delete_old_messages_request_spec.rb +34 -0
  408. data/spec/models/delete_old_pubsub_items_request_spec.rb +34 -0
  409. data/spec/models/delete_old_users_request_spec.rb +34 -0
  410. data/spec/models/dump_config_request_spec.rb +34 -0
  411. data/spec/models/dump_request_spec.rb +34 -0
  412. data/spec/models/dump_table_request_spec.rb +40 -0
  413. data/spec/models/export2sql_request_spec.rb +40 -0
  414. data/spec/models/export_piefxis_host_request_spec.rb +40 -0
  415. data/spec/models/export_piefxis_request_spec.rb +34 -0
  416. data/spec/models/gen_html_doc_for_commands_request_spec.rb +46 -0
  417. data/spec/models/gen_markdown_doc_for_tags_request_spec.rb +34 -0
  418. data/spec/models/get_cookie200_response_spec.rb +34 -0
  419. data/spec/models/get_last200_response_spec.rb +40 -0
  420. data/spec/models/get_last_request_spec.rb +40 -0
  421. data/spec/models/get_loglevel200_response_spec.rb +34 -0
  422. data/spec/models/get_num_resources200_response_spec.rb +34 -0
  423. data/spec/models/get_offline_count200_response_spec.rb +34 -0
  424. data/spec/models/get_offline_count_request_spec.rb +40 -0
  425. data/spec/models/get_outgoing_s2s_number200_response_spec.rb +34 -0
  426. data/spec/models/get_presence200_response_spec.rb +46 -0
  427. data/spec/models/get_room_affiliation200_response_spec.rb +34 -0
  428. data/spec/models/get_room_affiliation_request_spec.rb +46 -0
  429. data/spec/models/get_room_affiliations200_response_inner_spec.rb +52 -0
  430. data/spec/models/get_room_affiliations_request_spec.rb +40 -0
  431. data/spec/models/get_room_history200_response_inner_spec.rb +40 -0
  432. data/spec/models/get_room_occupants200_response_inner_spec.rb +46 -0
  433. data/spec/models/get_room_occupants_number200_response_spec.rb +34 -0
  434. data/spec/models/get_room_options200_response_inner_spec.rb +40 -0
  435. data/spec/models/get_roster200_response_inner_spec.rb +58 -0
  436. data/spec/models/get_stats200_response_spec.rb +34 -0
  437. data/spec/models/get_stats_host_request_spec.rb +40 -0
  438. data/spec/models/get_stats_request_spec.rb +34 -0
  439. data/spec/models/get_status_list200_response_inner_spec.rb +58 -0
  440. data/spec/models/get_status_list_host_request_spec.rb +40 -0
  441. data/spec/models/get_status_list_request_spec.rb +34 -0
  442. data/spec/models/get_status_num200_response_spec.rb +34 -0
  443. data/spec/models/get_user_rooms_request_spec.rb +40 -0
  444. data/spec/models/get_user_sessions_info200_response_inner_spec.rb +82 -0
  445. data/spec/models/get_user_subscriptions200_response_inner_spec.rb +46 -0
  446. data/spec/models/get_vcard200_response_spec.rb +34 -0
  447. data/spec/models/get_vcard2_multi_request_spec.rb +52 -0
  448. data/spec/models/get_vcard2_request_spec.rb +52 -0
  449. data/spec/models/get_vcard_request_spec.rb +46 -0
  450. data/spec/models/import_dir200_response_spec.rb +34 -0
  451. data/spec/models/import_dir_request_spec.rb +34 -0
  452. data/spec/models/import_file_request_spec.rb +34 -0
  453. data/spec/models/import_piefxis_request_spec.rb +34 -0
  454. data/spec/models/import_prosody_request_spec.rb +34 -0
  455. data/spec/models/incoming_s2s_number200_response_spec.rb +34 -0
  456. data/spec/models/install_fallback_request_spec.rb +34 -0
  457. data/spec/models/issue_o_auth_token200_response_spec.rb +46 -0
  458. data/spec/models/issue_o_auth_token_request_spec.rb +46 -0
  459. data/spec/models/join_cluster_request_spec.rb +34 -0
  460. data/spec/models/kick_session_request_spec.rb +52 -0
  461. data/spec/models/kick_user200_response_spec.rb +34 -0
  462. data/spec/models/leave_cluster_request_spec.rb +34 -0
  463. data/spec/models/list_certificates200_response_inner_spec.rb +46 -0
  464. data/spec/models/list_muc_online_rooms_by_regex200_response_inner_spec.rb +46 -0
  465. data/spec/models/list_muc_online_rooms_by_regex_request_spec.rb +40 -0
  466. data/spec/models/list_muc_online_rooms_request_spec.rb +34 -0
  467. data/spec/models/list_o_auth_tokens200_response_inner_spec.rb +52 -0
  468. data/spec/models/load_database_request_spec.rb +34 -0
  469. data/spec/models/privacy_set_request_spec.rb +46 -0
  470. data/spec/models/private_get_request_spec.rb +52 -0
  471. data/spec/models/private_set_request_spec.rb +46 -0
  472. data/spec/models/process_roster_items200_response_inner_spec.rb +40 -0
  473. data/spec/models/process_roster_items_request_spec.rb +58 -0
  474. data/spec/models/push_all_to_all_request_spec.rb +40 -0
  475. data/spec/models/push_roster_all_request_spec.rb +34 -0
  476. data/spec/models/push_roster_request_spec.rb +46 -0
  477. data/spec/models/register_muc_nick_request_spec.rb +46 -0
  478. data/spec/models/register_request_spec.rb +46 -0
  479. data/spec/models/registered_users_request_spec.rb +34 -0
  480. data/spec/models/remove_mam_for_user_with_peer_request_spec.rb +46 -0
  481. data/spec/models/remove_o_auth_client_request_spec.rb +34 -0
  482. data/spec/models/request_certificate_request_spec.rb +34 -0
  483. data/spec/models/resource_num200_response_spec.rb +34 -0
  484. data/spec/models/resource_num_request_spec.rb +46 -0
  485. data/spec/models/restart_module200_response_spec.rb +34 -0
  486. data/spec/models/restart_module_request_spec.rb +40 -0
  487. data/spec/models/restore_request_spec.rb +34 -0
  488. data/spec/models/revoke_certificate_request_spec.rb +34 -0
  489. data/spec/models/revoke_o_auth_token_request_spec.rb +34 -0
  490. data/spec/models/rooms_empty_destroy_request_spec.rb +34 -0
  491. data/spec/models/rooms_unused_destroy_request_spec.rb +40 -0
  492. data/spec/models/send_direct_invitation_request_spec.rb +58 -0
  493. data/spec/models/send_message_request_spec.rb +58 -0
  494. data/spec/models/send_stanza_c2_s_request_spec.rb +52 -0
  495. data/spec/models/send_stanza_request_spec.rb +46 -0
  496. data/spec/models/set_last_request_spec.rb +52 -0
  497. data/spec/models/set_loglevel_request_spec.rb +34 -0
  498. data/spec/models/set_master_request_spec.rb +34 -0
  499. data/spec/models/set_nickname_request_spec.rb +46 -0
  500. data/spec/models/set_presence_request_spec.rb +70 -0
  501. data/spec/models/set_room_affiliation_request_spec.rb +52 -0
  502. data/spec/models/set_vcard2_multi_request_spec.rb +58 -0
  503. data/spec/models/set_vcard2_request_spec.rb +58 -0
  504. data/spec/models/set_vcard_request_spec.rb +52 -0
  505. data/spec/models/srg_create_request_spec.rb +58 -0
  506. data/spec/models/srg_delete_request_spec.rb +40 -0
  507. data/spec/models/srg_get_info200_response_inner_spec.rb +40 -0
  508. data/spec/models/srg_user_add_request_spec.rb +52 -0
  509. data/spec/models/stop_kindly_request_spec.rb +40 -0
  510. data/spec/models/subscribe_to_room_many_request_spec.rb +46 -0
  511. data/spec/models/subscribe_to_room_many_request_users_inner_spec.rb +40 -0
  512. data/spec/models/subscribe_to_room_request_spec.rb +52 -0
  513. data/spec/models/table_mnesia_info_request_spec.rb +34 -0
  514. data/spec/models/unban_ip200_response_spec.rb +34 -0
  515. data/spec/models/unban_ip_request_spec.rb +34 -0
  516. data/spec/models/unregister_muc_nick_request_spec.rb +40 -0
  517. data/spec/models/unregister_user_request_spec.rb +40 -0
  518. data/spec/models/unsubscribe_from_room_request_spec.rb +40 -0
  519. data/spec/spec_helper.rb +114 -0
  520. metadata +772 -0
@@ -0,0 +1,225 @@
1
+ =begin
2
+ #OpenAPI Documentation for Ejabberd HTTP APIs
3
+
4
+ #APIs for managing Ejabberd server
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+
9
+ OpenAPI Generator version: 7.0.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module EjabberdHttpClient
17
+ class ConvertToYamlRequest
18
+ # Full path to the original configuration file.
19
+ attr_accessor :_in
20
+
21
+ # Full path to the final YAML configuration file.
22
+ attr_accessor :out
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'_in' => :'in',
28
+ :'out' => :'out'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'_in' => :'String',
41
+ :'out' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `EjabberdHttpClient::ConvertToYamlRequest` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `EjabberdHttpClient::ConvertToYamlRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'_in')
67
+ self._in = attributes[:'_in']
68
+ end
69
+
70
+ if attributes.key?(:'out')
71
+ self.out = attributes[:'out']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
+ invalid_properties = Array.new
80
+ invalid_properties
81
+ end
82
+
83
+ # Check to see if the all the properties in the model are valid
84
+ # @return true if the model is valid
85
+ def valid?
86
+ warn '[DEPRECATED] the `valid?` method is obsolete'
87
+ true
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param [Object] Object to be compared
92
+ def ==(o)
93
+ return true if self.equal?(o)
94
+ self.class == o.class &&
95
+ _in == o._in &&
96
+ out == o.out
97
+ end
98
+
99
+ # @see the `==` method
100
+ # @param [Object] Object to be compared
101
+ def eql?(o)
102
+ self == o
103
+ end
104
+
105
+ # Calculates hash code according to all attributes.
106
+ # @return [Integer] Hash code
107
+ def hash
108
+ [_in, out].hash
109
+ end
110
+
111
+ # Builds the object from hash
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @return [Object] Returns the model itself
114
+ def self.build_from_hash(attributes)
115
+ return nil unless attributes.is_a?(Hash)
116
+ attributes = attributes.transform_keys(&:to_sym)
117
+ transformed_hash = {}
118
+ openapi_types.each_pair do |key, type|
119
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
120
+ transformed_hash["#{key}"] = nil
121
+ elsif type =~ /\AArray<(.*)>/i
122
+ # check to ensure the input is an array given that the attribute
123
+ # is documented as an array but the input is not
124
+ if attributes[attribute_map[key]].is_a?(Array)
125
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
126
+ end
127
+ elsif !attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
129
+ end
130
+ end
131
+ new(transformed_hash)
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def self._deserialize(type, value)
139
+ case type.to_sym
140
+ when :Time
141
+ Time.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :Boolean
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ # models (e.g. Pet) or oneOf
172
+ klass = EjabberdHttpClient.const_get(type)
173
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.openapi_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end
222
+
223
+ end
224
+
225
+ end
@@ -0,0 +1,235 @@
1
+ =begin
2
+ #OpenAPI Documentation for Ejabberd HTTP APIs
3
+
4
+ #APIs for managing Ejabberd server
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+
9
+ OpenAPI Generator version: 7.0.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module EjabberdHttpClient
17
+ class CreateRoomRequest
18
+ # Room name.
19
+ attr_accessor :name
20
+
21
+ # MUC service.
22
+ attr_accessor :service
23
+
24
+ # Server host.
25
+ attr_accessor :host
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'name' => :'name',
31
+ :'service' => :'service',
32
+ :'host' => :'host'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'name' => :'String',
45
+ :'service' => :'String',
46
+ :'host' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `EjabberdHttpClient::CreateRoomRequest` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `EjabberdHttpClient::CreateRoomRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'name')
72
+ self.name = attributes[:'name']
73
+ end
74
+
75
+ if attributes.key?(:'service')
76
+ self.service = attributes[:'service']
77
+ end
78
+
79
+ if attributes.key?(:'host')
80
+ self.host = attributes[:'host']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
88
+ invalid_properties = Array.new
89
+ invalid_properties
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ warn '[DEPRECATED] the `valid?` method is obsolete'
96
+ true
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param [Object] Object to be compared
101
+ def ==(o)
102
+ return true if self.equal?(o)
103
+ self.class == o.class &&
104
+ name == o.name &&
105
+ service == o.service &&
106
+ host == o.host
107
+ end
108
+
109
+ # @see the `==` method
110
+ # @param [Object] Object to be compared
111
+ def eql?(o)
112
+ self == o
113
+ end
114
+
115
+ # Calculates hash code according to all attributes.
116
+ # @return [Integer] Hash code
117
+ def hash
118
+ [name, service, host].hash
119
+ end
120
+
121
+ # Builds the object from hash
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ # @return [Object] Returns the model itself
124
+ def self.build_from_hash(attributes)
125
+ return nil unless attributes.is_a?(Hash)
126
+ attributes = attributes.transform_keys(&:to_sym)
127
+ transformed_hash = {}
128
+ openapi_types.each_pair do |key, type|
129
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
130
+ transformed_hash["#{key}"] = nil
131
+ elsif type =~ /\AArray<(.*)>/i
132
+ # check to ensure the input is an array given that the attribute
133
+ # is documented as an array but the input is not
134
+ if attributes[attribute_map[key]].is_a?(Array)
135
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
136
+ end
137
+ elsif !attributes[attribute_map[key]].nil?
138
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
139
+ end
140
+ end
141
+ new(transformed_hash)
142
+ end
143
+
144
+ # Deserializes the data based on type
145
+ # @param string type Data type
146
+ # @param string value Value to be deserialized
147
+ # @return [Object] Deserialized data
148
+ def self._deserialize(type, value)
149
+ case type.to_sym
150
+ when :Time
151
+ Time.parse(value)
152
+ when :Date
153
+ Date.parse(value)
154
+ when :String
155
+ value.to_s
156
+ when :Integer
157
+ value.to_i
158
+ when :Float
159
+ value.to_f
160
+ when :Boolean
161
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
162
+ true
163
+ else
164
+ false
165
+ end
166
+ when :Object
167
+ # generic object (usually a Hash), return directly
168
+ value
169
+ when /\AArray<(?<inner_type>.+)>\z/
170
+ inner_type = Regexp.last_match[:inner_type]
171
+ value.map { |v| _deserialize(inner_type, v) }
172
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
173
+ k_type = Regexp.last_match[:k_type]
174
+ v_type = Regexp.last_match[:v_type]
175
+ {}.tap do |hash|
176
+ value.each do |k, v|
177
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
178
+ end
179
+ end
180
+ else # model
181
+ # models (e.g. Pet) or oneOf
182
+ klass = EjabberdHttpClient.const_get(type)
183
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
184
+ end
185
+ end
186
+
187
+ # Returns the string representation of the object
188
+ # @return [String] String presentation of the object
189
+ def to_s
190
+ to_hash.to_s
191
+ end
192
+
193
+ # to_body is an alias to to_hash (backward compatibility)
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_body
196
+ to_hash
197
+ end
198
+
199
+ # Returns the object in the form of hash
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_hash
202
+ hash = {}
203
+ self.class.attribute_map.each_pair do |attr, param|
204
+ value = self.send(attr)
205
+ if value.nil?
206
+ is_nullable = self.class.openapi_nullable.include?(attr)
207
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
208
+ end
209
+
210
+ hash[param] = _to_hash(value)
211
+ end
212
+ hash
213
+ end
214
+
215
+ # Outputs non-array value in the form of hash
216
+ # For object, use to_hash. Otherwise, just return the value
217
+ # @param [Object] value Any valid value
218
+ # @return [Hash] Returns the value in the form of hash
219
+ def _to_hash(value)
220
+ if value.is_a?(Array)
221
+ value.compact.map { |v| _to_hash(v) }
222
+ elsif value.is_a?(Hash)
223
+ {}.tap do |hash|
224
+ value.each { |k, v| hash[k] = _to_hash(v) }
225
+ end
226
+ elsif value.respond_to? :to_hash
227
+ value.to_hash
228
+ else
229
+ value
230
+ end
231
+ end
232
+
233
+ end
234
+
235
+ end
@@ -0,0 +1,246 @@
1
+ =begin
2
+ #OpenAPI Documentation for Ejabberd HTTP APIs
3
+
4
+ #APIs for managing Ejabberd server
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+
9
+ OpenAPI Generator version: 7.0.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module EjabberdHttpClient
17
+ class CreateRoomWithOptionsRequest
18
+ # Room name.
19
+ attr_accessor :name
20
+
21
+ # MUC service.
22
+ attr_accessor :service
23
+
24
+ # Server host.
25
+ attr_accessor :host
26
+
27
+ attr_accessor :options
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'name' => :'name',
33
+ :'service' => :'service',
34
+ :'host' => :'host',
35
+ :'options' => :'options'
36
+ }
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'name' => :'String',
48
+ :'service' => :'String',
49
+ :'host' => :'String',
50
+ :'options' => :'Array<CreateRoomWithOptionsRequestOptionsInner>'
51
+ }
52
+ end
53
+
54
+ # List of attributes with nullable: true
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ ])
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param [Hash] attributes Model attributes in the form of hash
62
+ def initialize(attributes = {})
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `EjabberdHttpClient::CreateRoomWithOptionsRequest` initialize method"
65
+ end
66
+
67
+ # check to see if the attribute exists and convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!self.class.attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `EjabberdHttpClient::CreateRoomWithOptionsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'name')
76
+ self.name = attributes[:'name']
77
+ end
78
+
79
+ if attributes.key?(:'service')
80
+ self.service = attributes[:'service']
81
+ end
82
+
83
+ if attributes.key?(:'host')
84
+ self.host = attributes[:'host']
85
+ end
86
+
87
+ if attributes.key?(:'options')
88
+ if (value = attributes[:'options']).is_a?(Array)
89
+ self.options = value
90
+ end
91
+ end
92
+ end
93
+
94
+ # Show invalid properties with the reasons. Usually used together with valid?
95
+ # @return Array for valid properties with the reasons
96
+ def list_invalid_properties
97
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
98
+ invalid_properties = Array.new
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ warn '[DEPRECATED] the `valid?` method is obsolete'
106
+ true
107
+ end
108
+
109
+ # Checks equality by comparing each attribute.
110
+ # @param [Object] Object to be compared
111
+ def ==(o)
112
+ return true if self.equal?(o)
113
+ self.class == o.class &&
114
+ name == o.name &&
115
+ service == o.service &&
116
+ host == o.host &&
117
+ options == o.options
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] Object to be compared
122
+ def eql?(o)
123
+ self == o
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ def hash
129
+ [name, service, host, options].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def self.build_from_hash(attributes)
136
+ return nil unless attributes.is_a?(Hash)
137
+ attributes = attributes.transform_keys(&:to_sym)
138
+ transformed_hash = {}
139
+ openapi_types.each_pair do |key, type|
140
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = nil
142
+ elsif type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the attribute
144
+ # is documented as an array but the input is not
145
+ if attributes[attribute_map[key]].is_a?(Array)
146
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
147
+ end
148
+ elsif !attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
150
+ end
151
+ end
152
+ new(transformed_hash)
153
+ end
154
+
155
+ # Deserializes the data based on type
156
+ # @param string type Data type
157
+ # @param string value Value to be deserialized
158
+ # @return [Object] Deserialized data
159
+ def self._deserialize(type, value)
160
+ case type.to_sym
161
+ when :Time
162
+ Time.parse(value)
163
+ when :Date
164
+ Date.parse(value)
165
+ when :String
166
+ value.to_s
167
+ when :Integer
168
+ value.to_i
169
+ when :Float
170
+ value.to_f
171
+ when :Boolean
172
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
173
+ true
174
+ else
175
+ false
176
+ end
177
+ when :Object
178
+ # generic object (usually a Hash), return directly
179
+ value
180
+ when /\AArray<(?<inner_type>.+)>\z/
181
+ inner_type = Regexp.last_match[:inner_type]
182
+ value.map { |v| _deserialize(inner_type, v) }
183
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
184
+ k_type = Regexp.last_match[:k_type]
185
+ v_type = Regexp.last_match[:v_type]
186
+ {}.tap do |hash|
187
+ value.each do |k, v|
188
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
189
+ end
190
+ end
191
+ else # model
192
+ # models (e.g. Pet) or oneOf
193
+ klass = EjabberdHttpClient.const_get(type)
194
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
195
+ end
196
+ end
197
+
198
+ # Returns the string representation of the object
199
+ # @return [String] String presentation of the object
200
+ def to_s
201
+ to_hash.to_s
202
+ end
203
+
204
+ # to_body is an alias to to_hash (backward compatibility)
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_body
207
+ to_hash
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ if value.nil?
217
+ is_nullable = self.class.openapi_nullable.include?(attr)
218
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
219
+ end
220
+
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+
244
+ end
245
+
246
+ end