ejabberd_http_client 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +72 -0
- data/README.md +411 -0
- data/Rakefile +10 -0
- data/docs/AbortDeleteOldMamMessages200Response.md +18 -0
- data/docs/AbortDeleteOldMamMessagesRequest.md +18 -0
- data/docs/AccountsApi.md +640 -0
- data/docs/AcmeApi.md +197 -0
- data/docs/AddOAuthClientImplicitRequest.md +22 -0
- data/docs/AddOAuthClientPasswordRequest.md +22 -0
- data/docs/AddRosterItemRequest.md +30 -0
- data/docs/BackupRequest.md +18 -0
- data/docs/BanAccountRequest.md +22 -0
- data/docs/BookmarksToPepRequest.md +20 -0
- data/docs/ChangeNodeNameRequest.md +24 -0
- data/docs/ChangePasswordRequest.md +22 -0
- data/docs/ChangeRoomOptionRequest.md +24 -0
- data/docs/CheckAccountRequest.md +20 -0
- data/docs/CheckModuleRequest.md +18 -0
- data/docs/CheckPasswordHashRequest.md +24 -0
- data/docs/CheckPasswordRequest.md +22 -0
- data/docs/ClusterApi.md +256 -0
- data/docs/CompileRequest.md +18 -0
- data/docs/ConfigApi.md +192 -0
- data/docs/ConnectedUsersInfo200ResponseInner.md +36 -0
- data/docs/ConnectedUsersNumber200Response.md +18 -0
- data/docs/ConnectedUsersVHostRequest.md +18 -0
- data/docs/ConvertToScramRequest.md +18 -0
- data/docs/ConvertToYamlRequest.md +20 -0
- data/docs/CreateRoomRequest.md +22 -0
- data/docs/CreateRoomWithOptionsRequest.md +24 -0
- data/docs/CreateRoomWithOptionsRequestOptionsInner.md +20 -0
- data/docs/CreateRoomsFileRequest.md +18 -0
- data/docs/DeleteMnesiaRequest.md +18 -0
- data/docs/DeleteOldMAMMessagesBatchRequest.md +26 -0
- data/docs/DeleteOldMAMMessagesRequest.md +20 -0
- data/docs/DeleteOldMAMMessagesStatusRequest.md +18 -0
- data/docs/DeleteOldMessagesBatchRequest.md +24 -0
- data/docs/DeleteOldMessagesRequest.md +18 -0
- data/docs/DeleteOldPubsubItemsRequest.md +18 -0
- data/docs/DeleteOldUsersRequest.md +18 -0
- data/docs/DocumentationApi.md +255 -0
- data/docs/DumpConfigRequest.md +18 -0
- data/docs/DumpRequest.md +18 -0
- data/docs/DumpTableRequest.md +20 -0
- data/docs/ErlangApi.md +194 -0
- data/docs/Export2sqlRequest.md +20 -0
- data/docs/ExportPiefxisHostRequest.md +20 -0
- data/docs/ExportPiefxisRequest.md +18 -0
- data/docs/GenHtmlDocForCommandsRequest.md +22 -0
- data/docs/GenMarkdownDocForTagsRequest.md +18 -0
- data/docs/GetCookie200Response.md +18 -0
- data/docs/GetLast200Response.md +20 -0
- data/docs/GetLastRequest.md +20 -0
- data/docs/GetLoglevel200Response.md +18 -0
- data/docs/GetNumResources200Response.md +18 -0
- data/docs/GetOfflineCount200Response.md +18 -0
- data/docs/GetOfflineCountRequest.md +20 -0
- data/docs/GetOutgoingS2sNumber200Response.md +18 -0
- data/docs/GetPresence200Response.md +22 -0
- data/docs/GetRoomAffiliation200Response.md +18 -0
- data/docs/GetRoomAffiliationRequest.md +22 -0
- data/docs/GetRoomAffiliations200ResponseInner.md +24 -0
- data/docs/GetRoomAffiliationsRequest.md +20 -0
- data/docs/GetRoomHistory200ResponseInner.md +20 -0
- data/docs/GetRoomOccupants200ResponseInner.md +22 -0
- data/docs/GetRoomOccupantsNumber200Response.md +18 -0
- data/docs/GetRoomOptions200ResponseInner.md +20 -0
- data/docs/GetRoster200ResponseInner.md +26 -0
- data/docs/GetStats200Response.md +18 -0
- data/docs/GetStatsHostRequest.md +20 -0
- data/docs/GetStatsRequest.md +18 -0
- data/docs/GetStatusList200ResponseInner.md +26 -0
- data/docs/GetStatusListHostRequest.md +20 -0
- data/docs/GetStatusListRequest.md +18 -0
- data/docs/GetStatusNum200Response.md +18 -0
- data/docs/GetUserRoomsRequest.md +20 -0
- data/docs/GetUserSessionsInfo200ResponseInner.md +34 -0
- data/docs/GetUserSubscriptions200ResponseInner.md +22 -0
- data/docs/GetVcard200Response.md +18 -0
- data/docs/GetVcard2MultiRequest.md +24 -0
- data/docs/GetVcard2Request.md +24 -0
- data/docs/GetVcardRequest.md +22 -0
- data/docs/ImportDir200Response.md +18 -0
- data/docs/ImportDirRequest.md +18 -0
- data/docs/ImportFileRequest.md +18 -0
- data/docs/ImportPiefxisRequest.md +18 -0
- data/docs/ImportProsodyRequest.md +18 -0
- data/docs/IncomingS2sNumber200Response.md +18 -0
- data/docs/InstallFallbackRequest.md +18 -0
- data/docs/IssueOAuthToken200Response.md +22 -0
- data/docs/IssueOAuthTokenRequest.md +22 -0
- data/docs/JoinClusterRequest.md +18 -0
- data/docs/KickSessionRequest.md +24 -0
- data/docs/KickUser200Response.md +18 -0
- data/docs/LastApi.md +135 -0
- data/docs/LeaveClusterRequest.md +18 -0
- data/docs/ListCertificates200ResponseInner.md +22 -0
- data/docs/ListMucOnlineRoomsByRegex200ResponseInner.md +22 -0
- data/docs/ListMucOnlineRoomsByRegexRequest.md +20 -0
- data/docs/ListMucOnlineRoomsRequest.md +18 -0
- data/docs/ListOAuthTokens200ResponseInner.md +24 -0
- data/docs/LoadDatabaseRequest.md +18 -0
- data/docs/LogsApi.md +252 -0
- data/docs/MamApi.md +137 -0
- data/docs/MnesiaApi.md +1071 -0
- data/docs/ModulesApi.md +434 -0
- data/docs/MucApi.md +705 -0
- data/docs/MucRoomApi.md +959 -0
- data/docs/OauthApi.md +378 -0
- data/docs/OfflineApi.md +70 -0
- data/docs/PrivacySetRequest.md +22 -0
- data/docs/PrivateApi.md +199 -0
- data/docs/PrivateGetRequest.md +24 -0
- data/docs/PrivateSetRequest.md +22 -0
- data/docs/ProcessRosterItems200ResponseInner.md +20 -0
- data/docs/ProcessRosterItemsRequest.md +26 -0
- data/docs/PurgeApi.md +815 -0
- data/docs/PushAllToAllRequest.md +20 -0
- data/docs/PushRosterAllRequest.md +18 -0
- data/docs/PushRosterRequest.md +22 -0
- data/docs/RegisterMucNickRequest.md +22 -0
- data/docs/RegisterRequest.md +22 -0
- data/docs/RegisteredUsersRequest.md +18 -0
- data/docs/RemoveMamForUserWithPeerRequest.md +22 -0
- data/docs/RemoveOAuthClientRequest.md +18 -0
- data/docs/RequestCertificateRequest.md +18 -0
- data/docs/ResourceNum200Response.md +18 -0
- data/docs/ResourceNumRequest.md +22 -0
- data/docs/RestartModule200Response.md +18 -0
- data/docs/RestartModuleRequest.md +20 -0
- data/docs/RestoreRequest.md +18 -0
- data/docs/RevokeCertificateRequest.md +18 -0
- data/docs/RevokeOAuthTokenRequest.md +18 -0
- data/docs/RoomsEmptyDestroyRequest.md +18 -0
- data/docs/RoomsUnusedDestroyRequest.md +20 -0
- data/docs/RosterApi.md +392 -0
- data/docs/S2sApi.md +187 -0
- data/docs/SendDirectInvitationRequest.md +26 -0
- data/docs/SendMessageRequest.md +26 -0
- data/docs/SendStanzaC2SRequest.md +24 -0
- data/docs/SendStanzaRequest.md +22 -0
- data/docs/ServerApi.md +615 -0
- data/docs/SessionApi.md +1021 -0
- data/docs/SetLastRequest.md +24 -0
- data/docs/SetLoglevelRequest.md +18 -0
- data/docs/SetMasterRequest.md +18 -0
- data/docs/SetNicknameRequest.md +22 -0
- data/docs/SetPresenceRequest.md +30 -0
- data/docs/SetRoomAffiliationRequest.md +24 -0
- data/docs/SetVcard2MultiRequest.md +26 -0
- data/docs/SetVcard2Request.md +26 -0
- data/docs/SetVcardRequest.md +24 -0
- data/docs/SharedRosterGroupApi.md +462 -0
- data/docs/SqlApi.md +191 -0
- data/docs/SrgCreateRequest.md +26 -0
- data/docs/SrgDeleteRequest.md +20 -0
- data/docs/SrgGetInfo200ResponseInner.md +20 -0
- data/docs/SrgUserAddRequest.md +24 -0
- data/docs/StanzaApi.md +267 -0
- data/docs/StatisticsApi.md +447 -0
- data/docs/StopKindlyRequest.md +20 -0
- data/docs/SubscribeToRoomManyRequest.md +22 -0
- data/docs/SubscribeToRoomManyRequestUsersInner.md +20 -0
- data/docs/SubscribeToRoomRequest.md +24 -0
- data/docs/TableMnesiaInfoRequest.md +18 -0
- data/docs/UnbanIp200Response.md +18 -0
- data/docs/UnbanIpRequest.md +18 -0
- data/docs/UnregisterMucNickRequest.md +20 -0
- data/docs/UnregisterUserRequest.md +20 -0
- data/docs/UnsubscribeFromRoomRequest.md +20 -0
- data/docs/VcardApi.md +456 -0
- data/ejabberd_http_client.gemspec +37 -0
- data/git_push.sh +57 -0
- data/lib/ejabberd_http_client/api/accounts_api.rb +656 -0
- data/lib/ejabberd_http_client/api/acme_api.rb +201 -0
- data/lib/ejabberd_http_client/api/cluster_api.rb +267 -0
- data/lib/ejabberd_http_client/api/config_api.rb +207 -0
- data/lib/ejabberd_http_client/api/documentation_api.rb +273 -0
- data/lib/ejabberd_http_client/api/erlang_api.rb +203 -0
- data/lib/ejabberd_http_client/api/last_api.rb +150 -0
- data/lib/ejabberd_http_client/api/logs_api.rb +249 -0
- data/lib/ejabberd_http_client/api/mam_api.rb +146 -0
- data/lib/ejabberd_http_client/api/mnesia_api.rb +1119 -0
- data/lib/ejabberd_http_client/api/modules_api.rb +441 -0
- data/lib/ejabberd_http_client/api/muc_api.rb +726 -0
- data/lib/ejabberd_http_client/api/muc_room_api.rb +986 -0
- data/lib/ejabberd_http_client/api/oauth_api.rb +399 -0
- data/lib/ejabberd_http_client/api/offline_api.rb +88 -0
- data/lib/ejabberd_http_client/api/private_api.rb +212 -0
- data/lib/ejabberd_http_client/api/purge_api.rb +848 -0
- data/lib/ejabberd_http_client/api/roster_api.rb +400 -0
- data/lib/ejabberd_http_client/api/s2s_api.rb +187 -0
- data/lib/ejabberd_http_client/api/server_api.rb +582 -0
- data/lib/ejabberd_http_client/api/session_api.rb +1011 -0
- data/lib/ejabberd_http_client/api/shared_roster_group_api.rb +456 -0
- data/lib/ejabberd_http_client/api/sql_api.rb +205 -0
- data/lib/ejabberd_http_client/api/stanza_api.rb +270 -0
- data/lib/ejabberd_http_client/api/statistics_api.rb +435 -0
- data/lib/ejabberd_http_client/api/vcard_api.rb +468 -0
- data/lib/ejabberd_http_client/api_client.rb +391 -0
- data/lib/ejabberd_http_client/api_error.rb +58 -0
- data/lib/ejabberd_http_client/configuration.rb +290 -0
- data/lib/ejabberd_http_client/models/abort_delete_old_mam_messages200_response.rb +215 -0
- data/lib/ejabberd_http_client/models/abort_delete_old_mam_messages_request.rb +215 -0
- data/lib/ejabberd_http_client/models/add_o_auth_client_implicit_request.rb +235 -0
- data/lib/ejabberd_http_client/models/add_o_auth_client_password_request.rb +235 -0
- data/lib/ejabberd_http_client/models/add_roster_item_request.rb +275 -0
- data/lib/ejabberd_http_client/models/backup_request.rb +215 -0
- data/lib/ejabberd_http_client/models/ban_account_request.rb +235 -0
- data/lib/ejabberd_http_client/models/bookmarks_to_pep_request.rb +225 -0
- data/lib/ejabberd_http_client/models/change_node_name_request.rb +245 -0
- data/lib/ejabberd_http_client/models/change_password_request.rb +235 -0
- data/lib/ejabberd_http_client/models/change_room_option_request.rb +245 -0
- data/lib/ejabberd_http_client/models/check_account_request.rb +225 -0
- data/lib/ejabberd_http_client/models/check_module_request.rb +215 -0
- data/lib/ejabberd_http_client/models/check_password_hash_request.rb +245 -0
- data/lib/ejabberd_http_client/models/check_password_request.rb +235 -0
- data/lib/ejabberd_http_client/models/compile_request.rb +215 -0
- data/lib/ejabberd_http_client/models/connected_users_info200_response_inner.rb +305 -0
- data/lib/ejabberd_http_client/models/connected_users_number200_response.rb +215 -0
- data/lib/ejabberd_http_client/models/connected_users_v_host_request.rb +215 -0
- data/lib/ejabberd_http_client/models/convert_to_scram_request.rb +215 -0
- data/lib/ejabberd_http_client/models/convert_to_yaml_request.rb +225 -0
- data/lib/ejabberd_http_client/models/create_room_request.rb +235 -0
- data/lib/ejabberd_http_client/models/create_room_with_options_request.rb +246 -0
- data/lib/ejabberd_http_client/models/create_room_with_options_request_options_inner.rb +225 -0
- data/lib/ejabberd_http_client/models/create_rooms_file_request.rb +215 -0
- data/lib/ejabberd_http_client/models/delete_mnesia_request.rb +215 -0
- data/lib/ejabberd_http_client/models/delete_old_mam_messages_batch_request.rb +255 -0
- data/lib/ejabberd_http_client/models/delete_old_mam_messages_request.rb +225 -0
- data/lib/ejabberd_http_client/models/delete_old_mam_messages_status_request.rb +215 -0
- data/lib/ejabberd_http_client/models/delete_old_messages_batch_request.rb +245 -0
- data/lib/ejabberd_http_client/models/delete_old_messages_request.rb +215 -0
- data/lib/ejabberd_http_client/models/delete_old_pubsub_items_request.rb +215 -0
- data/lib/ejabberd_http_client/models/delete_old_users_request.rb +215 -0
- data/lib/ejabberd_http_client/models/dump_config_request.rb +215 -0
- data/lib/ejabberd_http_client/models/dump_request.rb +215 -0
- data/lib/ejabberd_http_client/models/dump_table_request.rb +225 -0
- data/lib/ejabberd_http_client/models/export2sql_request.rb +225 -0
- data/lib/ejabberd_http_client/models/export_piefxis_host_request.rb +225 -0
- data/lib/ejabberd_http_client/models/export_piefxis_request.rb +215 -0
- data/lib/ejabberd_http_client/models/gen_html_doc_for_commands_request.rb +235 -0
- data/lib/ejabberd_http_client/models/gen_markdown_doc_for_tags_request.rb +215 -0
- data/lib/ejabberd_http_client/models/get_cookie200_response.rb +215 -0
- data/lib/ejabberd_http_client/models/get_last200_response.rb +225 -0
- data/lib/ejabberd_http_client/models/get_last_request.rb +225 -0
- data/lib/ejabberd_http_client/models/get_loglevel200_response.rb +215 -0
- data/lib/ejabberd_http_client/models/get_num_resources200_response.rb +214 -0
- data/lib/ejabberd_http_client/models/get_offline_count200_response.rb +215 -0
- data/lib/ejabberd_http_client/models/get_offline_count_request.rb +223 -0
- data/lib/ejabberd_http_client/models/get_outgoing_s2s_number200_response.rb +214 -0
- data/lib/ejabberd_http_client/models/get_presence200_response.rb +235 -0
- data/lib/ejabberd_http_client/models/get_room_affiliation200_response.rb +215 -0
- data/lib/ejabberd_http_client/models/get_room_affiliation_request.rb +235 -0
- data/lib/ejabberd_http_client/models/get_room_affiliations200_response_inner.rb +241 -0
- data/lib/ejabberd_http_client/models/get_room_affiliations_request.rb +225 -0
- data/lib/ejabberd_http_client/models/get_room_history200_response_inner.rb +223 -0
- data/lib/ejabberd_http_client/models/get_room_occupants200_response_inner.rb +232 -0
- data/lib/ejabberd_http_client/models/get_room_occupants_number200_response.rb +214 -0
- data/lib/ejabberd_http_client/models/get_room_options200_response_inner.rb +223 -0
- data/lib/ejabberd_http_client/models/get_roster200_response_inner.rb +252 -0
- data/lib/ejabberd_http_client/models/get_stats200_response.rb +215 -0
- data/lib/ejabberd_http_client/models/get_stats_host_request.rb +225 -0
- data/lib/ejabberd_http_client/models/get_stats_request.rb +215 -0
- data/lib/ejabberd_http_client/models/get_status_list200_response_inner.rb +255 -0
- data/lib/ejabberd_http_client/models/get_status_list_host_request.rb +225 -0
- data/lib/ejabberd_http_client/models/get_status_list_request.rb +215 -0
- data/lib/ejabberd_http_client/models/get_status_num200_response.rb +215 -0
- data/lib/ejabberd_http_client/models/get_user_rooms_request.rb +225 -0
- data/lib/ejabberd_http_client/models/get_user_sessions_info200_response_inner.rb +295 -0
- data/lib/ejabberd_http_client/models/get_user_subscriptions200_response_inner.rb +234 -0
- data/lib/ejabberd_http_client/models/get_vcard200_response.rb +214 -0
- data/lib/ejabberd_http_client/models/get_vcard2_multi_request.rb +241 -0
- data/lib/ejabberd_http_client/models/get_vcard2_request.rb +245 -0
- data/lib/ejabberd_http_client/models/get_vcard_request.rb +235 -0
- data/lib/ejabberd_http_client/models/import_dir200_response.rb +214 -0
- data/lib/ejabberd_http_client/models/import_dir_request.rb +215 -0
- data/lib/ejabberd_http_client/models/import_file_request.rb +215 -0
- data/lib/ejabberd_http_client/models/import_piefxis_request.rb +215 -0
- data/lib/ejabberd_http_client/models/import_prosody_request.rb +215 -0
- data/lib/ejabberd_http_client/models/incoming_s2s_number200_response.rb +214 -0
- data/lib/ejabberd_http_client/models/install_fallback_request.rb +215 -0
- data/lib/ejabberd_http_client/models/issue_o_auth_token200_response.rb +232 -0
- data/lib/ejabberd_http_client/models/issue_o_auth_token_request.rb +235 -0
- data/lib/ejabberd_http_client/models/join_cluster_request.rb +215 -0
- data/lib/ejabberd_http_client/models/kick_session_request.rb +245 -0
- data/lib/ejabberd_http_client/models/kick_user200_response.rb +215 -0
- data/lib/ejabberd_http_client/models/leave_cluster_request.rb +215 -0
- data/lib/ejabberd_http_client/models/list_certificates200_response_inner.rb +235 -0
- data/lib/ejabberd_http_client/models/list_muc_online_rooms_by_regex200_response_inner.rb +232 -0
- data/lib/ejabberd_http_client/models/list_muc_online_rooms_by_regex_request.rb +225 -0
- data/lib/ejabberd_http_client/models/list_muc_online_rooms_request.rb +215 -0
- data/lib/ejabberd_http_client/models/list_o_auth_tokens200_response_inner.rb +241 -0
- data/lib/ejabberd_http_client/models/load_database_request.rb +215 -0
- data/lib/ejabberd_http_client/models/privacy_set_request.rb +232 -0
- data/lib/ejabberd_http_client/models/private_get_request.rb +241 -0
- data/lib/ejabberd_http_client/models/private_set_request.rb +232 -0
- data/lib/ejabberd_http_client/models/process_roster_items200_response_inner.rb +223 -0
- data/lib/ejabberd_http_client/models/process_roster_items_request.rb +250 -0
- data/lib/ejabberd_http_client/models/push_all_to_all_request.rb +223 -0
- data/lib/ejabberd_http_client/models/push_roster_all_request.rb +214 -0
- data/lib/ejabberd_http_client/models/push_roster_request.rb +232 -0
- data/lib/ejabberd_http_client/models/register_muc_nick_request.rb +235 -0
- data/lib/ejabberd_http_client/models/register_request.rb +232 -0
- data/lib/ejabberd_http_client/models/registered_users_request.rb +214 -0
- data/lib/ejabberd_http_client/models/remove_mam_for_user_with_peer_request.rb +232 -0
- data/lib/ejabberd_http_client/models/remove_o_auth_client_request.rb +215 -0
- data/lib/ejabberd_http_client/models/request_certificate_request.rb +215 -0
- data/lib/ejabberd_http_client/models/resource_num200_response.rb +214 -0
- data/lib/ejabberd_http_client/models/resource_num_request.rb +235 -0
- data/lib/ejabberd_http_client/models/restart_module200_response.rb +214 -0
- data/lib/ejabberd_http_client/models/restart_module_request.rb +225 -0
- data/lib/ejabberd_http_client/models/restore_request.rb +215 -0
- data/lib/ejabberd_http_client/models/revoke_certificate_request.rb +215 -0
- data/lib/ejabberd_http_client/models/revoke_o_auth_token_request.rb +215 -0
- data/lib/ejabberd_http_client/models/rooms_empty_destroy_request.rb +215 -0
- data/lib/ejabberd_http_client/models/rooms_unused_destroy_request.rb +225 -0
- data/lib/ejabberd_http_client/models/send_direct_invitation_request.rb +255 -0
- data/lib/ejabberd_http_client/models/send_message_request.rb +255 -0
- data/lib/ejabberd_http_client/models/send_stanza_c2_s_request.rb +245 -0
- data/lib/ejabberd_http_client/models/send_stanza_request.rb +235 -0
- data/lib/ejabberd_http_client/models/set_last_request.rb +245 -0
- data/lib/ejabberd_http_client/models/set_loglevel_request.rb +215 -0
- data/lib/ejabberd_http_client/models/set_master_request.rb +215 -0
- data/lib/ejabberd_http_client/models/set_nickname_request.rb +235 -0
- data/lib/ejabberd_http_client/models/set_presence_request.rb +275 -0
- data/lib/ejabberd_http_client/models/set_room_affiliation_request.rb +245 -0
- data/lib/ejabberd_http_client/models/set_vcard2_multi_request.rb +257 -0
- data/lib/ejabberd_http_client/models/set_vcard2_request.rb +255 -0
- data/lib/ejabberd_http_client/models/set_vcard_request.rb +245 -0
- data/lib/ejabberd_http_client/models/srg_create_request.rb +255 -0
- data/lib/ejabberd_http_client/models/srg_delete_request.rb +225 -0
- data/lib/ejabberd_http_client/models/srg_get_info200_response_inner.rb +225 -0
- data/lib/ejabberd_http_client/models/srg_user_add_request.rb +245 -0
- data/lib/ejabberd_http_client/models/stop_kindly_request.rb +225 -0
- data/lib/ejabberd_http_client/models/subscribe_to_room_many_request.rb +236 -0
- data/lib/ejabberd_http_client/models/subscribe_to_room_many_request_users_inner.rb +225 -0
- data/lib/ejabberd_http_client/models/subscribe_to_room_request.rb +245 -0
- data/lib/ejabberd_http_client/models/table_mnesia_info_request.rb +215 -0
- data/lib/ejabberd_http_client/models/unban_ip200_response.rb +215 -0
- data/lib/ejabberd_http_client/models/unban_ip_request.rb +215 -0
- data/lib/ejabberd_http_client/models/unregister_muc_nick_request.rb +225 -0
- data/lib/ejabberd_http_client/models/unregister_user_request.rb +225 -0
- data/lib/ejabberd_http_client/models/unsubscribe_from_room_request.rb +225 -0
- data/lib/ejabberd_http_client/version.rb +15 -0
- data/lib/ejabberd_http_client.rb +207 -0
- data/spec/api/accounts_api_spec.rb +145 -0
- data/spec/api/acme_api_spec.rb +67 -0
- data/spec/api/cluster_api_spec.rb +78 -0
- data/spec/api/config_api_spec.rb +67 -0
- data/spec/api/documentation_api_spec.rb +78 -0
- data/spec/api/erlang_api_spec.rb +67 -0
- data/spec/api/last_api_spec.rb +57 -0
- data/spec/api/logs_api_spec.rb +76 -0
- data/spec/api/mam_api_spec.rb +57 -0
- data/spec/api/mnesia_api_spec.rb +221 -0
- data/spec/api/modules_api_spec.rb +109 -0
- data/spec/api/muc_api_spec.rb +156 -0
- data/spec/api/muc_room_api_spec.rb +200 -0
- data/spec/api/oauth_api_spec.rb +100 -0
- data/spec/api/offline_api_spec.rb +46 -0
- data/spec/api/private_api_spec.rb +68 -0
- data/spec/api/purge_api_spec.rb +176 -0
- data/spec/api/roster_api_spec.rb +101 -0
- data/spec/api/s2s_api_spec.rb +65 -0
- data/spec/api/server_api_spec.rb +137 -0
- data/spec/api/session_api_spec.rb +208 -0
- data/spec/api/shared_roster_group_api_spec.rb +112 -0
- data/spec/api/sql_api_spec.rb +67 -0
- data/spec/api/stanza_api_spec.rb +79 -0
- data/spec/api/statistics_api_spec.rb +109 -0
- data/spec/api/vcard_api_spec.rb +112 -0
- data/spec/api_client_spec.rb +228 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/abort_delete_old_mam_messages200_response_spec.rb +34 -0
- data/spec/models/abort_delete_old_mam_messages_request_spec.rb +34 -0
- data/spec/models/add_o_auth_client_implicit_request_spec.rb +46 -0
- data/spec/models/add_o_auth_client_password_request_spec.rb +46 -0
- data/spec/models/add_roster_item_request_spec.rb +70 -0
- data/spec/models/backup_request_spec.rb +34 -0
- data/spec/models/ban_account_request_spec.rb +46 -0
- data/spec/models/bookmarks_to_pep_request_spec.rb +40 -0
- data/spec/models/change_node_name_request_spec.rb +52 -0
- data/spec/models/change_password_request_spec.rb +46 -0
- data/spec/models/change_room_option_request_spec.rb +52 -0
- data/spec/models/check_account_request_spec.rb +40 -0
- data/spec/models/check_module_request_spec.rb +34 -0
- data/spec/models/check_password_hash_request_spec.rb +52 -0
- data/spec/models/check_password_request_spec.rb +46 -0
- data/spec/models/compile_request_spec.rb +34 -0
- data/spec/models/connected_users_info200_response_inner_spec.rb +88 -0
- data/spec/models/connected_users_number200_response_spec.rb +34 -0
- data/spec/models/connected_users_v_host_request_spec.rb +34 -0
- data/spec/models/convert_to_scram_request_spec.rb +34 -0
- data/spec/models/convert_to_yaml_request_spec.rb +40 -0
- data/spec/models/create_room_request_spec.rb +46 -0
- data/spec/models/create_room_with_options_request_options_inner_spec.rb +40 -0
- data/spec/models/create_room_with_options_request_spec.rb +52 -0
- data/spec/models/create_rooms_file_request_spec.rb +34 -0
- data/spec/models/delete_mnesia_request_spec.rb +34 -0
- data/spec/models/delete_old_mam_messages_batch_request_spec.rb +58 -0
- data/spec/models/delete_old_mam_messages_request_spec.rb +40 -0
- data/spec/models/delete_old_mam_messages_status_request_spec.rb +34 -0
- data/spec/models/delete_old_messages_batch_request_spec.rb +52 -0
- data/spec/models/delete_old_messages_request_spec.rb +34 -0
- data/spec/models/delete_old_pubsub_items_request_spec.rb +34 -0
- data/spec/models/delete_old_users_request_spec.rb +34 -0
- data/spec/models/dump_config_request_spec.rb +34 -0
- data/spec/models/dump_request_spec.rb +34 -0
- data/spec/models/dump_table_request_spec.rb +40 -0
- data/spec/models/export2sql_request_spec.rb +40 -0
- data/spec/models/export_piefxis_host_request_spec.rb +40 -0
- data/spec/models/export_piefxis_request_spec.rb +34 -0
- data/spec/models/gen_html_doc_for_commands_request_spec.rb +46 -0
- data/spec/models/gen_markdown_doc_for_tags_request_spec.rb +34 -0
- data/spec/models/get_cookie200_response_spec.rb +34 -0
- data/spec/models/get_last200_response_spec.rb +40 -0
- data/spec/models/get_last_request_spec.rb +40 -0
- data/spec/models/get_loglevel200_response_spec.rb +34 -0
- data/spec/models/get_num_resources200_response_spec.rb +34 -0
- data/spec/models/get_offline_count200_response_spec.rb +34 -0
- data/spec/models/get_offline_count_request_spec.rb +40 -0
- data/spec/models/get_outgoing_s2s_number200_response_spec.rb +34 -0
- data/spec/models/get_presence200_response_spec.rb +46 -0
- data/spec/models/get_room_affiliation200_response_spec.rb +34 -0
- data/spec/models/get_room_affiliation_request_spec.rb +46 -0
- data/spec/models/get_room_affiliations200_response_inner_spec.rb +52 -0
- data/spec/models/get_room_affiliations_request_spec.rb +40 -0
- data/spec/models/get_room_history200_response_inner_spec.rb +40 -0
- data/spec/models/get_room_occupants200_response_inner_spec.rb +46 -0
- data/spec/models/get_room_occupants_number200_response_spec.rb +34 -0
- data/spec/models/get_room_options200_response_inner_spec.rb +40 -0
- data/spec/models/get_roster200_response_inner_spec.rb +58 -0
- data/spec/models/get_stats200_response_spec.rb +34 -0
- data/spec/models/get_stats_host_request_spec.rb +40 -0
- data/spec/models/get_stats_request_spec.rb +34 -0
- data/spec/models/get_status_list200_response_inner_spec.rb +58 -0
- data/spec/models/get_status_list_host_request_spec.rb +40 -0
- data/spec/models/get_status_list_request_spec.rb +34 -0
- data/spec/models/get_status_num200_response_spec.rb +34 -0
- data/spec/models/get_user_rooms_request_spec.rb +40 -0
- data/spec/models/get_user_sessions_info200_response_inner_spec.rb +82 -0
- data/spec/models/get_user_subscriptions200_response_inner_spec.rb +46 -0
- data/spec/models/get_vcard200_response_spec.rb +34 -0
- data/spec/models/get_vcard2_multi_request_spec.rb +52 -0
- data/spec/models/get_vcard2_request_spec.rb +52 -0
- data/spec/models/get_vcard_request_spec.rb +46 -0
- data/spec/models/import_dir200_response_spec.rb +34 -0
- data/spec/models/import_dir_request_spec.rb +34 -0
- data/spec/models/import_file_request_spec.rb +34 -0
- data/spec/models/import_piefxis_request_spec.rb +34 -0
- data/spec/models/import_prosody_request_spec.rb +34 -0
- data/spec/models/incoming_s2s_number200_response_spec.rb +34 -0
- data/spec/models/install_fallback_request_spec.rb +34 -0
- data/spec/models/issue_o_auth_token200_response_spec.rb +46 -0
- data/spec/models/issue_o_auth_token_request_spec.rb +46 -0
- data/spec/models/join_cluster_request_spec.rb +34 -0
- data/spec/models/kick_session_request_spec.rb +52 -0
- data/spec/models/kick_user200_response_spec.rb +34 -0
- data/spec/models/leave_cluster_request_spec.rb +34 -0
- data/spec/models/list_certificates200_response_inner_spec.rb +46 -0
- data/spec/models/list_muc_online_rooms_by_regex200_response_inner_spec.rb +46 -0
- data/spec/models/list_muc_online_rooms_by_regex_request_spec.rb +40 -0
- data/spec/models/list_muc_online_rooms_request_spec.rb +34 -0
- data/spec/models/list_o_auth_tokens200_response_inner_spec.rb +52 -0
- data/spec/models/load_database_request_spec.rb +34 -0
- data/spec/models/privacy_set_request_spec.rb +46 -0
- data/spec/models/private_get_request_spec.rb +52 -0
- data/spec/models/private_set_request_spec.rb +46 -0
- data/spec/models/process_roster_items200_response_inner_spec.rb +40 -0
- data/spec/models/process_roster_items_request_spec.rb +58 -0
- data/spec/models/push_all_to_all_request_spec.rb +40 -0
- data/spec/models/push_roster_all_request_spec.rb +34 -0
- data/spec/models/push_roster_request_spec.rb +46 -0
- data/spec/models/register_muc_nick_request_spec.rb +46 -0
- data/spec/models/register_request_spec.rb +46 -0
- data/spec/models/registered_users_request_spec.rb +34 -0
- data/spec/models/remove_mam_for_user_with_peer_request_spec.rb +46 -0
- data/spec/models/remove_o_auth_client_request_spec.rb +34 -0
- data/spec/models/request_certificate_request_spec.rb +34 -0
- data/spec/models/resource_num200_response_spec.rb +34 -0
- data/spec/models/resource_num_request_spec.rb +46 -0
- data/spec/models/restart_module200_response_spec.rb +34 -0
- data/spec/models/restart_module_request_spec.rb +40 -0
- data/spec/models/restore_request_spec.rb +34 -0
- data/spec/models/revoke_certificate_request_spec.rb +34 -0
- data/spec/models/revoke_o_auth_token_request_spec.rb +34 -0
- data/spec/models/rooms_empty_destroy_request_spec.rb +34 -0
- data/spec/models/rooms_unused_destroy_request_spec.rb +40 -0
- data/spec/models/send_direct_invitation_request_spec.rb +58 -0
- data/spec/models/send_message_request_spec.rb +58 -0
- data/spec/models/send_stanza_c2_s_request_spec.rb +52 -0
- data/spec/models/send_stanza_request_spec.rb +46 -0
- data/spec/models/set_last_request_spec.rb +52 -0
- data/spec/models/set_loglevel_request_spec.rb +34 -0
- data/spec/models/set_master_request_spec.rb +34 -0
- data/spec/models/set_nickname_request_spec.rb +46 -0
- data/spec/models/set_presence_request_spec.rb +70 -0
- data/spec/models/set_room_affiliation_request_spec.rb +52 -0
- data/spec/models/set_vcard2_multi_request_spec.rb +58 -0
- data/spec/models/set_vcard2_request_spec.rb +58 -0
- data/spec/models/set_vcard_request_spec.rb +52 -0
- data/spec/models/srg_create_request_spec.rb +58 -0
- data/spec/models/srg_delete_request_spec.rb +40 -0
- data/spec/models/srg_get_info200_response_inner_spec.rb +40 -0
- data/spec/models/srg_user_add_request_spec.rb +52 -0
- data/spec/models/stop_kindly_request_spec.rb +40 -0
- data/spec/models/subscribe_to_room_many_request_spec.rb +46 -0
- data/spec/models/subscribe_to_room_many_request_users_inner_spec.rb +40 -0
- data/spec/models/subscribe_to_room_request_spec.rb +52 -0
- data/spec/models/table_mnesia_info_request_spec.rb +34 -0
- data/spec/models/unban_ip200_response_spec.rb +34 -0
- data/spec/models/unban_ip_request_spec.rb +34 -0
- data/spec/models/unregister_muc_nick_request_spec.rb +40 -0
- data/spec/models/unregister_user_request_spec.rb +40 -0
- data/spec/models/unsubscribe_from_room_request_spec.rb +40 -0
- data/spec/spec_helper.rb +114 -0
- metadata +772 -0
@@ -0,0 +1,241 @@
|
|
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 PrivateGetRequest
|
18
|
+
attr_accessor :user
|
19
|
+
|
20
|
+
attr_accessor :host
|
21
|
+
|
22
|
+
attr_accessor :element
|
23
|
+
|
24
|
+
attr_accessor :ns
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'user' => :'user',
|
30
|
+
:'host' => :'host',
|
31
|
+
:'element' => :'element',
|
32
|
+
:'ns' => :'ns'
|
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
|
+
:'user' => :'String',
|
45
|
+
:'host' => :'String',
|
46
|
+
:'element' => :'String',
|
47
|
+
:'ns' => :'String'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
])
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
+
def initialize(attributes = {})
|
60
|
+
if (!attributes.is_a?(Hash))
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `EjabberdHttpClient::PrivateGetRequest` initialize method"
|
62
|
+
end
|
63
|
+
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EjabberdHttpClient::PrivateGetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
|
+
end
|
69
|
+
h[k.to_sym] = v
|
70
|
+
}
|
71
|
+
|
72
|
+
if attributes.key?(:'user')
|
73
|
+
self.user = attributes[:'user']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'host')
|
77
|
+
self.host = attributes[:'host']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'element')
|
81
|
+
self.element = attributes[:'element']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'ns')
|
85
|
+
self.ns = attributes[:'ns']
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
90
|
+
# @return Array for valid properties with the reasons
|
91
|
+
def list_invalid_properties
|
92
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
93
|
+
invalid_properties = Array.new
|
94
|
+
invalid_properties
|
95
|
+
end
|
96
|
+
|
97
|
+
# Check to see if the all the properties in the model are valid
|
98
|
+
# @return true if the model is valid
|
99
|
+
def valid?
|
100
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
101
|
+
true
|
102
|
+
end
|
103
|
+
|
104
|
+
# Checks equality by comparing each attribute.
|
105
|
+
# @param [Object] Object to be compared
|
106
|
+
def ==(o)
|
107
|
+
return true if self.equal?(o)
|
108
|
+
self.class == o.class &&
|
109
|
+
user == o.user &&
|
110
|
+
host == o.host &&
|
111
|
+
element == o.element &&
|
112
|
+
ns == o.ns
|
113
|
+
end
|
114
|
+
|
115
|
+
# @see the `==` method
|
116
|
+
# @param [Object] Object to be compared
|
117
|
+
def eql?(o)
|
118
|
+
self == o
|
119
|
+
end
|
120
|
+
|
121
|
+
# Calculates hash code according to all attributes.
|
122
|
+
# @return [Integer] Hash code
|
123
|
+
def hash
|
124
|
+
[user, host, element, ns].hash
|
125
|
+
end
|
126
|
+
|
127
|
+
# Builds the object from hash
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
129
|
+
# @return [Object] Returns the model itself
|
130
|
+
def self.build_from_hash(attributes)
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
132
|
+
attributes = attributes.transform_keys(&:to_sym)
|
133
|
+
transformed_hash = {}
|
134
|
+
openapi_types.each_pair do |key, type|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
136
|
+
transformed_hash["#{key}"] = nil
|
137
|
+
elsif type =~ /\AArray<(.*)>/i
|
138
|
+
# check to ensure the input is an array given that the attribute
|
139
|
+
# is documented as an array but the input is not
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
142
|
+
end
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
145
|
+
end
|
146
|
+
end
|
147
|
+
new(transformed_hash)
|
148
|
+
end
|
149
|
+
|
150
|
+
# Deserializes the data based on type
|
151
|
+
# @param string type Data type
|
152
|
+
# @param string value Value to be deserialized
|
153
|
+
# @return [Object] Deserialized data
|
154
|
+
def self._deserialize(type, value)
|
155
|
+
case type.to_sym
|
156
|
+
when :Time
|
157
|
+
Time.parse(value)
|
158
|
+
when :Date
|
159
|
+
Date.parse(value)
|
160
|
+
when :String
|
161
|
+
value.to_s
|
162
|
+
when :Integer
|
163
|
+
value.to_i
|
164
|
+
when :Float
|
165
|
+
value.to_f
|
166
|
+
when :Boolean
|
167
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
168
|
+
true
|
169
|
+
else
|
170
|
+
false
|
171
|
+
end
|
172
|
+
when :Object
|
173
|
+
# generic object (usually a Hash), return directly
|
174
|
+
value
|
175
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
176
|
+
inner_type = Regexp.last_match[:inner_type]
|
177
|
+
value.map { |v| _deserialize(inner_type, v) }
|
178
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
179
|
+
k_type = Regexp.last_match[:k_type]
|
180
|
+
v_type = Regexp.last_match[:v_type]
|
181
|
+
{}.tap do |hash|
|
182
|
+
value.each do |k, v|
|
183
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
else # model
|
187
|
+
# models (e.g. Pet) or oneOf
|
188
|
+
klass = EjabberdHttpClient.const_get(type)
|
189
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the string representation of the object
|
194
|
+
# @return [String] String presentation of the object
|
195
|
+
def to_s
|
196
|
+
to_hash.to_s
|
197
|
+
end
|
198
|
+
|
199
|
+
# to_body is an alias to to_hash (backward compatibility)
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
201
|
+
def to_body
|
202
|
+
to_hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Returns the object in the form of hash
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
207
|
+
def to_hash
|
208
|
+
hash = {}
|
209
|
+
self.class.attribute_map.each_pair do |attr, param|
|
210
|
+
value = self.send(attr)
|
211
|
+
if value.nil?
|
212
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
213
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
214
|
+
end
|
215
|
+
|
216
|
+
hash[param] = _to_hash(value)
|
217
|
+
end
|
218
|
+
hash
|
219
|
+
end
|
220
|
+
|
221
|
+
# Outputs non-array value in the form of hash
|
222
|
+
# For object, use to_hash. Otherwise, just return the value
|
223
|
+
# @param [Object] value Any valid value
|
224
|
+
# @return [Hash] Returns the value in the form of hash
|
225
|
+
def _to_hash(value)
|
226
|
+
if value.is_a?(Array)
|
227
|
+
value.compact.map { |v| _to_hash(v) }
|
228
|
+
elsif value.is_a?(Hash)
|
229
|
+
{}.tap do |hash|
|
230
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
231
|
+
end
|
232
|
+
elsif value.respond_to? :to_hash
|
233
|
+
value.to_hash
|
234
|
+
else
|
235
|
+
value
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
end
|
240
|
+
|
241
|
+
end
|
@@ -0,0 +1,232 @@
|
|
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 PrivateSetRequest
|
18
|
+
attr_accessor :user
|
19
|
+
|
20
|
+
attr_accessor :host
|
21
|
+
|
22
|
+
attr_accessor :element
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'user' => :'user',
|
28
|
+
:'host' => :'host',
|
29
|
+
:'element' => :'element'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'user' => :'String',
|
42
|
+
:'host' => :'String',
|
43
|
+
:'element' => :'String'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# List of attributes with nullable: true
|
48
|
+
def self.openapi_nullable
|
49
|
+
Set.new([
|
50
|
+
])
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `EjabberdHttpClient::PrivateSetRequest` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EjabberdHttpClient::PrivateSetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'user')
|
69
|
+
self.user = attributes[:'user']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'host')
|
73
|
+
self.host = attributes[:'host']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'element')
|
77
|
+
self.element = attributes[:'element']
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
82
|
+
# @return Array for valid properties with the reasons
|
83
|
+
def list_invalid_properties
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
85
|
+
invalid_properties = Array.new
|
86
|
+
invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
93
|
+
true
|
94
|
+
end
|
95
|
+
|
96
|
+
# Checks equality by comparing each attribute.
|
97
|
+
# @param [Object] Object to be compared
|
98
|
+
def ==(o)
|
99
|
+
return true if self.equal?(o)
|
100
|
+
self.class == o.class &&
|
101
|
+
user == o.user &&
|
102
|
+
host == o.host &&
|
103
|
+
element == o.element
|
104
|
+
end
|
105
|
+
|
106
|
+
# @see the `==` method
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def eql?(o)
|
109
|
+
self == o
|
110
|
+
end
|
111
|
+
|
112
|
+
# Calculates hash code according to all attributes.
|
113
|
+
# @return [Integer] Hash code
|
114
|
+
def hash
|
115
|
+
[user, host, element].hash
|
116
|
+
end
|
117
|
+
|
118
|
+
# Builds the object from hash
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
+
# @return [Object] Returns the model itself
|
121
|
+
def self.build_from_hash(attributes)
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
124
|
+
transformed_hash = {}
|
125
|
+
openapi_types.each_pair do |key, type|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
127
|
+
transformed_hash["#{key}"] = nil
|
128
|
+
elsif type =~ /\AArray<(.*)>/i
|
129
|
+
# check to ensure the input is an array given that the attribute
|
130
|
+
# is documented as an array but the input is not
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
133
|
+
end
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
136
|
+
end
|
137
|
+
end
|
138
|
+
new(transformed_hash)
|
139
|
+
end
|
140
|
+
|
141
|
+
# Deserializes the data based on type
|
142
|
+
# @param string type Data type
|
143
|
+
# @param string value Value to be deserialized
|
144
|
+
# @return [Object] Deserialized data
|
145
|
+
def self._deserialize(type, value)
|
146
|
+
case type.to_sym
|
147
|
+
when :Time
|
148
|
+
Time.parse(value)
|
149
|
+
when :Date
|
150
|
+
Date.parse(value)
|
151
|
+
when :String
|
152
|
+
value.to_s
|
153
|
+
when :Integer
|
154
|
+
value.to_i
|
155
|
+
when :Float
|
156
|
+
value.to_f
|
157
|
+
when :Boolean
|
158
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
159
|
+
true
|
160
|
+
else
|
161
|
+
false
|
162
|
+
end
|
163
|
+
when :Object
|
164
|
+
# generic object (usually a Hash), return directly
|
165
|
+
value
|
166
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
167
|
+
inner_type = Regexp.last_match[:inner_type]
|
168
|
+
value.map { |v| _deserialize(inner_type, v) }
|
169
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
170
|
+
k_type = Regexp.last_match[:k_type]
|
171
|
+
v_type = Regexp.last_match[:v_type]
|
172
|
+
{}.tap do |hash|
|
173
|
+
value.each do |k, v|
|
174
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
else # model
|
178
|
+
# models (e.g. Pet) or oneOf
|
179
|
+
klass = EjabberdHttpClient.const_get(type)
|
180
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the string representation of the object
|
185
|
+
# @return [String] String presentation of the object
|
186
|
+
def to_s
|
187
|
+
to_hash.to_s
|
188
|
+
end
|
189
|
+
|
190
|
+
# to_body is an alias to to_hash (backward compatibility)
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
192
|
+
def to_body
|
193
|
+
to_hash
|
194
|
+
end
|
195
|
+
|
196
|
+
# Returns the object in the form of hash
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
198
|
+
def to_hash
|
199
|
+
hash = {}
|
200
|
+
self.class.attribute_map.each_pair do |attr, param|
|
201
|
+
value = self.send(attr)
|
202
|
+
if value.nil?
|
203
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
204
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
205
|
+
end
|
206
|
+
|
207
|
+
hash[param] = _to_hash(value)
|
208
|
+
end
|
209
|
+
hash
|
210
|
+
end
|
211
|
+
|
212
|
+
# Outputs non-array value in the form of hash
|
213
|
+
# For object, use to_hash. Otherwise, just return the value
|
214
|
+
# @param [Object] value Any valid value
|
215
|
+
# @return [Hash] Returns the value in the form of hash
|
216
|
+
def _to_hash(value)
|
217
|
+
if value.is_a?(Array)
|
218
|
+
value.compact.map { |v| _to_hash(v) }
|
219
|
+
elsif value.is_a?(Hash)
|
220
|
+
{}.tap do |hash|
|
221
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
222
|
+
end
|
223
|
+
elsif value.respond_to? :to_hash
|
224
|
+
value.to_hash
|
225
|
+
else
|
226
|
+
value
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
end
|
231
|
+
|
232
|
+
end
|
@@ -0,0 +1,223 @@
|
|
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 ProcessRosterItems200ResponseInner
|
18
|
+
attr_accessor :user
|
19
|
+
|
20
|
+
attr_accessor :contact
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'user' => :'user',
|
26
|
+
:'contact' => :'contact'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.openapi_types
|
37
|
+
{
|
38
|
+
:'user' => :'String',
|
39
|
+
:'contact' => :'String'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# List of attributes with nullable: true
|
44
|
+
def self.openapi_nullable
|
45
|
+
Set.new([
|
46
|
+
])
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `EjabberdHttpClient::ProcessRosterItems200ResponseInner` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EjabberdHttpClient::ProcessRosterItems200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'user')
|
65
|
+
self.user = attributes[:'user']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'contact')
|
69
|
+
self.contact = attributes[:'contact']
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
74
|
+
# @return Array for valid properties with the reasons
|
75
|
+
def list_invalid_properties
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
77
|
+
invalid_properties = Array.new
|
78
|
+
invalid_properties
|
79
|
+
end
|
80
|
+
|
81
|
+
# Check to see if the all the properties in the model are valid
|
82
|
+
# @return true if the model is valid
|
83
|
+
def valid?
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
85
|
+
true
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
user == o.user &&
|
94
|
+
contact == o.contact
|
95
|
+
end
|
96
|
+
|
97
|
+
# @see the `==` method
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def eql?(o)
|
100
|
+
self == o
|
101
|
+
end
|
102
|
+
|
103
|
+
# Calculates hash code according to all attributes.
|
104
|
+
# @return [Integer] Hash code
|
105
|
+
def hash
|
106
|
+
[user, contact].hash
|
107
|
+
end
|
108
|
+
|
109
|
+
# Builds the object from hash
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
+
# @return [Object] Returns the model itself
|
112
|
+
def self.build_from_hash(attributes)
|
113
|
+
return nil unless attributes.is_a?(Hash)
|
114
|
+
attributes = attributes.transform_keys(&:to_sym)
|
115
|
+
transformed_hash = {}
|
116
|
+
openapi_types.each_pair do |key, type|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = nil
|
119
|
+
elsif type =~ /\AArray<(.*)>/i
|
120
|
+
# check to ensure the input is an array given that the attribute
|
121
|
+
# is documented as an array but the input is not
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
124
|
+
end
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
127
|
+
end
|
128
|
+
end
|
129
|
+
new(transformed_hash)
|
130
|
+
end
|
131
|
+
|
132
|
+
# Deserializes the data based on type
|
133
|
+
# @param string type Data type
|
134
|
+
# @param string value Value to be deserialized
|
135
|
+
# @return [Object] Deserialized data
|
136
|
+
def self._deserialize(type, value)
|
137
|
+
case type.to_sym
|
138
|
+
when :Time
|
139
|
+
Time.parse(value)
|
140
|
+
when :Date
|
141
|
+
Date.parse(value)
|
142
|
+
when :String
|
143
|
+
value.to_s
|
144
|
+
when :Integer
|
145
|
+
value.to_i
|
146
|
+
when :Float
|
147
|
+
value.to_f
|
148
|
+
when :Boolean
|
149
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
150
|
+
true
|
151
|
+
else
|
152
|
+
false
|
153
|
+
end
|
154
|
+
when :Object
|
155
|
+
# generic object (usually a Hash), return directly
|
156
|
+
value
|
157
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
158
|
+
inner_type = Regexp.last_match[:inner_type]
|
159
|
+
value.map { |v| _deserialize(inner_type, v) }
|
160
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
161
|
+
k_type = Regexp.last_match[:k_type]
|
162
|
+
v_type = Regexp.last_match[:v_type]
|
163
|
+
{}.tap do |hash|
|
164
|
+
value.each do |k, v|
|
165
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
else # model
|
169
|
+
# models (e.g. Pet) or oneOf
|
170
|
+
klass = EjabberdHttpClient.const_get(type)
|
171
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
# Returns the string representation of the object
|
176
|
+
# @return [String] String presentation of the object
|
177
|
+
def to_s
|
178
|
+
to_hash.to_s
|
179
|
+
end
|
180
|
+
|
181
|
+
# to_body is an alias to to_hash (backward compatibility)
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
183
|
+
def to_body
|
184
|
+
to_hash
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the object in the form of hash
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_hash
|
190
|
+
hash = {}
|
191
|
+
self.class.attribute_map.each_pair do |attr, param|
|
192
|
+
value = self.send(attr)
|
193
|
+
if value.nil?
|
194
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
195
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
196
|
+
end
|
197
|
+
|
198
|
+
hash[param] = _to_hash(value)
|
199
|
+
end
|
200
|
+
hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Outputs non-array value in the form of hash
|
204
|
+
# For object, use to_hash. Otherwise, just return the value
|
205
|
+
# @param [Object] value Any valid value
|
206
|
+
# @return [Hash] Returns the value in the form of hash
|
207
|
+
def _to_hash(value)
|
208
|
+
if value.is_a?(Array)
|
209
|
+
value.compact.map { |v| _to_hash(v) }
|
210
|
+
elsif value.is_a?(Hash)
|
211
|
+
{}.tap do |hash|
|
212
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
213
|
+
end
|
214
|
+
elsif value.respond_to? :to_hash
|
215
|
+
value.to_hash
|
216
|
+
else
|
217
|
+
value
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|